|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.descriptors.FetchGroupManager
public class FetchGroupManager
Purpose: The fetch group manager controls the named fetch groups defined at the descriptor level. EclipseLink supports multiple, overlapped fetch groups, optionally with one of them as the default fetch group.
The domain object must implement org.eclipse.persistence.queries.FetchGroupTracker interface, in order to make use of the fetch group performance enhancement feature.
Please refer to FetchGroup class for the pros and cons of fetch group usage.
FetchGroup
,
FetchGroupTracker
Constructor Summary | |
---|---|
FetchGroupManager()
Constructor |
Method Summary | |
---|---|
void |
addFetchGroup(FetchGroup group)
Add a named fetch group to the descriptor |
void |
addMinimalFetchGroup(FetchGroup fetchGroup)
INTERNAL: Add primary key and version attributes to the passed fetch group. |
java.lang.Object |
clone()
INTERNAL: Clone the fetch group manager. |
void |
copyFetchGroupInto(java.lang.Object source,
java.lang.Object target,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Copy fetch group reference from the source object to the target |
FetchGroup |
createDefaultFetchGroup()
PUBLIC: Returns clone of the default fetch group. |
FetchGroup |
createFullFetchGroup()
PUBLIC: Returns clone of the full fetch group - contains all the attributes, no nesting. |
FetchGroup |
createMinimalFetchGroup()
PUBLIC: Returns clone of the minimal fetch group. |
org.eclipse.persistence.internal.queries.EntityFetchGroup |
flatUnionFetchGroups(FetchGroup first,
FetchGroup second)
INTERNAL: Union two fetch groups as EntityFetchGroups. |
org.eclipse.persistence.internal.queries.EntityFetchGroup |
getDefaultEntityFetchGroup()
INTERNAL: Returns EntityFetchGroup corresponding to default FetchGroup. |
FetchGroup |
getDefaultFetchGroup()
Return the descriptor-level default fetch group. |
ClassDescriptor |
getDescriptor()
PUBLIC: Return the referenced descriptor. |
org.eclipse.persistence.internal.queries.EntityFetchGroup |
getEntityFetchGroup(FetchGroup fetchGroup)
INTERNAL: Returns entity fetch group corresponding to the passed fetch group. |
org.eclipse.persistence.internal.queries.EntityFetchGroup |
getEntityFetchGroup(java.util.Set<java.lang.String> attributeNames)
INTERNAL: Returns entity fetch group corresponding to the passed set of attributes. |
FetchGroup |
getFetchGroup(java.lang.String groupName)
Return a pre-defined named fetch group. |
FetchGroup |
getFetchGroup(java.lang.String groupName,
boolean useDefault)
Lookup the FetchGroup to use given a name and a flag taking into consideration descriptor inheritance to ensure parent descriptors are searched for named and default FetchGroup. |
java.util.Map<java.lang.String,FetchGroup> |
getFetchGroups()
Return the fetch group map: keyed by the group name, valued by the fetch group object. |
org.eclipse.persistence.internal.queries.EntityFetchGroup |
getIdEntityFetchGroup()
INTERNAL: Returns EntityFetchGroup corresponding to primary key attribute(s). |
org.eclipse.persistence.internal.queries.EntityFetchGroup |
getNonReferenceEntityFetchGroup()
INTERNAL: Returns EntityFetchGroup corresponding to non relational attributes intersected with defaultFetchGroup. |
org.eclipse.persistence.internal.queries.EntityFetchGroup |
getNonReferenceEntityFetchGroup(boolean addPk,
boolean addVersion)
INTERNAL: Returns EntityFetchGroup corresponding to non relational attributes intersected with defaultFetchGroup. |
org.eclipse.persistence.internal.queries.EntityFetchGroup |
getObjectEntityFetchGroup(java.lang.Object domainObject)
INTERNAL: Return FetchGroup held by the object. |
FetchGroup |
getObjectFetchGroup(java.lang.Object domainObject)
INTERNAL: Return FetchGroup held by the object. |
boolean |
hasFetchGroup(java.lang.String groupName)
Return true if a fetch group exists for the given group name. |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the fetch groups. |
protected void |
initNonReferenceEntityFetchGroup()
|
boolean |
isAttributeFetched(java.lang.Object entity,
java.lang.String attributeName)
Return true if the attribute of the object has already been fetched |
boolean |
isFullFetchGroup(FetchGroup fetchGroup)
PUBLIC: Indicates whether the passed fetch group contains all the attributes, no nesting. |
boolean |
isMinimalFetchGroup(FetchGroup fetchGroup)
PUBLIC: Indicates whether the passed fetch group is minimal. |
boolean |
isObjectValidForFetchGroup(java.lang.Object object,
FetchGroup fetchGroup)
INTERNAL: Return if the cached object data is sufficiently valid against a fetch group |
boolean |
isPartialObject(java.lang.Object domainObject)
INTERNAL: Return true if the object is partially fetched and cached. |
void |
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: postInitialize called for inheritance children first. |
void |
prepareAndVerify(FetchGroup fetchGroup)
PUBLIC: Add primary key and version attributes to the passed fetch group and all the fetch group it contains. |
protected void |
prepareAndVerifyInternal(FetchGroup fetchGroup,
java.lang.String attributePrefix)
INTERNAL: Add primary key and version attributes to the passed fetch group and all the fetch group it contains. |
void |
reset(java.lang.Object source)
INTERNAL: Reset object attributes to the default values. |
void |
setDefaultFetchGroup(FetchGroup newDefaultFetchGroup)
Set the descriptor-level default fetch group. |
void |
setDescriptor(ClassDescriptor descriptor)
Set the referenced descriptor. |
void |
setObjectFetchGroup(java.lang.Object source,
FetchGroup fetchGroup,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Set fetch group into the object. |
void |
setRefreshOnFetchGroupToObject(java.lang.Object source,
boolean shouldRefreshOnFetchgroup)
INTERNAL: Set if the tracked object is fetched from executing a query with or without refresh. |
void |
setShouldUseInheritedDefaultFetchGroup(boolean shouldUseInheritedDefaultFetchGroup)
PUBLIC: Set whether defaultFetchGroup should be copied from the parent if not set. |
boolean |
shouldUseInheritedDefaultFetchGroup()
PUBLIC: Indicates whether defaultFetchGroup should be copied from the parent if not set. |
boolean |
shouldWriteInto(java.lang.Object cachedObject,
java.lang.Object clone)
INTERNAL: Return true if the cached object data should be written in clone. |
void |
unionEntityFetchGroupIntoObject(java.lang.Object source,
org.eclipse.persistence.internal.queries.EntityFetchGroup newEntityFetchGroup,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Union the fetch group of the domain object with the new fetch group. |
FetchGroup |
unionFetchGroups(FetchGroup first,
FetchGroup second)
INTERNAL: Union two fetch groups. |
void |
writePartialIntoClones(java.lang.Object partialObject,
java.lang.Object workingClone,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Write data of the partially fetched object into the working and backup clones |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FetchGroupManager()
Method Detail |
---|
public void addFetchGroup(FetchGroup group)
public java.util.Map<java.lang.String,FetchGroup> getFetchGroups()
public FetchGroup getDefaultFetchGroup()
ObjectLevelReadQuery.setShouldUseDefaultFetchGroup(boolean)
public org.eclipse.persistence.internal.queries.EntityFetchGroup getDefaultEntityFetchGroup()
public FetchGroup createMinimalFetchGroup()
public boolean isMinimalFetchGroup(FetchGroup fetchGroup)
public org.eclipse.persistence.internal.queries.EntityFetchGroup getIdEntityFetchGroup()
public org.eclipse.persistence.internal.queries.EntityFetchGroup getNonReferenceEntityFetchGroup()
public org.eclipse.persistence.internal.queries.EntityFetchGroup getNonReferenceEntityFetchGroup(boolean addPk, boolean addVersion)
public void addMinimalFetchGroup(FetchGroup fetchGroup)
public void prepareAndVerify(FetchGroup fetchGroup)
protected void prepareAndVerifyInternal(FetchGroup fetchGroup, java.lang.String attributePrefix)
public FetchGroup createDefaultFetchGroup()
public FetchGroup createFullFetchGroup()
public boolean isFullFetchGroup(FetchGroup fetchGroup)
public org.eclipse.persistence.internal.queries.EntityFetchGroup getEntityFetchGroup(java.util.Set<java.lang.String> attributeNames)
public org.eclipse.persistence.internal.queries.EntityFetchGroup getEntityFetchGroup(FetchGroup fetchGroup)
public FetchGroup getFetchGroup(java.lang.String groupName)
public FetchGroup getFetchGroup(java.lang.String groupName, boolean useDefault)
public void setDefaultFetchGroup(FetchGroup newDefaultFetchGroup)
ObjectLevelReadQuery.setShouldUseDefaultFetchGroup(boolean)
public boolean isPartialObject(java.lang.Object domainObject)
public boolean isObjectValidForFetchGroup(java.lang.Object object, FetchGroup fetchGroup)
public boolean shouldWriteInto(java.lang.Object cachedObject, java.lang.Object clone)
public void writePartialIntoClones(java.lang.Object partialObject, java.lang.Object workingClone, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
public void copyFetchGroupInto(java.lang.Object source, java.lang.Object target, org.eclipse.persistence.internal.sessions.AbstractSession session)
public void unionEntityFetchGroupIntoObject(java.lang.Object source, org.eclipse.persistence.internal.queries.EntityFetchGroup newEntityFetchGroup, org.eclipse.persistence.internal.sessions.AbstractSession session)
public FetchGroup unionFetchGroups(FetchGroup first, FetchGroup second)
public org.eclipse.persistence.internal.queries.EntityFetchGroup flatUnionFetchGroups(FetchGroup first, FetchGroup second)
public void reset(java.lang.Object source)
public FetchGroup getObjectFetchGroup(java.lang.Object domainObject)
public org.eclipse.persistence.internal.queries.EntityFetchGroup getObjectEntityFetchGroup(java.lang.Object domainObject)
public void setObjectFetchGroup(java.lang.Object source, FetchGroup fetchGroup, org.eclipse.persistence.internal.sessions.AbstractSession session)
public void setRefreshOnFetchGroupToObject(java.lang.Object source, boolean shouldRefreshOnFetchgroup)
public boolean isAttributeFetched(java.lang.Object entity, java.lang.String attributeName)
public ClassDescriptor getDescriptor()
public void setDescriptor(ClassDescriptor descriptor)
public boolean hasFetchGroup(java.lang.String groupName)
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
protected void initNonReferenceEntityFetchGroup()
public java.lang.Object clone()
clone
in class java.lang.Object
public void setShouldUseInheritedDefaultFetchGroup(boolean shouldUseInheritedDefaultFetchGroup)
public boolean shouldUseInheritedDefaultFetchGroup()
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |