public class DirectCollectionMapping extends CollectionMapping implements RelationalMapping
Purpose: This mapping is used to store a collection of simple types (String, Number, Date, etc.) into a single table. The table must store the value and a foreign key to the source object. A converter can be used if the desired object type and the data type do not match.
Converter
,
ObjectTypeConverter
,
TypeConversionConverter
,
SerializedObjectConverter
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected ModifyQuery |
changeSetDeleteQuery
Used for deletion when ChangeSets are used
|
protected static java.lang.String |
Delete
Used for data modification events.
|
protected static java.lang.String |
DeleteAll |
protected DatabaseField |
directField
The direct field name is converted and stored
|
protected boolean |
hasCustomDeleteQuery |
protected boolean |
hasCustomInsertQuery |
protected static java.lang.String |
Insert |
protected DataModifyQuery |
insertQuery
Used for insertion for m-m and dc, not used in 1-m.
|
protected java.util.Vector<DatabaseField> |
referenceKeyFields |
protected DatabaseTable |
referenceTable
Stores the reference table
|
protected java.util.Vector<DatabaseField> |
sourceKeyFields |
protected Converter |
valueConverter
Allows user defined conversion between the object value and the database value.
|
containerPolicy, deleteAllQuery, hasCustomDeleteAllQuery, hasOrderBy
cascadeMerge, cascadePersist, cascadeRefresh, cascadeRemove, hasCustomSelectionQuery, indirectionPolicy, isPrivateOwned, referenceClass, referenceClassName, referenceDescriptor, relationshipPartner, relationshipPartnerAttributeName, selectionQuery, tempInitSession
attributeAccessor, descriptor, fields, isOptional, isReadOnly, isRemotelyInitialized, NO_FIELDS, NO_WEIGHT, primaryKeyMapping, properties, weight, WEIGHT_1
Constructor and Description |
---|
DirectCollectionMapping()
PUBLIC:
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addReferenceKeyField(DatabaseField referenceForeignKeyField,
DatabaseField sourcePrimaryKeyField)
PUBLIC:
Add the reference key field.
|
void |
addReferenceKeyFieldName(java.lang.String referenceForeignKeyFieldName,
java.lang.String sourcePrimaryKeyFieldName)
PUBLIC:
Add the name of the reference key field.
|
void |
addToCollectionChangeRecord(java.lang.Object newKey,
java.lang.Object newValue,
ObjectChangeSet objectChangeSet,
UnitOfWorkImpl uow)
INTERNAL:
Add a new value and its change set to the collection change record.
|
void |
buildCopy(java.lang.Object copy,
java.lang.Object original,
ObjectCopyingPolicy policy)
INTERNAL:
Copy of the attribute of the object.
|
protected java.lang.Object |
buildElementClone(java.lang.Object element,
UnitOfWorkImpl unitOfWork,
boolean isExisting)
INTERNAL:
Clone the element, if necessary.
|
void |
calculateDeferredChanges(ChangeRecord changeRecord,
AbstractSession session)
INTERNAL:
Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes
as apposed to detected changes.
|
void |
cascadePerformRemoveIfRequired(java.lang.Object object,
UnitOfWorkImpl uow,
IdentityHashtable visitedObjects)
INTERNAL:
Cascade perform delete through mappings that require the cascade
|
void |
cascadeRegisterNewIfRequired(java.lang.Object object,
UnitOfWorkImpl uow,
IdentityHashtable visitedObjects)
INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
java.lang.Object |
clone()
INTERNAL:
The mapping clones itself to create deep copy.
|
void |
compareCollectionsForChange(java.lang.Object oldCollection,
java.lang.Object newCollection,
ChangeRecord changeRecord,
AbstractSession session)
INTERNAL:
This method is used to calculate the differences between two collections.
|
ChangeRecord |
compareForChange(java.lang.Object clone,
java.lang.Object backUp,
ObjectChangeSet owner,
AbstractSession session)
INTERNAL:
This method compares the changes between two direct collections.
|
boolean |
compareObjects(java.lang.Object firstObject,
java.lang.Object secondObject,
AbstractSession session)
INTERNAL:
Compare the attributes belonging to this mapping for the objects.
|
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this mapping to actual class-based
settings
This method is implemented by subclasses as necessary.
|
protected java.util.Vector |
extractKeyFromReferenceRow(AbstractRecord row,
AbstractSession session)
INTERNAL:
Extract the source primary key value from the reference direct row.
|
protected java.util.Vector |
extractPrimaryKeyFromRow(AbstractRecord row,
AbstractSession session)
INTERNAL:
Extract the primary key value from the source row.
|
protected ModifyQuery |
getDeleteQuery() |
DatabaseField |
getDirectField()
INTERNAL:
Return the direct field.
|
java.lang.String |
getDirectFieldName()
PUBLIC:
Returns the name of the field name in the reference table.
|
protected DataModifyQuery |
getInsertQuery() |
java.lang.Class |
getReferenceClass()
INTERNAL:
This cannot be used with direct collection mappings.
|
java.lang.String |
getReferenceClassName()
INTERNAL:
Returns the reference class name.
|
ClassDescriptor |
getReferenceDescriptor()
INTERNAL:
There is none on direct collection.
|
java.util.Vector |
getReferenceKeyFieldNames()
INTERNAL:
Return the reference key field names associated with the mapping.
|
java.util.Vector<DatabaseField> |
getReferenceKeyFields()
INTERNAL:
Return the reference key fields.
|
DatabaseTable |
getReferenceTable()
INTERNAL:
Return the direct table.
|
java.lang.String |
getReferenceTableName()
PUBLIC:
Returns the name of the reference table
|
java.lang.String |
getReferenceTableQualifiedName()
PUBLIC:
Returns the qualified name of the reference table
|
DatabaseMapping |
getRelationshipPartner()
INTERNAL:
Return the relationshipPartner mapping for this bi-directional mapping.
|
java.util.Vector |
getSourceKeyFieldNames()
PUBLIC:
Return the source key field names associated with the mapping.
|
java.util.Vector<DatabaseField> |
getSourceKeyFields()
INTERNAL:
Return the source key fields.
|
Converter |
getValueConverter()
PUBLIC:
Return the converter on the mapping.
|
protected boolean |
hasCustomDeleteQuery() |
protected boolean |
hasCustomInsertQuery() |
void |
initialize(AbstractSession session)
INTERNAL:
Initialize and validate the mapping properties.
|
protected void |
initializeDeleteAllQuery(AbstractSession session)
Initialize delete all query.
|
protected void |
initializeDeleteQuery(AbstractSession session) |
protected void |
initializeDirectField(AbstractSession session)
The field name on the reference table is initialized and cached.
|
protected void |
initializeInsertQuery(AbstractSession session)
Initialize insert query.
|
protected void |
initializeReferenceDescriptor(AbstractSession session)
There is no reference descriptor
|
protected void |
initializeReferenceKeys(AbstractSession session)
The reference keys on the reference table are initalized
|
protected void |
initializeReferenceTable(AbstractSession session) |
protected void |
initializeSelectionCriteria(AbstractSession session) |
protected void |
initializeSelectionQuery(AbstractSession session)
The selection query is initialized
|
protected void |
initializeSelectionStatement(AbstractSession session) |
protected void |
initializeSourceKeys(AbstractSession session)
The source keys are initalized
|
protected void |
initializeSourceKeysWithDefaults(AbstractSession session)
INTERNAL:
If a user does not specify the source key then the primary keys of the source table are used.
|
boolean |
isCascadedLockingSupported()
INTERNAL
Return true if this mapping supports cascaded version optimistic locking.
|
boolean |
isChangeTrackingSupported()
INTERNAL:
Return if this mapping supports change tracking.
|
boolean |
isDirectCollectionMapping()
INTERNAL:
|
protected boolean |
isKeyForSourceSpecified()
INTERNAL:
Checks if source and target keys are mentioned by the user or not.
|
boolean |
isPrivateOwned()
INTERNAL:
Return true if referenced objects are provately owned else false.
|
boolean |
isRelationalMapping()
INTERNAL:
All relational mappings should implement this method to return true.
|
void |
iterateOnElement(DescriptorIterator iterator,
java.lang.Object element)
INTERNAL:
Iterate on the specified element.
|
void |
iterateOnRealAttributeValue(DescriptorIterator iterator,
java.lang.Object realAttributeValue)
INTERNAL:
Iterate on the attribute value.
|
void |
mergeChangesIntoObject(java.lang.Object target,
ChangeRecord changeRecord,
java.lang.Object source,
MergeManager mergeManager)
INTERNAL:
Merge changes from the source to the target object.
|
void |
mergeIntoObject(java.lang.Object target,
boolean isTargetUnInitialized,
java.lang.Object source,
MergeManager mergeManager)
INTERNAL:
Merge changes from the source to the target object.
|
void |
performDataModificationEvent(java.lang.Object[] event,
AbstractSession session)
INTERNAL:
Perform the commit event.
|
void |
postInsert(WriteObjectQuery query)
INTERNAL:
Insert the private owned object.
|
void |
postUpdate(WriteObjectQuery writeQuery)
INTERNAL:
Update private owned part.
|
protected void |
postUpdateWithChangeSet(WriteObjectQuery writeQuery)
INTERNAL:
Update private owned part.
|
void |
preDelete(WriteObjectQuery query)
INTERNAL:
Delete private owned part.
|
protected void |
prepareTranslationRow(AbstractRecord translationRow,
java.lang.Object object,
AbstractSession session)
INTERNAL:
The translation row may require additional fields than the primary key if the mapping in not on the primary key.
|
void |
removeFromCollectionChangeRecord(java.lang.Object newKey,
java.lang.Object newValue,
ObjectChangeSet objectChangeSet,
UnitOfWorkImpl uow)
INTERNAL:
Remove a value and its change set from the collection change record.
|
void |
setContainerPolicy(ContainerPolicy containerPolicy)
ADVANCED:
Configure the mapping to use a container policy.
|
void |
setCustomDeleteQuery(ModifyQuery query)
PUBLIC:
The default delete query for this mapping can be overridden by specifying the new query.
|
void |
setCustomInsertQuery(DataModifyQuery query)
PUBLIC:
The default insert query for mapping can be overridden by specifying the new query.
|
protected void |
setDeleteQuery(ModifyQuery query) |
void |
setDeleteSQLString(java.lang.String sqlString)
PUBLIC:
Set the receiver's delete SQL string.
|
void |
setDirectField(DatabaseField field)
PUBLIC:
Set the direct field in the reference table.
|
void |
setDirectFieldClassification(java.lang.Class fieldType)
ADVANCED:
Set the class type of the field value.
|
void |
setDirectFieldName(java.lang.String fieldName)
PUBLIC:
Set the direct field name in the reference table.
|
protected void |
setHasCustomDeleteQuery(boolean bool) |
protected void |
setHasCustomInsertQuery(boolean bool) |
protected void |
setInsertQuery(DataModifyQuery insertQuery) |
void |
setInsertSQLString(java.lang.String sqlString)
PUBLIC:
Set the receiver's insert SQL string.
|
void |
setReferenceClass(java.lang.Class referenceClass)
INTERNAL:
This cannot be used with direct collection mappings.
|
void |
setReferenceClassName(java.lang.String referenceClassName)
INTERNAL:
Used by MW.
|
void |
setReferenceKeyFieldName(java.lang.String fieldName)
PUBLIC:
Set the name of the reference key field.
|
void |
setReferenceKeyFieldNames(java.util.Vector fieldNames)
INTERNAL:
Set the reference key field names associated with the mapping.
|
void |
setReferenceKeyFields(java.util.Vector<DatabaseField> aVector)
INTERNAL:
Set the reference fields.
|
void |
setReferenceTable(DatabaseTable table)
INTERNAL:
Set the reference table.
|
void |
setReferenceTableName(java.lang.String tableName)
PUBLIC:
Set the reference table name.
|
void |
setSessionName(java.lang.String name)
PUBLIC:
Set the name of the session to execute the mapping's queries under.
|
void |
setSourceKeyFieldNames(java.util.Vector fieldNames)
INTERNAL:
Set the source key field names associated with the mapping.
|
void |
setSourceKeyFields(java.util.Vector<DatabaseField> sourceKeyFields)
INTERNAL:
Set the source fields.
|
void |
setValueConverter(Converter valueConverter)
PUBLIC:
Set the converter on the mapping.
|
void |
simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object objectToAdd,
ObjectChangeSet changeSet,
AbstractSession session)
ADVANCED:
This method is used to have an object add to a collection once the changeSet is applied
The referenceKey parameter should only be used for direct Maps.
|
void |
simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object objectToRemove,
ObjectChangeSet changeSet,
AbstractSession session)
ADVANCED:
This method is used to have an object removed from a collection once the changeSet is applied
The referenceKey parameter should only be used for direct Maps.
|
void |
updateChangeRecord(java.lang.Object clone,
java.lang.Object newValue,
java.lang.Object oldValue,
ObjectChangeSet objectChangeSet,
UnitOfWorkImpl uow)
INTERNAL:
Either create a new change record or update with the new value.
|
void |
useCollectionClass(java.lang.Class concreteClass)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useMapClass(java.lang.Class concreteClass,
java.lang.String methodName)
PUBLIC:
It is illegal to use a Map as the container of a DirectCollectionMapping.
|
java.lang.Object |
valueFromRow(AbstractRecord row,
JoinedAttributeManager joinManager,
ObjectBuildingQuery query,
AbstractSession session)
INTERNAL:
Return the value of the reference attribute or a value holder.
|
boolean |
verifyDelete(java.lang.Object object,
AbstractSession session)
INTERNAL:
Checks if object is deleted from the database or not.
|
addAggregateOrderBy, addAscendingOrdering, addDescendingOrdering, addOrderBy, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, cascadeMerge, compareObjectsAndWrite, compareObjectsWithoutPrivateOwned, compareObjectsWithPrivateOwned, getContainerPolicy, getDeleteAllQuery, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, hasCustomDeleteAllQuery, hasOrderBy, isCollectionMapping, objectAddedDuringUpdate, objectRemovedDuringUpdate, objectUnchangedDuringUpdate, objectUnchangedDuringUpdate, readPrivateOwnedForObject, setCustomDeleteAllQuery, setDeleteAllCall, setDeleteAllQuery, setDeleteAllSQLString, setHasCustomDeleteAllQuery, shouldUseValueFromRowWithJoin, useMapClass, useSortedSetClass, useTransparentCollection, useTransparentList, useTransparentMap, useTransparentSet, validateBeforeInitialization, valueFromRowInternalWithJoin
buildBackupClone, buildClone, buildCloneFromRow, createUnitOfWorkValueHolder, dontDoMerge, dontUseIndirection, getAttributeValueFromObject, getAttributeValueWithClonedValueHolders, getIndirectionPolicy, getJoinCriteria, getRelationshipPartnerAttributeName, getSelectionCriteria, getSelectionQuery, getTempSession, hasCustomSelectionQuery, isAttributeValueInstantiated, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, isForeignReferenceMapping, iterate, prepareHistoricalQuery, prepareNestedJoins, privateOwnedRelationship, setCascadeAll, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setHasCustomSelectionQuery, setIndirectionPolicy, setIsPrivateOwned, setRealAttributeValueInObject, setReferenceDescriptor, setRelationshipPartner, setRelationshipPartnerAttributeName, setSelectionCall, setSelectionCriteria, setSelectionQuery, setSelectionSQLString, setTempSession, setUsesIndirection, shouldInitializeSelectionCriteria, shouldMergeCascadeParts, shouldMergeCascadeReference, shouldObjectModifyCascadeToParts, shouldObjectModifyCascadeToPartsForPreDelete, trimRowForJoin, trimRowForJoin, useBasicIndirection, usesIndirection, useWeavedIndirection, valueFromRowInternal
buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, cloneFields, collectFields, extractNestedExpressions, getAttributeAccessor, getAttributeClassification, getAttributeName, getDescriptor, getField, getFieldClassification, getFields, getGetMethodName, getProperties, getProperty, getReferenceClassDescriptor, getSetMethodName, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCloningRequired, isDatabaseMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isJoiningSupported, isManyToManyMapping, isNestedTableMapping, isObjectReferenceMapping, isObjectTypeMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isReferenceMapping, isRemotelyInitialized, isSerializedObjectMapping, isStructureMapping, isTransformationMapping, isTypeConversionMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, postDelete, postInitialize, preInitialize, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromRowIntoObject, readFromRowIntoObject, readOnly, readWrite, rehashFieldDependancies, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setDescriptor, setFields, setGetMethodName, setIsOptional, setIsPrimaryKeyMapping, setIsReadOnly, setProperties, setProperty, setSetMethodName, setWeight, toString, validateAfterInitialization, valueFromObject, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRow, writeFromObjectIntoRowForShallowDelete, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRow
protected static final java.lang.String Delete
protected static final java.lang.String Insert
protected static final java.lang.String DeleteAll
protected Converter valueConverter
protected transient DatabaseTable referenceTable
protected transient DatabaseField directField
protected transient java.util.Vector<DatabaseField> sourceKeyFields
protected transient java.util.Vector<DatabaseField> referenceKeyFields
protected transient DataModifyQuery insertQuery
protected transient ModifyQuery changeSetDeleteQuery
protected transient boolean hasCustomDeleteQuery
protected transient boolean hasCustomInsertQuery
public DirectCollectionMapping()
public boolean isRelationalMapping()
DatabaseMapping
isRelationalMapping
in class DatabaseMapping
public Converter getValueConverter()
public void setValueConverter(Converter valueConverter)
public void addReferenceKeyField(DatabaseField referenceForeignKeyField, DatabaseField sourcePrimaryKeyField)
public void addReferenceKeyFieldName(java.lang.String referenceForeignKeyFieldName, java.lang.String sourcePrimaryKeyFieldName)
public void buildCopy(java.lang.Object copy, java.lang.Object original, ObjectCopyingPolicy policy)
buildCopy
in class CollectionMapping
protected java.lang.Object buildElementClone(java.lang.Object element, UnitOfWorkImpl unitOfWork, boolean isExisting)
buildElementClone
in class CollectionMapping
public void cascadePerformRemoveIfRequired(java.lang.Object object, UnitOfWorkImpl uow, IdentityHashtable visitedObjects)
cascadePerformRemoveIfRequired
in class CollectionMapping
public void cascadeRegisterNewIfRequired(java.lang.Object object, UnitOfWorkImpl uow, IdentityHashtable visitedObjects)
cascadeRegisterNewIfRequired
in class CollectionMapping
public java.lang.Object clone()
clone
in class ForeignReferenceMapping
public void compareCollectionsForChange(java.lang.Object oldCollection, java.lang.Object newCollection, ChangeRecord changeRecord, AbstractSession session)
compareCollectionsForChange
in class CollectionMapping
public ChangeRecord compareForChange(java.lang.Object clone, java.lang.Object backUp, ObjectChangeSet owner, AbstractSession session)
compareForChange
in class CollectionMapping
public boolean compareObjects(java.lang.Object firstObject, java.lang.Object secondObject, AbstractSession session)
compareObjects
in class CollectionMapping
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
convertClassNamesToClasses
in class CollectionMapping
classLoader
- protected java.util.Vector extractKeyFromReferenceRow(AbstractRecord row, AbstractSession session)
protected java.util.Vector extractPrimaryKeyFromRow(AbstractRecord row, AbstractSession session)
protected ModifyQuery getDeleteQuery()
public DatabaseField getDirectField()
public java.lang.String getDirectFieldName()
protected DataModifyQuery getInsertQuery()
public java.lang.Class getReferenceClass()
getReferenceClass
in class ForeignReferenceMapping
public java.lang.String getReferenceClassName()
ForeignReferenceMapping
getReferenceClassName
in class ForeignReferenceMapping
public ClassDescriptor getReferenceDescriptor()
getReferenceDescriptor
in class ForeignReferenceMapping
public java.util.Vector getReferenceKeyFieldNames()
public java.util.Vector<DatabaseField> getReferenceKeyFields()
public DatabaseTable getReferenceTable()
public java.lang.String getReferenceTableName()
public java.lang.String getReferenceTableQualifiedName()
public DatabaseMapping getRelationshipPartner()
getRelationshipPartner
in class ForeignReferenceMapping
public java.util.Vector getSourceKeyFieldNames()
public java.util.Vector<DatabaseField> getSourceKeyFields()
protected boolean hasCustomDeleteQuery()
protected boolean hasCustomInsertQuery()
public void initialize(AbstractSession session) throws DescriptorException
initialize
in class CollectionMapping
DescriptorException
protected void initializeDeleteAllQuery(AbstractSession session)
protected void initializeDeleteQuery(AbstractSession session)
protected void initializeDirectField(AbstractSession session) throws DescriptorException
DescriptorException
protected void initializeInsertQuery(AbstractSession session)
protected void initializeReferenceDescriptor(AbstractSession session)
initializeReferenceDescriptor
in class ForeignReferenceMapping
protected void initializeReferenceKeys(AbstractSession session) throws DescriptorException
DescriptorException
protected void initializeReferenceTable(AbstractSession session) throws DescriptorException
DescriptorException
protected void initializeSelectionCriteria(AbstractSession session)
protected void initializeSelectionQuery(AbstractSession session)
initializeSelectionQuery
in class ForeignReferenceMapping
protected void initializeSelectionStatement(AbstractSession session)
protected void initializeSourceKeys(AbstractSession session)
protected void initializeSourceKeysWithDefaults(AbstractSession session)
public boolean isDirectCollectionMapping()
isDirectCollectionMapping
in class DatabaseMapping
protected boolean isKeyForSourceSpecified()
public boolean isPrivateOwned()
isPrivateOwned
in class ForeignReferenceMapping
public void iterateOnRealAttributeValue(DescriptorIterator iterator, java.lang.Object realAttributeValue)
iterateOnRealAttributeValue
in class CollectionMapping
public void iterateOnElement(DescriptorIterator iterator, java.lang.Object element)
iterateOnElement
in class CollectionMapping
public void mergeChangesIntoObject(java.lang.Object target, ChangeRecord changeRecord, java.lang.Object source, MergeManager mergeManager)
mergeChangesIntoObject
in class CollectionMapping
public void mergeIntoObject(java.lang.Object target, boolean isTargetUnInitialized, java.lang.Object source, MergeManager mergeManager)
mergeIntoObject
in class CollectionMapping
public void performDataModificationEvent(java.lang.Object[] event, AbstractSession session) throws DatabaseException, DescriptorException
performDataModificationEvent
in class DatabaseMapping
DatabaseException
DescriptorException
public void postInsert(WriteObjectQuery query) throws DatabaseException
postInsert
in class DatabaseMapping
DatabaseException
public void postUpdate(WriteObjectQuery writeQuery) throws DatabaseException
postUpdate
in class DatabaseMapping
DatabaseException
protected void postUpdateWithChangeSet(WriteObjectQuery writeQuery) throws DatabaseException
DatabaseException
public void preDelete(WriteObjectQuery query) throws DatabaseException
preDelete
in class DatabaseMapping
DatabaseException
protected void prepareTranslationRow(AbstractRecord translationRow, java.lang.Object object, AbstractSession session)
prepareTranslationRow
in class CollectionMapping
protected void setDeleteQuery(ModifyQuery query)
public void setDeleteSQLString(java.lang.String sqlString)
public void setContainerPolicy(ContainerPolicy containerPolicy)
setContainerPolicy
in interface ContainerMapping
setContainerPolicy
in class CollectionMapping
public void setCustomDeleteQuery(ModifyQuery query)
public void setCustomInsertQuery(DataModifyQuery query)
public void setDirectField(DatabaseField field)
public void setDirectFieldClassification(java.lang.Class fieldType)
public void setDirectFieldName(java.lang.String fieldName)
protected void setHasCustomDeleteQuery(boolean bool)
protected void setHasCustomInsertQuery(boolean bool)
protected void setInsertQuery(DataModifyQuery insertQuery)
public void setInsertSQLString(java.lang.String sqlString)
public void setReferenceClass(java.lang.Class referenceClass)
setReferenceClass
in class ForeignReferenceMapping
public void setReferenceClassName(java.lang.String referenceClassName)
ForeignReferenceMapping
setReferenceClassName
in class ForeignReferenceMapping
public void setReferenceKeyFieldName(java.lang.String fieldName)
public void setReferenceKeyFieldNames(java.util.Vector fieldNames)
public void setReferenceKeyFields(java.util.Vector<DatabaseField> aVector)
public void setReferenceTable(DatabaseTable table)
public void setReferenceTableName(java.lang.String tableName)
public void setSessionName(java.lang.String name)
setSessionName
in class CollectionMapping
public void setSourceKeyFieldNames(java.util.Vector fieldNames)
public void setSourceKeyFields(java.util.Vector<DatabaseField> sourceKeyFields)
public void calculateDeferredChanges(ChangeRecord changeRecord, AbstractSession session)
calculateDeferredChanges
in class CollectionMapping
public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object objectToAdd, ObjectChangeSet changeSet, AbstractSession session)
simpleAddToCollectionChangeRecord
in class CollectionMapping
public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object objectToRemove, ObjectChangeSet changeSet, AbstractSession session)
simpleRemoveFromCollectionChangeRecord
in class CollectionMapping
public void updateChangeRecord(java.lang.Object clone, java.lang.Object newValue, java.lang.Object oldValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow)
updateChangeRecord
in class CollectionMapping
public void useCollectionClass(java.lang.Class concreteClass)
jdk1.2.x: The container class must implement (directly or indirectly) the Collection interface.
jdk1.1.x: The container class must be a subclass of Vector.
useCollectionClass
in interface ContainerMapping
useCollectionClass
in class CollectionMapping
public void useMapClass(java.lang.Class concreteClass, java.lang.String methodName)
useMapClass
in interface ContainerMapping
useMapClass
in class CollectionMapping
DirectMapMapping
public java.lang.Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, AbstractSession session) throws DatabaseException
valueFromRow
in class ForeignReferenceMapping
DatabaseException
public boolean verifyDelete(java.lang.Object object, AbstractSession session) throws DatabaseException
verifyDelete
in class CollectionMapping
DatabaseException
public void addToCollectionChangeRecord(java.lang.Object newKey, java.lang.Object newValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow)
addToCollectionChangeRecord
in class CollectionMapping
public boolean isCascadedLockingSupported()
isCascadedLockingSupported
in class DatabaseMapping
public boolean isChangeTrackingSupported()
isChangeTrackingSupported
in class CollectionMapping
public void removeFromCollectionChangeRecord(java.lang.Object newKey, java.lang.Object newValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow)
removeFromCollectionChangeRecord
in class CollectionMapping