Top Description Fields Constructors Methods
org.eclipse.persistence.mappings

public Class RelationTableMechanism

extends Object
implements Cloneable, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.lang.Cloneable
Imports
java.util.ArrayList, .Enumeration, .Iterator, .List, .Set, .Vector, org.eclipse.persistence.descriptors.ClassDescriptor, .TablePerMultitenantPolicy, org.eclipse.persistence.exceptions.DescriptorException, org.eclipse.persistence.expressions.Expression, .ExpressionBuilder, org.eclipse.persistence.internal.databaseaccess.Platform, org.eclipse.persistence.internal.descriptors.ObjectBuilder, org.eclipse.persistence.internal.expressions.FieldExpression, .ForUpdateClause, .ForUpdateOfClause, .SQLDeleteStatement, .SQLInsertStatement, .SQLSelectStatement, org.eclipse.persistence.internal.helper.ConversionManager, .DatabaseField, .DatabaseTable, org.eclipse.persistence.internal.identitymaps.CacheId, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, org.eclipse.persistence.mappings.ForeignReferenceMapping.ExtendPessimisticLockScope, org.eclipse.persistence.queries.Call, .DataModifyQuery, .DirectReadQuery, .ObjectBuildingQuery, .ObjectLevelReadQuery, .ReadAllQuery, .ReadQuery, org.eclipse.persistence.sessions.DatabaseRecord

Purpose: Contains relation table functionality that was originally defined in ManyToManyMapping and now is shared with OneToOneMapping.

Field Summary

Modifier and TypeField and Description
protected DataModifyQuery
deleteQuery

Query used for single row deletion.

protected boolean
protected boolean
protected DataModifyQuery
insertQuery

Used for insertion.

protected ReadQuery
protected DatabaseTable
relationTable

The intermediate relation table.

protected Vector<DatabaseField>
sourceKeyFields

The field in the source table that corresponds to the key in the relation table

protected Vector<DatabaseField>
sourceRelationKeyFields

The field in the intermediate table that corresponds to the key in the source table

protected Vector<DatabaseField>
targetKeyFields

The field in the target table that corresponds to the key in the relation table

protected Vector<DatabaseField>
targetRelationKeyFields

The field in the intermediate table that corresponds to the key in the target table

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AbstractRecord
addRelationTableSourceRow(Object sourceObject, AbstractSession session, AbstractRecord databaseRow, ForeignReferenceMapping mapping)

INTERNAL: Add to a row source relation fields with values extracted from the source object.

public AbstractRecord
addRelationTableSourceRow(AbstractRecord sourceRow, AbstractRecord databaseRow)

INTERNAL: Add to a row source relation fields with values extracted from the source row.

public AbstractRecord
addRelationTableTargetRow(Object targetObject, AbstractSession session, AbstractRecord databaseRow, ForeignReferenceMapping mapping)

INTERNAL: Add to a row target relation fields with values extracted from the target object.

public void
addSourceRelationKeyField(DatabaseField sourceRelationKeyField, DatabaseField sourcePrimaryKeyField)

PUBLIC: Add the fields in the intermediate table that corresponds to the primary key in the source table.

public void
addSourceRelationKeyFieldName(String sourceRelationKeyFieldName, String sourcePrimaryKeyFieldName)

PUBLIC: Add the fields in the intermediate table that corresponds to the primary key in the source table.

public void
addTargetRelationKeyField(DatabaseField targetRelationKeyField, DatabaseField targetPrimaryKeyField)

PUBLIC: Add the fields in the intermediate table that corresponds to the primary key in the target table.

public void
addTargetRelationKeyFieldName(String targetRelationKeyFieldName, String targetPrimaryKeyFieldName)

PUBLIC: Add the fields in the intermediate table that corresponds to the primary key in the target table.

protected Expression
buildBatchCriteria(ExpressionBuilder builder, ObjectLevelReadQuery query)

INTERNAL: Return the selection criteria used to IN batch fetching.

public AbstractRecord
buildRelationTableSourceAndTargetRow(Object sourceObject, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Create a row that contains source relation fields with values extracted from the source object and target relation fields with values extracted from the target object.

public AbstractRecord
buildRelationTableSourceAndTargetRow(AbstractRecord sourceRow, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Create a row that contains source relation fields with values extracted from the source row and target relation fields with values extracted from the target object.

public AbstractRecord
buildRelationTableSourceRow(Object sourceObject, AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Create a row that contains source relation fields with values extracted from the source object.

public AbstractRecord
buildRelationTableSourceRow(AbstractRecord sourceRow)

INTERNAL: Create a row that contains source relation fields with values extracted from the source row.

pack-priv Expression
buildSelectionCriteria(ForeignReferenceMapping mapping, Expression criteria)

INTERNAL: Selection criteria is created to read target records from the table.

pack-priv Expression
public Expression
buildSelectionCriteriaAndAddFieldsToQueryInternal(ForeignReferenceMapping mapping, Expression criteria, boolean shouldAddTargetFields, boolean shouldAddFieldsToQuery)

INTERNAL: Build the selection criteria to join the source, relation, and target tables.

public Object
clone()

Overrides java.lang.Object.clone.

INTERNAL: The mapping clones itself to create deep copy.
protected Vector<E>
cloneFields(Vector<E> fields)

INTERNAL: Helper method to clone vector of fields (used in aggregate initialization cloning).

protected void
collectQueryParameters(Set<DatabaseField> cacheFields)

INTERNAL: This method is used to store the FK fields that can be cached that correspond to noncacheable mappings the FK field values will be used to re-issue the query when cloning the shared cache entity

protected Object
extractBatchKeyFromRow(AbstractRecord row, AbstractSession session)

INTERNAL: Extract the foreign key value from the source row.

protected Object
extractKeyFromTargetRow(AbstractRecord row, AbstractSession session)

INTERNAL: Extract the source primary key value from the relation row.

protected DataModifyQuery
protected DataModifyQuery
pack-priv ReadQuery
getLockRelationTableQueryClone(AbstractSession session, short lockMode)

INTERNAL: Returns a query that

public DatabaseField
getRelationFieldForTargetField(DatabaseField targetField)

INTERNAL: Return the relation field for the target field.

public DatabaseTable
getRelationTable()

INTERNAL: Return the relation table associated with the mapping.

public String
getRelationTableName()

PUBLIC: Return the relation table name associated with the mapping.

public String
getRelationTableQualifiedName()

PUBLIC: Return the relation table qualified name associated with the mapping.

public Vector<E>
getSourceKeyFieldNames()

PUBLIC: Return the source key field names associated with the mapping.

public Vector<DatabaseField>
getSourceKeyFields()

INTERNAL: Return all the source key fields associated with the mapping.

public Vector<E>
getSourceRelationKeyFieldNames()

PUBLIC: Return the source relation key field names associated with the mapping.

public Vector<DatabaseField>
getSourceRelationKeyFields()

INTERNAL: Return all the source relation key fields associated with the mapping.

public Vector<E>
getTargetKeyFieldNames()

PUBLIC: Return the target key field names associated with the mapping.

public Vector<DatabaseField>
getTargetKeyFields()

INTERNAL: Return all the target keys associated with the mapping.

public Vector<E>
getTargetRelationKeyFieldNames()

PUBLIC: Return the target relation key field names associated with the mapping.

public Vector<DatabaseField>
getTargetRelationKeyFields()

INTERNAL: Return all the target relation key fields associated with the mapping.

protected boolean
protected boolean
public boolean
hasRelationTable()

INTERNAL: Indicates whether the mechanism has relation table.

public void
initialize(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Initialize

protected void
initializeDeleteQuery(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Initialize delete query.

protected void
initializeExtendPessimisticLockScope(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Initialize extendPessimisticLockeScope and lockRelationTableQuery (if required).

protected void
initializeInsertQuery(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Initialize insert query.

protected void
initializeLockRelationTableQuery(AbstractSession session, ForeignReferenceMapping mapping, Expression startCriteria)

INTERNAL: Initialize lockRelationTableQuery.

protected void
initializeRelationTable(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Set the table qualifier on the relation table if required

protected void
initializeSourceKeys(ForeignReferenceMapping mapping)

INTERNAL: All the source key field names are converted to DatabaseField and stored.

protected void
initializeSourceKeysWithDefaults(DatabaseMapping mapping)

INTERNAL: If a user does not specify the source key then the primary keys of the source table are used.

protected void
initializeSourceRelationKeys(ForeignReferenceMapping mapping)

INTERNAL: All the source relation key field names are converted to DatabaseField and stored.

protected void
initializeTargetKeys(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: All the target key field names are converted to DatabaseField and stored.

protected void
initializeTargetKeysWithDefaults(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: If a user does not specify the target key then the primary keys of the target table are used.

protected void
initializeTargetRelationKeys(ForeignReferenceMapping mapping)

INTERNAL: All the target relation key field names are converted to DatabaseField and stored.

protected boolean
isSingleSourceRelationKeySpecified()

INTERNAL: Checks if a single source key was specified.

protected boolean
isSingleTargetRelationKeySpecified()

INTERNAL: Checks if a single target key was specified.

public Expression
joinRelationTableField(Expression expression, Expression baseExpression)

INTERNAL: Adds to the passed expression a single relation table field joined to source field.

public void
postPrepareNestedBatchQuery(ReadQuery batchQuery, ObjectLevelReadQuery query)

INTERNAL: Add the addition join fields to the batch query.

public void
setCustomDeleteQuery(DataModifyQuery query)

PUBLIC: The default delete query for mapping can be overridden by specifying the new query.

public void
setCustomInsertQuery(DataModifyQuery query)

PUBLIC: The default insert query for mapping can be overridden by specifying the new query.

public void
setDeleteCall(Call call)

PUBLIC: Set the receiver's delete Call.

protected void
public void
setDeleteSQLString(String sqlString)

PUBLIC: Set the receiver's delete SQL string.

protected void
setHasCustomDeleteQuery(boolean hasCustomDeleteQuery)

protected void
public void
setInsertCall(Call call)

PUBLIC: Set the receiver's insert Call.

protected void
public void
setInsertSQLString(String sqlString)

PUBLIC: Set the receiver's insert SQL string.

public void
setRelationTable(DatabaseTable relationTable)

PUBLIC: Set the relational table.

public void
setRelationTableLockingClause(ObjectLevelReadQuery targetQuery, ObjectBuildingQuery sourceQuery)

INTERNAL: Return relation table locking clause.

public void
setRelationTableName(String tableName)

PUBLIC: Set the name of the relational table.

public void
setSessionName(String name)

PUBLIC: Set the name of the session to execute the mapping's queries under.

public void
setSourceKeyFieldNames(Vector<E> fieldNames)

PUBLIC: Set the source key field names associated with the mapping.

public void
setSourceKeyFields(Vector<DatabaseField> sourceKeyFields)

INTERNAL: Set the source fields.

public void
setSourceRelationKeyFieldName(String sourceRelationKeyFieldName)

PUBLIC: Set the source key field in the relation table.

public void
setSourceRelationKeyFieldNames(Vector<E> fieldNames)

PUBLIC: Set the source relation key field names associated with the mapping.

public void
setSourceRelationKeyFields(Vector<DatabaseField> sourceRelationKeyFields)

INTERNAL: Set the source fields.

public void
setTargetKeyFieldNames(Vector<E> fieldNames)

INTERNAL: Set the target key field names associated with the mapping.

public void
setTargetKeyFields(Vector<DatabaseField> targetKeyFields)

INTERNAL: Set the target fields.

public void
setTargetRelationKeyFieldName(String targetRelationKeyFieldName)

PUBLIC: Set the target key field in the relation table.

public void
setTargetRelationKeyFieldNames(Vector<E> fieldNames)

INTERNAL: Set the target relation key field names associated with the mapping.

public void
setTargetRelationKeyFields(Vector<DatabaseField> targetRelationKeyFields)

INTERNAL: Set the target fields.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

deleteQueryback to summary
protected DataModifyQuery deleteQuery

Query used for single row deletion.

hasCustomDeleteQueryback to summary
protected boolean hasCustomDeleteQuery
hasCustomInsertQueryback to summary
protected boolean hasCustomInsertQuery
insertQueryback to summary
protected DataModifyQuery insertQuery

Used for insertion.

lockRelationTableQueryback to summary
protected ReadQuery lockRelationTableQuery
relationTableback to summary
protected DatabaseTable relationTable

The intermediate relation table.

sourceKeyFieldsback to summary
protected Vector<DatabaseField> sourceKeyFields

The field in the source table that corresponds to the key in the relation table

sourceRelationKeyFieldsback to summary
protected Vector<DatabaseField> sourceRelationKeyFields

The field in the intermediate table that corresponds to the key in the source table

targetKeyFieldsback to summary
protected Vector<DatabaseField> targetKeyFields

The field in the target table that corresponds to the key in the relation table

targetRelationKeyFieldsback to summary
protected Vector<DatabaseField> targetRelationKeyFields

The field in the intermediate table that corresponds to the key in the target table

Constructor Detail

RelationTableMechanismback to summary
public RelationTableMechanism()

Method Detail

addRelationTableSourceRowback to summary
public AbstractRecord addRelationTableSourceRow(Object sourceObject, AbstractSession session, AbstractRecord databaseRow, ForeignReferenceMapping mapping)

INTERNAL: Add to a row source relation fields with values extracted from the source object.

addRelationTableSourceRowback to summary
public AbstractRecord addRelationTableSourceRow(AbstractRecord sourceRow, AbstractRecord databaseRow)

INTERNAL: Add to a row source relation fields with values extracted from the source row.

addRelationTableTargetRowback to summary
public AbstractRecord addRelationTableTargetRow(Object targetObject, AbstractSession session, AbstractRecord databaseRow, ForeignReferenceMapping mapping)

INTERNAL: Add to a row target relation fields with values extracted from the target object.

addSourceRelationKeyFieldback to summary
public void addSourceRelationKeyField(DatabaseField sourceRelationKeyField, DatabaseField sourcePrimaryKeyField)

PUBLIC: Add the fields in the intermediate table that corresponds to the primary key in the source table. This method is used if the keys are composite.

addSourceRelationKeyFieldNameback to summary
public void addSourceRelationKeyFieldName(String sourceRelationKeyFieldName, String sourcePrimaryKeyFieldName)

PUBLIC: Add the fields in the intermediate table that corresponds to the primary key in the source table. This method is used if the keys are composite.

addTargetRelationKeyFieldback to summary
public void addTargetRelationKeyField(DatabaseField targetRelationKeyField, DatabaseField targetPrimaryKeyField)

PUBLIC: Add the fields in the intermediate table that corresponds to the primary key in the target table. This method is used if the keys are composite.

addTargetRelationKeyFieldNameback to summary
public void addTargetRelationKeyFieldName(String targetRelationKeyFieldName, String targetPrimaryKeyFieldName)

PUBLIC: Add the fields in the intermediate table that corresponds to the primary key in the target table. This method is used if the keys are composite.

buildBatchCriteriaback to summary
protected Expression buildBatchCriteria(ExpressionBuilder builder, ObjectLevelReadQuery query)

INTERNAL: Return the selection criteria used to IN batch fetching.

buildRelationTableSourceAndTargetRowback to summary
public AbstractRecord buildRelationTableSourceAndTargetRow(Object sourceObject, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Create a row that contains source relation fields with values extracted from the source object and target relation fields with values extracted from the target object.

buildRelationTableSourceAndTargetRowback to summary
public AbstractRecord buildRelationTableSourceAndTargetRow(AbstractRecord sourceRow, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Create a row that contains source relation fields with values extracted from the source row and target relation fields with values extracted from the target object.

buildRelationTableSourceRowback to summary
public AbstractRecord buildRelationTableSourceRow(Object sourceObject, AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Create a row that contains source relation fields with values extracted from the source object.

buildRelationTableSourceRowback to summary
public AbstractRecord buildRelationTableSourceRow(AbstractRecord sourceRow)

INTERNAL: Create a row that contains source relation fields with values extracted from the source row.

buildSelectionCriteriaback to summary
pack-priv Expression buildSelectionCriteria(ForeignReferenceMapping mapping, Expression criteria)

INTERNAL: Selection criteria is created to read target records from the table.

buildSelectionCriteriaAndAddFieldsToQueryback to summary
pack-priv Expression buildSelectionCriteriaAndAddFieldsToQuery(ForeignReferenceMapping mapping, Expression criteria)
buildSelectionCriteriaAndAddFieldsToQueryInternalback to summary
public Expression buildSelectionCriteriaAndAddFieldsToQueryInternal(ForeignReferenceMapping mapping, Expression criteria, boolean shouldAddTargetFields, boolean shouldAddFieldsToQuery)

INTERNAL: Build the selection criteria to join the source, relation, and target tables.

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

INTERNAL: The mapping clones itself to create deep copy.

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
cloneFieldsback to summary
protected Vector<E> cloneFields(Vector<E> fields)

INTERNAL: Helper method to clone vector of fields (used in aggregate initialization cloning).

collectQueryParametersback to summary
protected void collectQueryParameters(Set<DatabaseField> cacheFields)

INTERNAL: This method is used to store the FK fields that can be cached that correspond to noncacheable mappings the FK field values will be used to re-issue the query when cloning the shared cache entity

extractBatchKeyFromRowback to summary
protected Object extractBatchKeyFromRow(AbstractRecord row, AbstractSession session)

INTERNAL: Extract the foreign key value from the source row.

extractKeyFromTargetRowback to summary
protected Object extractKeyFromTargetRow(AbstractRecord row, AbstractSession session)

INTERNAL: Extract the source primary key value from the relation row. Used for batch reading, most following same order and fields as in the mapping.

getDeleteQueryback to summary
protected DataModifyQuery getDeleteQuery()
getInsertQueryback to summary
protected DataModifyQuery getInsertQuery()
getLockRelationTableQueryCloneback to summary
pack-priv ReadQuery getLockRelationTableQueryClone(AbstractSession session, short lockMode)

INTERNAL: Returns a query that

getRelationFieldForTargetFieldback to summary
public DatabaseField getRelationFieldForTargetField(DatabaseField targetField)

INTERNAL: Return the relation field for the target field.

getRelationTableback to summary
public DatabaseTable getRelationTable()

INTERNAL: Return the relation table associated with the mapping.

getRelationTableNameback to summary
public String getRelationTableName()

PUBLIC: Return the relation table name associated with the mapping.

getRelationTableQualifiedNameback to summary
public String getRelationTableQualifiedName()

PUBLIC: Return the relation table qualified name associated with the mapping.

getSourceKeyFieldNamesback to summary
public Vector<E> getSourceKeyFieldNames()

PUBLIC: Return the source key field names associated with the mapping. These are in-order with the sourceRelationKeyFieldNames.

getSourceKeyFieldsback to summary
public Vector<DatabaseField> getSourceKeyFields()

INTERNAL: Return all the source key fields associated with the mapping.

getSourceRelationKeyFieldNamesback to summary
public Vector<E> getSourceRelationKeyFieldNames()

PUBLIC: Return the source relation key field names associated with the mapping. These are in-order with the sourceKeyFieldNames.

getSourceRelationKeyFieldsback to summary
public Vector<DatabaseField> getSourceRelationKeyFields()

INTERNAL: Return all the source relation key fields associated with the mapping.

getTargetKeyFieldNamesback to summary
public Vector<E> getTargetKeyFieldNames()

PUBLIC: Return the target key field names associated with the mapping. These are in-order with the targetRelationKeyFieldNames.

getTargetKeyFieldsback to summary
public Vector<DatabaseField> getTargetKeyFields()

INTERNAL: Return all the target keys associated with the mapping.

getTargetRelationKeyFieldNamesback to summary
public Vector<E> getTargetRelationKeyFieldNames()

PUBLIC: Return the target relation key field names associated with the mapping. These are in-order with the targetKeyFieldNames.

getTargetRelationKeyFieldsback to summary
public Vector<DatabaseField> getTargetRelationKeyFields()

INTERNAL: Return all the target relation key fields associated with the mapping.

hasCustomDeleteQueryback to summary
protected boolean hasCustomDeleteQuery()
hasCustomInsertQueryback to summary
protected boolean hasCustomInsertQuery()
hasRelationTableback to summary
public boolean hasRelationTable()

INTERNAL: Indicates whether the mechanism has relation table.

initializeback to summary
public void initialize(AbstractSession session, ForeignReferenceMapping mapping) throws DescriptorException

INTERNAL: Initialize

initializeDeleteQueryback to summary
protected void initializeDeleteQuery(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Initialize delete query. This query is used to delete a specific row from the join table in uow, given the objects on both sides of the relation.

initializeExtendPessimisticLockScopeback to summary
protected void initializeExtendPessimisticLockScope(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Initialize extendPessimisticLockeScope and lockRelationTableQuery (if required).

initializeInsertQueryback to summary
protected void initializeInsertQuery(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: Initialize insert query. This query is used to insert the collection of objects into the relation table.

initializeLockRelationTableQueryback to summary
protected void initializeLockRelationTableQuery(AbstractSession session, ForeignReferenceMapping mapping, Expression startCriteria)

INTERNAL: Initialize lockRelationTableQuery.

initializeRelationTableback to summary
protected void initializeRelationTable(AbstractSession session, ForeignReferenceMapping mapping) throws DescriptorException

INTERNAL: Set the table qualifier on the relation table if required

initializeSourceKeysback to summary
protected void initializeSourceKeys(ForeignReferenceMapping mapping)

INTERNAL: All the source key field names are converted to DatabaseField and stored.

initializeSourceKeysWithDefaultsback to summary
protected void initializeSourceKeysWithDefaults(DatabaseMapping mapping)

INTERNAL: If a user does not specify the source key then the primary keys of the source table are used.

initializeSourceRelationKeysback to summary
protected void initializeSourceRelationKeys(ForeignReferenceMapping mapping) throws DescriptorException

INTERNAL: All the source relation key field names are converted to DatabaseField and stored.

initializeTargetKeysback to summary
protected void initializeTargetKeys(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: All the target key field names are converted to DatabaseField and stored.

initializeTargetKeysWithDefaultsback to summary
protected void initializeTargetKeysWithDefaults(AbstractSession session, ForeignReferenceMapping mapping)

INTERNAL: If a user does not specify the target key then the primary keys of the target table are used.

initializeTargetRelationKeysback to summary
protected void initializeTargetRelationKeys(ForeignReferenceMapping mapping)

INTERNAL: All the target relation key field names are converted to DatabaseField and stored.

isSingleSourceRelationKeySpecifiedback to summary
protected boolean isSingleSourceRelationKeySpecified()

INTERNAL: Checks if a single source key was specified.

isSingleTargetRelationKeySpecifiedback to summary
protected boolean isSingleTargetRelationKeySpecified()

INTERNAL: Checks if a single target key was specified.

joinRelationTableFieldback to summary
public Expression joinRelationTableField(Expression expression, Expression baseExpression)

INTERNAL: Adds to the passed expression a single relation table field joined to source field. Used to extend pessimistic locking clause in source query.

postPrepareNestedBatchQueryback to summary
public void postPrepareNestedBatchQuery(ReadQuery batchQuery, ObjectLevelReadQuery query)

INTERNAL: Add the addition join fields to the batch query.

setCustomDeleteQueryback to summary
public void setCustomDeleteQuery(DataModifyQuery query)

PUBLIC: The default delete query for mapping can be overridden by specifying the new query. This query must delete the row from the M-M join table.

setCustomInsertQueryback to summary
public void setCustomInsertQuery(DataModifyQuery query)

PUBLIC: The default insert query for mapping can be overridden by specifying the new query. This query must insert the row into the M-M join table.

setDeleteCallback to summary
public void setDeleteCall(Call call)

PUBLIC: Set the receiver's delete Call. This allows the user to override the SQL generated by TOPLink, with there own SQL or procedure call. The arguments are translated from the fields of the source row. This is used to delete a single entry from the M-M join table. Example, 'new SQLCall("delete from PROJ_EMP where PROJ_ID = #PROJ_ID AND EMP_ID = #EMP_ID")'.

setDeleteQueryback to summary
protected void setDeleteQuery(DataModifyQuery deleteQuery)
setDeleteSQLStringback to summary
public void setDeleteSQLString(String sqlString)

PUBLIC: Set the receiver's delete SQL string. This allows the user to override the SQL generated by TOPLink, with there own SQL or procedure call. The arguments are translated from the fields of the source row, through replacing the field names marked by '#' with the values for those fields. This is used to delete a single entry from the M-M join table. Example, 'delete from PROJ_EMP where PROJ_ID = #PROJ_ID AND EMP_ID = #EMP_ID'.

setHasCustomDeleteQueryback to summary
protected void setHasCustomDeleteQuery(boolean hasCustomDeleteQuery)
setHasCustomInsertQueryback to summary
protected void setHasCustomInsertQuery(boolean bool)
setInsertCallback to summary
public void setInsertCall(Call call)

PUBLIC: Set the receiver's insert Call. This allows the user to override the SQL generated by TOPLink, with there own SQL or procedure call. The arguments are translated from the fields of the source row. This is used to insert an entry into the M-M join table. Example, 'new SQLCall("insert into PROJ_EMP (EMP_ID, PROJ_ID) values (#EMP_ID, #PROJ_ID)")'.

setInsertQueryback to summary
protected void setInsertQuery(DataModifyQuery insertQuery)
setInsertSQLStringback to summary
public void setInsertSQLString(String sqlString)

PUBLIC: Set the receiver's insert SQL string. This allows the user to override the SQL generated by TOPLink, with there own SQL or procedure call. The arguments are translated from the fields of the source row, through replacing the field names marked by '#' with the values for those fields. This is used to insert an entry into the M-M join table. Example, 'insert into PROJ_EMP (EMP_ID, PROJ_ID) values (#EMP_ID, #PROJ_ID)'.

setRelationTableback to summary
public void setRelationTable(DatabaseTable relationTable)

PUBLIC: Set the relational table. This is the join table that store both the source and target primary keys.

setRelationTableLockingClauseback to summary
public void setRelationTableLockingClause(ObjectLevelReadQuery targetQuery, ObjectBuildingQuery sourceQuery)

INTERNAL: Return relation table locking clause.

setRelationTableNameback to summary
public void setRelationTableName(String tableName)

PUBLIC: Set the name of the relational table. This is the join table that store both the source and target primary keys.

setSessionNameback to summary
public void setSessionName(String name)

PUBLIC: Set the name of the session to execute the mapping's queries under. This can be used by the session broker to override the default session to be used for the target class.

setSourceKeyFieldNamesback to summary
public void setSourceKeyFieldNames(Vector<E> fieldNames)

PUBLIC: Set the source key field names associated with the mapping. These must be in-order with the sourceRelationKeyFieldNames.

setSourceKeyFieldsback to summary
public void setSourceKeyFields(Vector<DatabaseField> sourceKeyFields)

INTERNAL: Set the source fields.

setSourceRelationKeyFieldNameback to summary
public void setSourceRelationKeyFieldName(String sourceRelationKeyFieldName)

PUBLIC: Set the source key field in the relation table. This is the name of the foreign key in the relation table to the source's primary key field. This method is used if the source primary key is a singleton only.

setSourceRelationKeyFieldNamesback to summary
public void setSourceRelationKeyFieldNames(Vector<E> fieldNames)

PUBLIC: Set the source relation key field names associated with the mapping. These must be in-order with the sourceKeyFieldNames.

setSourceRelationKeyFieldsback to summary
public void setSourceRelationKeyFields(Vector<DatabaseField> sourceRelationKeyFields)

INTERNAL: Set the source fields.

setTargetKeyFieldNamesback to summary
public void setTargetKeyFieldNames(Vector<E> fieldNames)

INTERNAL: Set the target key field names associated with the mapping. These must be in-order with the targetRelationKeyFieldNames.

setTargetKeyFieldsback to summary
public void setTargetKeyFields(Vector<DatabaseField> targetKeyFields)

INTERNAL: Set the target fields.

setTargetRelationKeyFieldNameback to summary
public void setTargetRelationKeyFieldName(String targetRelationKeyFieldName)

PUBLIC: Set the target key field in the relation table. This is the name of the foreign key in the relation table to the target's primary key field. This method is used if the target's primary key is a singleton only.

setTargetRelationKeyFieldNamesback to summary
public void setTargetRelationKeyFieldNames(Vector<E> fieldNames)

INTERNAL: Set the target relation key field names associated with the mapping. These must be in-order with the targetKeyFieldNames.

setTargetRelationKeyFieldsback to summary
public void setTargetRelationKeyFields(Vector<DatabaseField> targetRelationKeyFields)

INTERNAL: Set the target fields.