public class CollectionTable extends AbstractTable implements JoinableTable
| Constructor and Description |
|---|
CollectionTable(JdbcAdaptor jdbcAdaptor,
ElementCollectionMapping<?,?,?> mapping,
CollectionTableMetadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
ElementColumn |
getElementColumn()
Returns the element column of the collection table.
|
ForeignKey |
getKey()
Returns the key.
|
MapKeyColumn |
getKeyColumn()
Returns the key column of the collection table.
|
ElementCollectionMapping<?,?,?> |
getMapping()
Returns the mapping of the collection table.
|
OrderColumn |
getOrderColumn()
Returns the order column.
|
void |
link(EntityTypeDescriptor entity,
EmbeddableTypeDescriptor type,
String defaultName,
RootMapping<?> elementMapping)
Links the collection table.
|
void |
link(EntityTypeDescriptor entity,
TypeDescriptor type,
String defaultName,
ColumnMetadata metadata,
javax.persistence.EnumType enumType,
javax.persistence.TemporalType temporalType,
boolean lob)
Links the collection table.
|
void |
performInsert(Connection connection,
Object source,
Joinable[] batch,
int size)
Performs the insert for the join.
|
void |
performRemove(Connection connection,
Object source,
Object key,
Object destination)
Performs the remove for the join.
|
void |
performRemoveAll(Connection connection,
Object source)
Performs the remove for the join.
|
void |
setKeyColumn(ColumnMetadata mapKeyColumn,
String name,
javax.persistence.TemporalType mapKeyTemporalType,
javax.persistence.EnumType mapKeyEnumType,
Class<?> mapKeyJavaType)
Sets the map key column.
|
void |
setOrderColumn(ColumnMetadata orderColumn,
String name,
AbstractLocator locator)
Sets the order column for the owned list type joins
|
addColumn, addForeignKey, getCatalog, getColumnMap, getColumnNames, getColumns, getForeignKeys, getInsertColumns, getInsertSql, getLocator, getName, getPkColumnNames, getQName, getRestrictionColumns, getRestrictionSql, getSchema, getSelectVersionColumns, getSelectVersionSql, getUniqueConstraints, getUpdateColumns, getUpdateSql, getVersionUpdateSql, setNamepublic CollectionTable(JdbcAdaptor jdbcAdaptor, ElementCollectionMapping<?,?,?> mapping, CollectionTableMetadata metadata)
jdbcAdaptor - the JDBC adaptormapping - the owner mappingmetadata - the metadatapublic ElementColumn getElementColumn()
public ForeignKey getKey()
public MapKeyColumn getKeyColumn()
public ElementCollectionMapping<?,?,?> getMapping()
public OrderColumn getOrderColumn()
public void link(EntityTypeDescriptor entity, EmbeddableTypeDescriptor type, String defaultName, RootMapping<?> elementMapping)
entity - the entitytype - the type of the collectiondefaultName - the default nameelementMapping - the element mappingpublic void link(EntityTypeDescriptor entity, TypeDescriptor type, String defaultName, ColumnMetadata metadata, javax.persistence.EnumType enumType, javax.persistence.TemporalType temporalType, boolean lob)
entity - the root entitytype - the type of the collectiondefaultName - the default namemetadata - the column metadatalob - if the column is a lob typetemporalType - the temporal typeenumType - the enum typepublic void performInsert(Connection connection, Object source, Joinable[] batch, int size) throws SQLException
performInsert in interface JoinableTableconnection - the connectionsource - the source instancebatch - the array of joinable batchsize - the size of the batchSQLException - thrown if there is an underlying SQL Exceptionpublic void performRemove(Connection connection, Object source, Object key, Object destination) throws SQLException
performRemove in interface JoinableTableconnection - the connectionsource - the source instancekey - the key objectdestination - the destination instanceSQLException - thrown if there is an underlying SQL Exceptionpublic void performRemoveAll(Connection connection, Object source) throws SQLException
performRemoveAll in interface JoinableTableconnection - the connectionsource - the source instanceSQLException - thrown if there is an underlying SQL Exceptionpublic void setKeyColumn(ColumnMetadata mapKeyColumn, String name, javax.persistence.TemporalType mapKeyTemporalType, javax.persistence.EnumType mapKeyEnumType, Class<?> mapKeyJavaType)
mapKeyColumn - the map key column definitionname - the name of the columnmapKeyTemporalType - the temporal type of the map keymapKeyEnumType - the enum type of the map keymapKeyJavaType - the java type of the map's keypublic void setOrderColumn(ColumnMetadata orderColumn, String name, AbstractLocator locator)
orderColumn - the order column definitionname - the name of the columnlocator - the locatorCopyright © 2012-2013 Batoo. All Rights Reserved.