Record Components:
columnName - the name of the column.
index - the 1-based index of the column.
type - the type of the column.
primaryKey - whether the column is a primary key.
autoGenerated - whether the column is auto-generated, in case of a primary key.
foreignKey - whether the column is a foreign key.
nullable - whether the column is nullable.
insertable - whether the column is insertable.
updatable - whether the column is updatable.
version - whether the column is a version column.
ref - whether the column is a lazily fetched record.
All Implemented Interfaces:
Column
public record ColumnImpl (@Nonnull
Name columnName, int index, @Nonnull
Class <?> type, boolean primaryKey, boolean autoGenerated, boolean foreignKey, boolean nullable, boolean insertable, boolean updatable, boolean version, boolean ref)
extends Record
implements Column
Represents a column in a database table.
Constructor Summary
Constructors
ColumnImpl (Name columnName,
int index,
Class <?> type,
boolean primaryKey,
boolean autoGenerated,
boolean foreignKey,
boolean nullable,
boolean insertable,
boolean updatable,
boolean version,
boolean ref)
Creates an instance of a ColumnImpl record class.
Method Summary
All Methods Instance Methods Concrete Methods
boolean
Returns the value of the
columnName record component.
final boolean
Indicates whether some other object is "equal to" this one.
boolean
Returns the value of the
foreignKey record component.
final int
Returns a hash code value for this object.
int
Returns the value of the
index record component.
boolean
Returns the value of the
insertable record component.
Gets the name of the column.
boolean
Returns the value of the
nullable record component.
boolean
Returns the value of the
primaryKey record component.
`` * Gets the qualified name of the column, including escape characters where necessary.
boolean
Returns the value of the
ref record component.
Returns a string representation of this record class.
Returns the value of the
type record component.
boolean
Returns the value of the
updatable record component.
boolean
Returns the value of the
version record component.
Constructor Details
ColumnImpl
public ColumnImpl (@Nonnull
Name columnName,
int index,
@Nonnull
Class <?> type,
boolean primaryKey,
boolean autoGenerated,
boolean foreignKey,
boolean nullable,
boolean insertable,
boolean updatable,
boolean version,
boolean ref)
Creates an instance of a ColumnImpl record class.
Parameters:
columnName - the value for the columnName record component
index - the value for the index record component
type - the value for the type record component
primaryKey - the value for the primaryKey record component
autoGenerated - the value for the autoGenerated record component
foreignKey - the value for the foreignKey record component
nullable - the value for the nullable record component
insertable - the value for the insertable record component
updatable - the value for the updatable record component
version - the value for the version record component
ref - the value for the ref record component
Method Details
name
Gets the name of the column.
Specified by:
name in interface Column
Returns:
the column name.
qualifiedName
`` * Gets the qualified name of the column, including escape characters where necessary.
Specified by:
qualifiedName in interface Column
Parameters:
dialect - the SQL dialect.
Returns:
the qualified column name.
toString
public final String toString ()
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
Specified by:
toString in class Record
Returns:
a string representation of this object
hashCode
public final int hashCode ()
Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
Specified by:
hashCode in class Record
Returns:
a hash code value for this object
equals
public final boolean equals (Object o)
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with
Objects::equals(Object,Object); primitive components are compared with '=='.
Specified by:
equals in class Record
Parameters:
o - the object with which to compare
Returns:
true if this object is the same as the o argument; false otherwise.
columnName
@Nonnull
public Name columnName ()
Returns the value of the
columnName record component.
Returns:
the value of the columnName record component
index
public int index ()
Returns the value of the
index record component.
Specified by:
index in interface Column
Returns:
the value of the index record component
type
@Nonnull
public Class <?> type ()
Returns the value of the
type record component.
Specified by:
type in interface Column
Returns:
the value of the type record component
primaryKey
public boolean primaryKey ()
Returns the value of the
primaryKey record component.
Specified by:
primaryKey in interface Column
Returns:
the value of the primaryKey record component
foreignKey
public boolean foreignKey ()
Returns the value of the
foreignKey record component.
Specified by:
foreignKey in interface Column
Returns:
the value of the foreignKey record component
nullable
public boolean nullable ()
Returns the value of the
nullable record component.
Specified by:
nullable in interface Column
Returns:
the value of the nullable record component
insertable
public boolean insertable ()
Returns the value of the
insertable record component.
Specified by:
insertable in interface Column
Returns:
the value of the insertable record component
updatable
public boolean updatable ()
Returns the value of the
updatable record component.
Specified by:
updatable in interface Column
Returns:
the value of the updatable record component
version
public boolean version ()
Returns the value of the
version record component.
Specified by:
version in interface Column
Returns:
the value of the version record component
ref
public boolean ref ()
Returns the value of the
ref record component.
Specified by:
ref in interface Column
Returns:
the value of the ref record component