public class JoinTable extends AbstractTable implements JoinableTable
| Constructor and Description |
|---|
JoinTable(EntityTypeImpl<?> entity,
JoinTableMetadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
String |
createJoin(javax.persistence.criteria.JoinType joinType,
String parentAlias,
String alias,
boolean forward)
Creates a join between the source and destination entities
|
ForeignKey |
getDestinationKey()
Returns the destinationKey of the JoinTable.
|
EntityTypeImpl<?> |
getEntity()
Returns the oner entity of the table.
|
OrderColumn |
getOrderColumn()
Returns the order column.
|
ForeignKey |
getSourceKey()
Returns the sourceKey of the JoinTable.
|
void |
link(EntityTypeImpl<?> source,
EntityTypeImpl<?> destination) |
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)
Sets the order column for the owned list type joins
|
addColumn, addForeignKey, getCatalog, getColumnNames, getColumns, getForeignKeys, getInsertColumns, getInsertSql, getLocator, getName, getPkColumnNames, getQName, getSchema, getSelectVersionColumns, getSelectVersionSql, getUniqueConstraints, getUpdateColumns, getUpdateSql, getVersionUpdateColumns, getVersionUpdateSql, setNamepublic JoinTable(EntityTypeImpl<?> entity, JoinTableMetadata metadata)
entity - the owner entitymetadata - the metadatapublic String createJoin(javax.persistence.criteria.JoinType joinType, String parentAlias, String alias, boolean forward)
joinType - the type of the joinparentAlias - the alias of the parent tablealias - the alias of the tableforward - if the join if forward or backwardspublic ForeignKey getDestinationKey()
public EntityTypeImpl<?> getEntity()
public OrderColumn getOrderColumn()
public ForeignKey getSourceKey()
public void link(EntityTypeImpl<?> source, EntityTypeImpl<?> destination)
source - the source entitydestination - the destination entitypublic 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)
orderColumn - the order column definitionname - the name of the columnCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.