public class JoinColumn extends AbstractColumn
BasicColumns.| Constructor and Description |
|---|
JoinColumn(JdbcAdaptor jdbcAdaptor,
AssociationMapping<?,?,?> mapping,
AbstractColumn referencedColumn,
BasicColumn masterColumn)
Constructor with no metadata for mappings with MapsId.
|
JoinColumn(JdbcAdaptor jdbcAdaptor,
AssociationMapping<?,?,?> mapping,
AbstractColumn referencedColumn,
boolean id)
Constructor with no metadata.
|
JoinColumn(JdbcAdaptor jdbcAdaptor,
JoinColumnMetadata metadata,
boolean readOnly)
Constructor with metadata.
|
JoinColumn(JdbcAdaptor jdbcAdaptor,
PrimaryKeyJoinColumnMetadata metadata,
SecondaryTable table,
AbstractColumn referencedColumn)
Constructor for secondary table join column with metadata.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getColumnDefinition()
Returns the columnDefinition of the JoinColumn.
|
int |
getLength()
Returns the length of the column.
|
Mapping<?,?,?> |
getMapping()
Returns the mapping of the BasicColumn.
|
AbstractColumn |
getMasterColumn()
Returns the master column.
|
String |
getName()
Returns the name of the JoinColumn.
|
int |
getPrecision()
Returns the precision of the column.
|
AbstractColumn |
getReferencedColumn()
Returns the referenced column of the join column.
|
String |
getReferencedColumnName()
Returns the name of the referenced column of the join column.
|
AbstractTable |
getReferencedTable()
Returns the referenced table.
|
int |
getScale()
Returns the scale of the column.
|
int |
getSqlType()
Returns the SQL Type of the column.
|
AbstractTable |
getTable()
Returns the table of the column
|
String |
getTableName()
Returns the table name of the column.
|
Object |
getValue(Connection connection,
Object instance)
Returns the value for the column
|
boolean |
isInsertable()
Returns the insertable of the JoinColumn.
|
boolean |
isNullable()
Returns the nullable of the JoinColumn.
|
boolean |
isUnique()
Returns the unique of the JoinColumn.
|
boolean |
isUpdatable()
Returns the updatable of the JoinColumn.
|
boolean |
isVirtual()
Returns if this join column is a virtual join column.
|
void |
setColumnProperties(AssociationMapping<?,?,?> mapping,
AbstractColumn referencedColumn,
AbstractColumn masterColumn)
Sets the column definition for virtual foreign column.
|
void |
setColumnProperties(AssociationMapping<?,?,?> mapping,
AbstractColumn referencedColumn,
boolean id)
Sets the column definition.
|
void |
setTable(AbstractTable table)
Sets the table of the column.
|
void |
setValue(Object instance,
Object value)
Sets the value for the instance
|
void |
setVirtual(AbstractColumn masterColumn)
Sets the master column of the join column.
|
String |
toString() |
convertValue, convertValueForSet, getIdType, getLocator, isLob, isPrimaryKey, setIdpublic JoinColumn(JdbcAdaptor jdbcAdaptor, AssociationMapping<?,?,?> mapping, AbstractColumn referencedColumn, BasicColumn masterColumn)
jdbcAdaptor - the JDBC Adaptormapping - the mappingreferencedColumn - the referenced columnmasterColumn - the master columnpublic JoinColumn(JdbcAdaptor jdbcAdaptor, AssociationMapping<?,?,?> mapping, AbstractColumn referencedColumn, boolean id)
jdbcAdaptor - the JDBC Adaptormapping - the mappingreferencedColumn - the referenced columnid - if the column is idpublic JoinColumn(JdbcAdaptor jdbcAdaptor, JoinColumnMetadata metadata, boolean readOnly)
jdbcAdaptor - the JDBC adaptormetadata - the metadata for the joinreadOnly - if the column is readonlypublic JoinColumn(JdbcAdaptor jdbcAdaptor, PrimaryKeyJoinColumnMetadata metadata, SecondaryTable table, AbstractColumn referencedColumn)
jdbcAdaptor - the JDBC Adaptormetadata - the metadata for the jointable - the secondary tablereferencedColumn - the referenced columnpublic String getColumnDefinition()
getColumnDefinition in class AbstractColumnpublic int getLength()
getLength in class AbstractColumnpublic Mapping<?,?,?> getMapping()
getMapping in class AbstractColumnpublic AbstractColumn getMasterColumn()
Master column is the delegate column for virtual join columns.
public String getName()
getName in class AbstractColumnpublic int getPrecision()
getPrecision in class AbstractColumnpublic AbstractColumn getReferencedColumn()
public String getReferencedColumnName()
public AbstractTable getReferencedTable()
public int getScale()
getScale in class AbstractColumnpublic int getSqlType()
getSqlType in class AbstractColumnpublic AbstractTable getTable()
getTable in class AbstractColumnpublic String getTableName()
getTableName in class AbstractColumnpublic Object getValue(Connection connection, Object instance)
getValue in class AbstractColumnconnection - the connectioninstance - the instancepublic boolean isInsertable()
isInsertable in class AbstractColumnpublic boolean isNullable()
isNullable in class AbstractColumnpublic boolean isUnique()
isUnique in class AbstractColumnpublic boolean isUpdatable()
isUpdatable in class AbstractColumnpublic boolean isVirtual()
Virtual join columns actually do not have their own storage, but rather references an existing id basic column.
public void setColumnProperties(AssociationMapping<?,?,?> mapping, AbstractColumn referencedColumn, AbstractColumn masterColumn)
mapping - the owner mappingreferencedColumn - the refernced columnmasterColumn - the master columnpublic void setColumnProperties(AssociationMapping<?,?,?> mapping, AbstractColumn referencedColumn, boolean id)
mapping - the owner mappingreferencedColumn - the referenced columnid - if the column is id columnpublic void setTable(AbstractTable table)
setTable in class AbstractColumntable - the owning tablepublic void setValue(Object instance, Object value)
setValue in class AbstractColumninstance - the instance of which to set valuevalue - the value to setpublic void setVirtual(AbstractColumn masterColumn)
masterColumn - the master columnpublic String toString()
toString in class AbstractColumnCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.