Top Description Fields Constructors Methods
org.eclipse.persistence.internal.indirection

public Class UnitOfWorkQueryValueHolder<T>

extends UnitOfWorkValueHolder<T>
Class Inheritance
Imports
java.util.Collection, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.indirection.*, org.eclipse.persistence.internal.sessions.AbstractRecord, .UnitOfWorkImpl, org.eclipse.persistence.mappings.*

UnitOfWorkQueryValueHolder wraps a database-stored object and implements behavior to access it. The object is read from the database by invoking a user-specified query. This value holder is used only in the unit of work.
Author
Sati

Field Summary

Inherited from org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder:
backupValueHoldermappingrelationshipSourceObjectremoteUnitOfWorksourceAttributeNamesourceObjectwrappedValueHolderwrappedValueHolderRemoteID

Constructor Summary

AccessConstructor and Description
protected
protected
public

Method Summary

Modifier and TypeMethod and Description
protected Object
buildBackupCloneFor(Object cloneAttributeValue)

Implements abstract org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.buildBackupCloneFor.

Backup the clone attribute value.
public T
buildCloneFor(Object originalAttributeValue)

Implements abstract org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.buildCloneFor.

Clone the original attribute value.
private ForeignReferenceMapping
getRelationshipPartnerFor(Object partnerObject)

Helper method to retrieve the relationship partner mapping.

public void
public void
updateForeignReferenceRemove(Object value)

INTERNAL: Here we now must check for bi-directional relationship.

public void
updateForeignReferenceSet(Object value, Object oldValue)

INTERNAL: Here we now must check for bi-directional relationship.

Inherited from org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder:
getBackupValueHoldergetMappinggetRelationshipSourceObjectgetRemoteUnitOfWorkgetSourceAttributeNamegetSourceObjectgetUnitOfWorkgetValueFromServerObjectgetWrappedValueHoldergetWrappedValueHolderRemoteIDinstantiateinstantiateForUnitOfWorkValueHolderinstantiateImplisEasilyInstantiatedisPessimisticLockingValueHolderisSerializedRemoteUnitOfWorkValueHolderreleaseWrappedValueHolderresetFieldssetBackupValueHoldersetMappingsetRelationshipSourceObjectsetRemoteUnitOfWorksetSourceAttributeNamesetSourceObjectsetWrappedValueHoldershouldAllowInstantiationDeferral

Constructor Detail

UnitOfWorkQueryValueHolderback to summary
protected UnitOfWorkQueryValueHolder()
UnitOfWorkQueryValueHolderback to summary
protected UnitOfWorkQueryValueHolder(ValueHolderInterface<T> attributeValue, Object clone, DatabaseMapping mapping, UnitOfWorkImpl unitOfWork)
UnitOfWorkQueryValueHolderback to summary
public UnitOfWorkQueryValueHolder(ValueHolderInterface<T> attributeValue, Object clone, ForeignReferenceMapping mapping, AbstractRecord row, UnitOfWorkImpl unitOfWork)

Method Detail

buildBackupCloneForback to summary
protected Object buildBackupCloneFor(Object cloneAttributeValue)

Implements abstract org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.buildBackupCloneFor.

Backup the clone attribute value.

Annotations
@Override
buildCloneForback to summary
public T buildCloneFor(Object originalAttributeValue)

Implements abstract org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.buildCloneFor.

Clone the original attribute value.

Annotations
@Override
@SuppressWarnings:unchecked
getRelationshipPartnerForback to summary
private ForeignReferenceMapping getRelationshipPartnerFor(Object partnerObject)

Helper method to retrieve the relationship partner mapping. This will take inheritance into account and return the mapping associated with correct subclass if necessary. This is needed for EJB 2.0 inheritance

setValueback to summary
public void setValue(T theValue)

Overrides org.eclipse.persistence.internal.indirection.DatabaseValueHolder.setValue.

Implements org.eclipse.persistence.indirection.ValueHolderInterface.setValue.

Ensure that the backup value holder is populated.

Annotations
@Override
updateForeignReferenceRemoveback to summary
public void updateForeignReferenceRemove(Object value)

INTERNAL: Here we now must check for bi-directional relationship. If the mapping has a relationship partner then we must maintain the original relationship. We only worry about ObjectReferenceMappings as the collections mappings will be handled by transparentIndirection

updateForeignReferenceSetback to summary
public void updateForeignReferenceSet(Object value, Object oldValue)

INTERNAL: Here we now must check for bi-directional relationship. If the mapping has a relationship partner then we must maintain the original relationship. We only worry about ObjectReferenceMappings as the collections mappings will be handled by transparentIndirection