Methods Summary |
---|
public void | addToCollectionChangeRecord(java.lang.Object newKey, java.lang.Object newValue, oracle.toplink.essentials.internal.sessions.ObjectChangeSet objectChangeSet, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl uow)INTERNAL:
Add a new value and its change set to the collection change record. This is used by
attribute change tracking.
throw DescriptorException.invalidMappingOperation(this, "addToCollectionChangeRecord");
|
public abstract void | buildBackupClone(java.lang.Object clone, java.lang.Object backup, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork)INTERNAL:
Clone the attribute from the clone and assign it to the backup.
|
public java.lang.Object | buildBackupCloneForPartObject(java.lang.Object attributeValue, java.lang.Object clone, java.lang.Object backup, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork)INTERNAL:
Require for cloning, the part must be cloned.
throw DescriptorException.invalidMappingOperation(this, "buildBackupCloneForPartObject");
|
public oracle.toplink.essentials.internal.sessions.ChangeRecord | buildChangeRecord(java.lang.Object newValue, oracle.toplink.essentials.internal.sessions.ObjectChangeSet owner, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Directly build a change record without comparison
throw DescriptorException.invalidMappingOperation(this, "buildChangeRecord");
|
public abstract void | buildClone(java.lang.Object original, java.lang.Object clone, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork, oracle.toplink.essentials.internal.queryframework.JoinedAttributeManager joinedAttributeManager)INTERNAL:
Clone the attribute from the original and assign it to the clone.
|
public java.lang.Object | buildCloneForPartObject(java.lang.Object attributeValue, java.lang.Object original, java.lang.Object clone, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork, boolean isExisting)INTERNAL:
Require for cloning, the part must be cloned.
throw DescriptorException.invalidMappingOperation(this, "buildCloneForPartObject");
|
public abstract void | buildCloneFromRow(oracle.toplink.essentials.internal.sessions.AbstractRecord databaseRow, oracle.toplink.essentials.internal.queryframework.JoinedAttributeManager joinManager, java.lang.Object clone, oracle.toplink.essentials.queryframework.ObjectBuildingQuery sourceQuery, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork, oracle.toplink.essentials.internal.sessions.AbstractSession executionSession)INTERNAL:
A combination of readFromRowIntoObject and buildClone.
buildClone assumes the attribute value exists on the original and can
simply be copied.
readFromRowIntoObject assumes that one is building an original.
Both of the above assumptions are false in this method, and actually
attempts to do both at the same time.
Extract value from the row and set the attribute to this value in the
working copy clone.
In order to bypass the shared cache when in transaction a UnitOfWork must
be able to populate working copies directly from the row.
|
public void | buildCopy(java.lang.Object copy, java.lang.Object original, oracle.toplink.essentials.sessions.ObjectCopyingPolicy policy)INTERNAL:
Copy of the attribute of the object.
This is NOT used for unit of work but for templatizing an object.
|
public oracle.toplink.essentials.expressions.Expression | buildObjectJoinExpression(oracle.toplink.essentials.expressions.Expression base, oracle.toplink.essentials.expressions.Expression argument, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Used to allow object level comparisons.
throw QueryException.unsupportedMappingForObjectComparison(this, base);
|
public oracle.toplink.essentials.expressions.Expression | buildObjectJoinExpression(oracle.toplink.essentials.expressions.Expression base, java.lang.Object value, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Used to allow object level comparisons.
throw QueryException.unsupportedMappingForObjectComparison(this, base);
|
public void | buildShallowOriginalFromRow(oracle.toplink.essentials.internal.sessions.AbstractRecord databaseRow, java.lang.Object original, oracle.toplink.essentials.queryframework.ObjectBuildingQuery query, oracle.toplink.essentials.internal.sessions.AbstractSession executionSession)INTERNAL:
Builds a shallow original object. Only direct attributes and primary
keys are populated. In this way the minimum original required for
instantiating a working copy clone can be built without placing it in
the shared cache (no concern over cycles).
return;
|
public void | calculateDeferredChanges(oracle.toplink.essentials.internal.sessions.ChangeRecord changeRecord, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes
as apposed to detected changes. If an attribute can not be change tracked it's
changes can be detected through this process.
throw DescriptorException.invalidMappingOperation(this, "calculatedDeferredChanges");
|
public void | cascadeMerge(java.lang.Object sourceElement, oracle.toplink.essentials.internal.sessions.MergeManager mergeManager)INTERNAL:
Cascade the merge to the component object, if appropriate.
throw DescriptorException.invalidMappingOperation(this, "cascadeMerge");
|
public abstract void | cascadePerformRemoveIfRequired(java.lang.Object object, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl uow, oracle.toplink.essentials.internal.helper.IdentityHashtable visitedObjects)INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
public abstract void | cascadeRegisterNewIfRequired(java.lang.Object object, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl uow, oracle.toplink.essentials.internal.helper.IdentityHashtable visitedObjects)INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
public java.lang.Object | clone()INTERNAL:
Clones itself.
// Bug 3037701 - clone the AttributeAccessor
DatabaseMapping mapping = null;
try {
mapping = (DatabaseMapping)super.clone();
} catch (CloneNotSupportedException e) {
throw new InternalError();
}
mapping.setAttributeAccessor((AttributeAccessor)attributeAccessor.clone());
return mapping;
|
protected java.util.Vector | cloneFields(java.util.Vector fields)INTERNAL:
Helper method to clone vector of fields (used in aggregate initialization cloning).
Vector clonedFields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
for (Enumeration fieldsEnum = fields.elements(); fieldsEnum.hasMoreElements();) {
clonedFields.addElement(((DatabaseField)fieldsEnum.nextElement()).clone());
}
return clonedFields;
|
protected java.util.Vector | collectFields()This method must be overwritten in the subclasses to return a vector of all the
fields this mapping represents.
return NO_FIELDS;
|
public abstract oracle.toplink.essentials.internal.sessions.ChangeRecord | compareForChange(java.lang.Object clone, java.lang.Object backup, oracle.toplink.essentials.internal.sessions.ObjectChangeSet owner, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
This method was created in VisualAge.
|
public abstract boolean | compareObjects(java.lang.Object firstObject, java.lang.Object secondObject, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Compare the attributes belonging to this mapping for the objects.
|
public 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.
|
public oracle.toplink.essentials.internal.indirection.UnitOfWorkValueHolder | createUnitOfWorkValueHolder(oracle.toplink.essentials.indirection.ValueHolderInterface attributeValue, java.lang.Object original, java.lang.Object clone, oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork, boolean buildDirectlyFromRow)INTERNAL:
Builder the unit of work value holder.
throw DescriptorException.invalidMappingOperation(this, "createUnitOfWorkValueHolder");
|
protected java.util.Vector | extractNestedExpressions(java.util.List expressions, oracle.toplink.essentials.expressions.ExpressionBuilder newRoot, boolean rootExpressionsAllowed)INTERNAL:
Extract the nested attribute expressions that apply to this mapping.
This is used for partial objects and joining.
Vector nestedExpressions = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(expressions.size());
for (Iterator expressionsEnum = expressions.iterator();
expressionsEnum.hasNext();) {
Expression next = (Expression)expressionsEnum.next();
// The expressionBuilder can be one of the locked expressions in
// the ForUpdateOfClause.
if (!next.isQueryKeyExpression()) {
continue;
}
QueryKeyExpression expression = (QueryKeyExpression)next;
QueryKeyExpression base = expression;
boolean afterBase = false;
while (!base.getBaseExpression().isExpressionBuilder()) {
afterBase = true;
base = (QueryKeyExpression)base.getBaseExpression();
}
if (afterBase && base.getName().equals(getAttributeName())) {
nestedExpressions.addElement(expression.rebuildOn(base, newRoot));
} else if (rootExpressionsAllowed && expression.getBaseExpression().isExpressionBuilder() && expression.getName().equals(getAttributeName())) {
nestedExpressions.addElement(newRoot);
}
}
return nestedExpressions;
|
public oracle.toplink.essentials.mappings.AttributeAccessor | getAttributeAccessor()ADVANCED:
Return the attributeAccessor.
The attribute accessor is responsible for setting and retrieving the attribute value
from the object for this mapping.
return attributeAccessor;
|
public java.lang.Class | getAttributeClassification()PUBLIC:
The classification type for the attribute this mapping represents
return null;
|
public java.lang.String | getAttributeName()PUBLIC:
Return the name of the attribute set in the mapping.
return getAttributeAccessor().getAttributeName();
|
public java.lang.Object | getAttributeValueFromObject(java.lang.Object object)INTERNAL:
Return the value of an attribute which this mapping represents for an object.
try {
return getAttributeAccessor().getAttributeValueFromObject(object);
} catch (DescriptorException exception) {
exception.setMapping(this);
throw exception;
}
|
public oracle.toplink.essentials.internal.queryframework.ContainerPolicy | getContainerPolicy()INTERNAL:
Return the mapping's containerPolicy.
throw DescriptorException.invalidMappingOperation(this, "getContainerPolicy");
|
public oracle.toplink.essentials.descriptors.ClassDescriptor | getDescriptor()INTERNAL:
Return the descriptor to which this mapping belongs
return descriptor;
|
public oracle.toplink.essentials.internal.helper.DatabaseField | getField()INTERNAL:
Return the field associated with this mapping if there is exactly one.
This is required for object relational mapping to print them, but because
they are defined in Enterprise they cannot be cast to.
Mappings that have a field include direct mappings and object relational mappings.
return null;
|
public java.lang.Class | getFieldClassification(oracle.toplink.essentials.internal.helper.DatabaseField fieldToClassify)INTERNAL:
Return the classifiction for the field contained in the mapping.
This is used to convert the row value to a consistent java value.
By default this is unknown.
return null;
|
public java.util.Vector | getFields()INTERNAL:
Returns a vector of all the fields this mapping represents.
return this.fields;
|
public java.lang.String | getGetMethodName()PUBLIC:
This method is invoked reflectively on the reference object to return the value of the
attribute in the object. This method returns the name of the getMethodName or null if not using method access.
if (!(getAttributeAccessor() instanceof MethodAttributeAccessor)) {
return null;
}
return ((MethodAttributeAccessor)getAttributeAccessor()).getGetMethodName();
|
public java.util.Map | getProperties()INTERNAL:
used as a temporary store for custom SDK usage
if (properties == null) {//Lazy initialize to conserve space and allocation time.
properties = new HashMap(5);
}
return properties;
|
public java.lang.Object | getProperty(java.lang.Object property)INTERNAL:
used as a temporary store for custom SDK usage
if (properties == null) {
return null;
}
return getProperties().get(property);
|
public java.lang.Object | getRealAttributeValueFromObject(java.lang.Object object, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Return the value of an attribute unwrapping value holders if required.
return getAttributeValueFromObject(object);
|
public java.lang.Object | getRealCollectionAttributeValueFromObject(java.lang.Object object, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Return the value of an attribute, unwrapping value holders if necessary.
If the value is null, build a new container.
throw DescriptorException.invalidMappingOperation(this, "getRealCollectionAttributeValueFromObject");
|
public oracle.toplink.essentials.descriptors.ClassDescriptor | getReferenceClassDescriptor()PUBLIC:
Return the referenceDescriptor. This is a descriptor which is associated with
the reference class.
ClassDescriptor desc = getReferenceDescriptor();
if (desc instanceof ClassDescriptor) {
return (ClassDescriptor)desc;
} else {
throw ValidationException.cannotCastToClass(desc, desc.getClass(), ClassDescriptor.class);
}
|
public oracle.toplink.essentials.descriptors.ClassDescriptor | getReferenceDescriptor()INTERNAL:
Return the referenceDescriptor. This is a descriptor which is associated with
the reference class.
Replaced by {@link #getReferenceClassDescriptor()}
return null;
|
public oracle.toplink.essentials.mappings.DatabaseMapping | getRelationshipPartner()INTERNAL:
Return the relationshipPartner mapping for this bi-directional mapping. If the relationshipPartner is null then
this is a uni-directional mapping.
return null;
|
public java.lang.String | getSetMethodName()PUBLIC:
This method is invoked reflectively on the reference object to set the value of the
attribute in the object. This method returns the name of the setMethodName or null if not using method access.
if (!(getAttributeAccessor() instanceof MethodAttributeAccessor)) {
return null;
}
return ((MethodAttributeAccessor)getAttributeAccessor()).getSetMethodName();
|
public java.lang.Integer | getWeight()INTERNAL:
Return the weight of the mapping, used to sort mappings to ensure that
DirectToField Mappings get merged first
return this.weight;
|
public boolean | hasConstraintDependency()INTERNAL:
The returns if the mapping has any constraint dependencies, such as foreign keys and join tables.
return false;
|
public boolean | hasDependency()INTERNAL:
Return if the mapping has any ownership or other dependency over its target object(s).
return isPrivateOwned();
|
public boolean | hasInverseConstraintDependency()INTERNAL:
The returns if the mapping has any inverse constraint dependencies, such as foreign keys and join tables.
return false;
|
public void | initialize(oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Allow for initialization of properties and validation.
;
|
public boolean | isAbstractCompositeCollectionMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isAbstractCompositeDirectCollectionMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isAbstractCompositeObjectMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isAbstractDirectMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isAggregateCollectionMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isAggregateMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isAggregateObjectMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isCascadedLockingSupported()INTERNAL:
Used when determining if a mapping supports cascaded version optimistic
locking.
return false;
|
public boolean | isChangeTrackingSupported()INTERNAL:
Return if this mapping supports change tracking.
return false;
|
public boolean | isCloningRequired()INTERNAL:
Return if this mapping requires its attribute value to be cloned.
return true;
|
public boolean | isCollectionMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isDatabaseMapping()INTERNAL:
return true;
|
public boolean | isDirectCollectionMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isDirectMapMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isDirectToFieldMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isDirectToXMLTypeMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isEISMapping()INTERNAL:
All EIS mappings should implement this method to return true.
return false;
|
public boolean | isForeignReferenceMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isJoiningSupported()INTERNAL:
Return if this mapping support joining.
return false;
|
public boolean | isManyToManyMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isNestedTableMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isObjectReferenceMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isObjectTypeMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isOneToManyMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isOneToOneMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isOptional()INTERNAL:
Return whether the value of this mapping is optional (that is, can be
null). This is a hint and is used when generating DDL. It should be
disregarded for primitive types.
return isOptional;
|
public boolean | isPrimaryKeyMapping()INTERNAL:
Set by the Object builder during initialization returns true if this mapping
is used as a primary key mapping.
return this.primaryKeyMapping;
|
public boolean | isPrivateOwned()INTERNAL:
Return if the mapping has ownership over its target object(s).
return false;
|
public boolean | isReadOnly()INTERNAL:
Returns true if mapping is read only else false.
return isReadOnly;
|
public boolean | isReferenceMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isRelationalMapping()INTERNAL:
All relational mappings should implement this method to return true.
return false;
|
protected boolean | isRemotelyInitialized()
return isRemotelyInitialized;
|
public boolean | isSerializedObjectMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isStructureMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isTransformationMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isTypeConversionMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isUsingMethodAccess()PUBLIC:
Return if method access is used.
return getAttributeAccessor() instanceof MethodAttributeAccessor;
|
public boolean | isVariableOneToOneMapping()INTERNAL:
Related mapping should implement this method to return true.
return false;
|
public boolean | isWriteOnly()INTERNAL:
Some mappings support no attribute (transformation).
return false;
|
public boolean | isXMLMapping()INTERNAL:
All relational mappings should implement this method to return true.
return false;
|
public abstract void | iterate(oracle.toplink.essentials.internal.descriptors.DescriptorIterator iterator)INTERNAL:
Iterate on the appropriate attribute value.
|
public void | iterateOnRealAttributeValue(oracle.toplink.essentials.internal.descriptors.DescriptorIterator iterator, java.lang.Object realAttributeValue)INTERNAL:
Iterate on the attribute value.
The value holder has already been processed.
throw DescriptorException.invalidMappingOperation(this, "iterateOnRealAttributeValue");
|
public abstract void | mergeChangesIntoObject(java.lang.Object target, oracle.toplink.essentials.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, oracle.toplink.essentials.internal.sessions.MergeManager mergeManager)INTERNAL:
Merge changes from the source to the target object.
|
public abstract void | mergeIntoObject(java.lang.Object target, boolean isTargetUninitialized, java.lang.Object source, oracle.toplink.essentials.internal.sessions.MergeManager mergeManager)INTERNAL:
Merge changes from the source to the target object.
|
public void | performDataModificationEvent(java.lang.Object[] event, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Perform the commit event.
This is used in the uow to delay data modifications.
throw DescriptorException.invalidDataModificationEvent(this);
|
public void | postDelete(oracle.toplink.essentials.queryframework.WriteObjectQuery query)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Recurse thru the parts to delete the reference objects after the actual object is deleted.
return;
|
public void | postInitialize(oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Allow for initialization of properties and validation that have dependecies no the descriptor
being initialized.
// Nothing by default.
|
public void | postInsert(oracle.toplink.essentials.queryframework.WriteObjectQuery query)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Recurse thru the parts to insert the reference objects after the actual object is inserted.
return;
|
public void | postUpdate(oracle.toplink.essentials.queryframework.WriteObjectQuery query)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Recurse thru the parts to update the reference objects after the actual object is updated.
return;
|
public void | preDelete(oracle.toplink.essentials.queryframework.WriteObjectQuery query)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Recurse thru the parts to delete the reference objects before the actual object is deleted.
return;
|
public void | preInitialize(oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Allow for initialization of properties and validation.
try {
getAttributeAccessor().initializeAttributes(getDescriptor().getJavaClass());
} catch (DescriptorException exception) {
exception.setMapping(this);
session.getIntegrityChecker().handleError(exception);
}
|
public void | preInsert(oracle.toplink.essentials.queryframework.WriteObjectQuery query)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Recurse thru the parts to insert the reference objects before the actual object is inserted.
return;
|
public void | preUpdate(oracle.toplink.essentials.queryframework.WriteObjectQuery query)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Recurse thru the parts to update the reference objects before the actual object is updated.
return;
|
public void | prepareCascadeLockingPolicy()INTERNAL:
A subclass that supports cascade version optimistic locking should
implement this method to properly prepare the locking policy for their
mapping type.
return;
|
public java.lang.Object | readFromRowIntoObject(oracle.toplink.essentials.internal.sessions.AbstractRecord databaseRow, oracle.toplink.essentials.internal.queryframework.JoinedAttributeManager joinManager, java.lang.Object targetObject, oracle.toplink.essentials.queryframework.ObjectBuildingQuery sourceQuery)INTERNAL:
Extract value from the row and set the attribute to this value in the object.
return value as this value will have been converted to the appropriate type for
the object.
// This version can be called directly for reading a sequence number
// field, a write lock value, or a return row into an object, and hence
// the query is just a placeholder. Getting the correct execution
// session will generate an exception, so just pass in any session.
// In general call this version only if no field conversion needed.
return readFromRowIntoObject(databaseRow, joinManager, targetObject, sourceQuery, sourceQuery.getSession());
|
public java.lang.Object | readFromRowIntoObject(oracle.toplink.essentials.internal.sessions.AbstractRecord databaseRow, oracle.toplink.essentials.internal.queryframework.JoinedAttributeManager joinManager, java.lang.Object targetObject, oracle.toplink.essentials.queryframework.ObjectBuildingQuery sourceQuery, oracle.toplink.essentials.internal.sessions.AbstractSession executionSession)INTERNAL:
Extract value from the row and set the attribute to this value in the object.
return value as this value will have been converted to the appropriate type for
the object.
Object attributeValue = valueFromRow(databaseRow, joinManager, sourceQuery, executionSession);
setAttributeValueInObject(targetObject, attributeValue);
return attributeValue;
|
public void | readOnly()PUBLIC:
To make mapping read only.
Read-only mappings can be used if two attributes map to the same field.
Read-only mappings cannot be used for the primary key or other required fields.
setIsReadOnly(true);
|
public void | readWrite()PUBLIC:
The mapping can be dynamically made either readOnly or readWriteOnly. This makes mapping go back to
default mode.
setIsReadOnly(false);
|
public void | rehashFieldDependancies(oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Rehash any hashtables based on fields.
This is used to clone descriptors for aggregates, which hammer field names,
it is probably better not to hammer the field name and this should be refactored.
// Should be overwritten by any mapping with fields.
|
public void | removeFromCollectionChangeRecord(java.lang.Object newKey, java.lang.Object newValue, oracle.toplink.essentials.internal.sessions.ObjectChangeSet objectChangeSet, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl uow)INTERNAL:
Remove a value and its change set from the collection change record. This is used by
attribute change tracking.
throw DescriptorException.invalidMappingOperation(this, "removeFromCollectionChangeRecord");
|
public void | setAttributeAccessor(oracle.toplink.essentials.mappings.AttributeAccessor attributeAccessor)ADVANCED:
Set the attributeAccessor.
The attribute accessor is responsible for setting and retrieving the attribute value
from the object for this mapping.
This can be set to an implementor of AttributeAccessor if the attribute
requires advanced conversion of the mapping value, or a real attribute does not exist.
String attributeName = getAttributeName();
this.attributeAccessor = attributeAccessor;
if (attributeAccessor.getAttributeName() == null) {
attributeAccessor.setAttributeName(attributeName);
}
|
public void | setAttributeName(java.lang.String attributeName)PUBLIC:
Sets the name of the attribute in the mapping.
getAttributeAccessor().setAttributeName(attributeName);
|
public void | setAttributeValueInObject(java.lang.Object object, java.lang.Object value)INTERNAL:
Set the value of the attribute mapped by this mapping.
// PERF: Direct variable access.
try {
this.attributeAccessor.setAttributeValueInObject(object, value);
} catch (DescriptorException exception) {
exception.setMapping(this);
throw exception;
}
|
public void | setDescriptor(oracle.toplink.essentials.descriptors.ClassDescriptor descriptor)INTERNAL:
Set the descriptor to which this mapping belongs
this.descriptor = descriptor;
|
protected void | setFields(java.util.Vector fields)INTERNAL:
Set the mapping's field collection.
this.fields = fields;
|
public void | setGetMethodName(java.lang.String methodName)PUBLIC:
This method is invoked reflectively on the reference object to return the value of the
attribute in the object. This method sets the name of the getMethodName.
if (methodName == null) {
return;
}
// This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor
if (getAttributeAccessor() instanceof InstanceVariableAttributeAccessor) {
String attributeName = this.attributeAccessor.getAttributeName();
setAttributeAccessor(new MethodAttributeAccessor());
getAttributeAccessor().setAttributeName(attributeName);
}
((MethodAttributeAccessor)getAttributeAccessor()).setGetMethodName(methodName);
|
public void | setIsOptional(boolean isOptional)INTERNAL:
Used to specify whether the value of this mapping may be null. It is
used when generating DDL.
this.isOptional = isOptional;
|
public void | setIsPrimaryKeyMapping(boolean pkMapping)INTERNAL:
Set by the Object builder during initialization returns true if this mapping
is used as a primary key mapping.
this.primaryKeyMapping = pkMapping;
|
public void | setIsReadOnly(boolean aBoolean)PUBLIC:
Set this mapping to be read only.
Read-only mappings can be used if two attributes map to the same field.
Read-only mappings cannot be used for the primary key or other required fields.
isReadOnly = aBoolean;
|
public void | setProperties(java.util.Map properties)INTERNAL:
used as a temporary store for custom SDK usage
this.properties = properties;
|
public void | setProperty(java.lang.Object property, java.lang.Object value)ADVANCED:
Allow user defined properties.
getProperties().put(property, value);
|
public void | setRealAttributeValueInObject(java.lang.Object object, java.lang.Object value)INTERNAL:
Set the value of the attribute mapped by this mapping,
placing it inside a value holder if necessary.
try {
this.setAttributeValueInObject(object, value);
} catch (DescriptorException exception) {
exception.setMapping(this);
throw exception;
}
|
public void | setSetMethodName(java.lang.String methodName)PUBLIC:
This method is invoked reflectively on the reference object to get the value of the attribute.
The method defined on the object should actually return the value that needs to be set in the
attribute accessor.
if (methodName == null) {
return;
}
// This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor
if (!(getAttributeAccessor() instanceof MethodAttributeAccessor)) {
String attributeName = this.attributeAccessor.getAttributeName();
setAttributeAccessor(new MethodAttributeAccessor());
getAttributeAccessor().setAttributeName(attributeName);
}
((MethodAttributeAccessor)getAttributeAccessor()).setSetMethodName(methodName);
|
public void | setWeight(java.lang.Integer newWeight)ADVANCED:
Set the weight of the mapping, used to sort mappings
DirectToField Mappings have a default weight of 1 while all other Mappings have a
default weight of MAXINT. Ordering of Mappings can be achieved by setting the weight of
a particular mapping to a value within the above mentioned limits. By ordering mappings
the user can control what order relationships are processed by TopLink.
this.weight = newWeight;
|
public void | simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, oracle.toplink.essentials.internal.sessions.ObjectChangeSet changeSet, oracle.toplink.essentials.internal.sessions.AbstractSession session)ADVANCED:
This method is used to add an object to a collection once the changeSet is applied.
The referenceKey parameter should only be used for direct Maps.
throw DescriptorException.invalidMappingOperation(this, "simpleAddToCollectionChangeRecord");
|
public void | simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, oracle.toplink.essentials.internal.sessions.ObjectChangeSet changeSet, oracle.toplink.essentials.internal.sessions.AbstractSession session)ADVANCED:
This method is used to remove an object from a collection once the changeSet is applied.
The referenceKey parameter should only be used for direct Maps.
throw DescriptorException.invalidMappingOperation(this, "simpleRemoveFromCollectionChangeRecord");
|
public java.lang.String | toString()INTERNAL:
Print the mapping attribute name, this is used in error messages.
return getClass().getName() + "[" + getAttributeName() + "]";
|
public void | updateChangeRecord(java.lang.Object clone, java.lang.Object newValue, java.lang.Object oldValue, oracle.toplink.essentials.internal.sessions.ObjectChangeSet objectChangeSet, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl uow)INTERNAL:
Either create a new change record or update the change record with the new value.
This is used by attribute change tracking.
throw DescriptorException.invalidMappingOperation(this, "updateChangeRecord");
|
public void | validateAfterInitialization(oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Allow for subclasses to perform validation.
|
public void | validateBeforeInitialization(oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Allow for subclasses to perform validation.
|
public java.lang.Object | valueFromObject(java.lang.Object anObject, oracle.toplink.essentials.internal.helper.DatabaseField field, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
A subclass should extract the value from the object for the field, if it does not map the field then
it should return null.
Return the Value from the object.
return null;
|
public java.lang.Object | valueFromRow(oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.queryframework.JoinedAttributeManager joinManager, oracle.toplink.essentials.queryframework.ObjectBuildingQuery query)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Returns the value for the mapping from the database row.
return valueFromRow(row, joinManager, query, query.getSession().getExecutionSession(query));
|
public java.lang.Object | valueFromRow(oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.queryframework.JoinedAttributeManager joinManager, oracle.toplink.essentials.queryframework.ObjectBuildingQuery query, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
return null;
|
public boolean | verifyDelete(java.lang.Object object, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
To verify if the specified object has been deleted or not.
return true;
|
public void | writeFromAttributeIntoRow(java.lang.Object attribute, oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Write the foreign key values from the attribute to the row.
// Do nothing by default.
|
public void | writeFromObjectIntoRow(java.lang.Object object, oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Write the attribute value from the object to the row.
// Do nothing by default.
|
public void | writeFromObjectIntoRowForShallowDelete(java.lang.Object object, oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
This row is built for shallow delete which happens in case of circular dependencies for bidirectional deletes.
// Do nothing by default.
|
public void | writeFromObjectIntoRowForShallowInsert(java.lang.Object object, oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
This row is built for shallow insert which happens in case of of circular dependencies bidirectional inserts.
writeFromObjectIntoRow(object, row, session);
|
public void | writeFromObjectIntoRowForShallowInsertWithChangeRecord(oracle.toplink.essentials.internal.sessions.ChangeRecord changeRecord, oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
This row is built for shallow insert which happens in case of bidirectional inserts.
writeFromObjectIntoRowWithChangeRecord(changeRecord, row, session);
|
public void | writeFromObjectIntoRowForUpdate(oracle.toplink.essentials.queryframework.WriteObjectQuery query, oracle.toplink.essentials.internal.sessions.AbstractRecord row)INTERNAL:
Write the attribute value from the object to the row for update.
writeFromObjectIntoRow(query.getObject(), row, query.getSession());
|
public void | writeFromObjectIntoRowForWhereClause(oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery query, oracle.toplink.essentials.internal.sessions.AbstractRecord row)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Write the attribute value from the object to the row.
Object object;
if (query.isDeleteObjectQuery()) {
object = query.getObject();
} else {
object = query.getBackupClone();
}
writeFromObjectIntoRow(object, row, query.getSession());
|
public void | writeFromObjectIntoRowWithChangeRecord(oracle.toplink.essentials.internal.sessions.ChangeRecord changeRecord, oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
A subclass should implement this method if it wants different behaviour.
Write the attribute value from the object to the row.
// Do nothing by default.
|
public void | writeInsertFieldsIntoRow(oracle.toplink.essentials.internal.sessions.AbstractRecord databaseRow, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Write fields needed for insert into the template for with null values.
// Do nothing by default.
|
public void | writeUpdateFieldsIntoRow(oracle.toplink.essentials.internal.sessions.AbstractRecord databaseRow, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Write fields needed for update into the template for with null values.
By default inserted fields are used.
writeInsertFieldsIntoRow(databaseRow, session);
|