Methods Summary |
---|
public java.lang.Object | cloneAttribute(java.lang.Object attributeValue, java.lang.Object original, java.lang.Object clone, oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork, boolean buildDirectlyFromRow)INTERNAL:
Return a clone of the attribute.
// Since valueFromRow was called with the UnitOfWork, attributeValue
// is already a registered result.
if (buildDirectlyFromRow) {
return attributeValue;
}
boolean isExisting = unitOfWork.isObjectRegistered(clone) && (!(unitOfWork.isOriginalNewObject(original)));
return this.getMapping().buildCloneForPartObject(attributeValue, original, clone, unitOfWork, isExisting);
|
protected boolean | collectionTypeIsValid(java.lang.Class collectionType)INTERNAL:
Return whether the collection type is appropriate for the indirection policy.
In this case, the type MUST be a Vector (or, in the case of jdk1.2,
Collection or Map).
return getCollectionMapping().getContainerPolicy().isValidContainerType(collectionType);
|
public oracle.toplink.essentials.internal.sessions.AbstractRecord | extractReferenceRow(java.lang.Object referenceObject)INTERNAL:
Return the reference row for the reference object.
This allows the new row to be built without instantiating
the reference object.
Return null if the object has already been instantiated.
return null;
|
public java.lang.Object | getOriginalIndirectionObject(java.lang.Object unitOfWorkIndirectionObject, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Return the original indirection object for a unit of work indirection object.
// This code appears broken, but actually is unreachable because
// only called when indirection is true.
return unitOfWorkIndirectionObject;
|
public java.lang.Object | getRealAttributeValueFromObject(java.lang.Object object, java.lang.Object attribute)INTERNAL:
Return the "real" attribute value, as opposed to any wrapper.
This will trigger the wrapper to instantiate the value.
return attribute;
|
public java.lang.Object | nullValueFromRow()INTERNAL:
Return the null value of the appropriate attribute. That is, the
field from the database is NULL, return what should be
placed in the object's attribute as a result.
return null;
|
public boolean | objectIsInstantiated(java.lang.Object object)INTERNAL:
Return whether the specified object is instantiated.
return true;
|
protected boolean | typeIsValid(java.lang.Class attributeType)INTERNAL:
Return whether the type is appropriate for the indirection policy.
In this case, the attribute type CANNOT be ValueHolderInterface.
return attributeType != ClassConstants.ValueHolderInterface_Class;
|
public boolean | usesIndirection()INTERNAL:
Return whether the indirection policy actually uses indirection.
Here, we must reply false.
return false;
|
public void | validateDeclaredAttributeType(java.lang.Class attributeType, oracle.toplink.essentials.exceptions.IntegrityChecker checker)INTERNAL:
Verify that attributeType is correct for the
indirection policy. If it is incorrect, add an exception to the
integrity checker.
In this case, the attribute type CANNOT be ValueHolderInterface.
super.validateDeclaredAttributeType(attributeType, checker);
if (!this.typeIsValid(attributeType)) {
checker.handleError(DescriptorException.attributeAndMappingWithoutIndirectionMismatch(this.getMapping()));
}
|
public void | validateDeclaredAttributeTypeForCollection(java.lang.Class attributeType, oracle.toplink.essentials.exceptions.IntegrityChecker checker)INTERNAL:
Verify that attributeType is an appropriate collection type for the
indirection policy. If it is incorrect, add an exception to the integrity checker.
In this case, the type MUST be a Vector (or, in the case of jdk1.2,
Collection or Map).
super.validateDeclaredAttributeTypeForCollection(attributeType, checker);
if (!this.collectionTypeIsValid(attributeType)) {
checker.handleError(DescriptorException.attributeTypeNotValid(this.getCollectionMapping()));
}
|
public void | validateGetMethodReturnType(java.lang.Class returnType, oracle.toplink.essentials.exceptions.IntegrityChecker checker)INTERNAL:
Verify that getter returnType is correct for the
indirection policy. If it is incorrect, add an exception
to the integrity checker.
In this case, the return type CANNOT be ValueHolderInterface.
super.validateGetMethodReturnType(returnType, checker);
if (!this.typeIsValid(returnType)) {
checker.handleError(DescriptorException.returnAndMappingWithoutIndirectionMismatch(this.getMapping()));
}
|
public void | validateGetMethodReturnTypeForCollection(java.lang.Class returnType, oracle.toplink.essentials.exceptions.IntegrityChecker checker)INTERNAL:
Verify that getter returnType is an appropriate collection type for the
indirection policy. If it is incorrect, add an exception to the integrity checker.
In this case, the type MUST be a Vector (or, in the case of jdk1.2,
Collection or Map).
super.validateGetMethodReturnTypeForCollection(returnType, checker);
if (!this.collectionTypeIsValid(returnType)) {
checker.handleError(DescriptorException.getMethodReturnTypeNotValid(getCollectionMapping()));
}
|
public void | validateSetMethodParameterType(java.lang.Class parameterType, oracle.toplink.essentials.exceptions.IntegrityChecker checker)INTERNAL:
Verify that setter parameterType is correct for the
indirection policy. If it is incorrect, add an exception
to the integrity checker.
In this case, the parameter type CANNOT be ValueHolderInterface.
super.validateSetMethodParameterType(parameterType, checker);
if (!this.typeIsValid(parameterType)) {
checker.handleError(DescriptorException.parameterAndMappingWithoutIndirectionMismatch(this.getMapping()));
}
|
public void | validateSetMethodParameterTypeForCollection(java.lang.Class parameterType, oracle.toplink.essentials.exceptions.IntegrityChecker checker)INTERNAL:
Verify that setter parameterType is an appropriate collection type for the
indirection policy. If it is incorrect, add an exception to the integrity checker.
In this case, the type MUST be a Vector (or, in the case of jdk1.2,
Collection or Map).
super.validateSetMethodParameterTypeForCollection(parameterType, checker);
if (!this.collectionTypeIsValid(parameterType)) {
checker.handleError(DescriptorException.setMethodParameterTypeNotValid(getCollectionMapping()));
}
|
public java.lang.Object | valueFromQuery(oracle.toplink.essentials.queryframework.ReadQuery query, oracle.toplink.essentials.internal.sessions.AbstractRecord row, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
Return the value to be stored in the object's attribute.
This value is determined by the query.
In this case, simply execute the query and return its results.
return session.executeQuery(query, row);
|
public java.lang.Object | valueFromRow(java.lang.Object object)INTERNAL:
Return the value to be stored in the object's attribute.
This value is determined by the row.
In this case, simply return the object.
return object;
|