|
EclipseLink 1.2.0, build 'v20091016-r5565' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 |
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 |
ClassDescriptor |
getClassDescriptor()
INTERNAL: Return the referenced descriptor. |
FetchGroup |
getDefaultFetchGroup()
Return the descriptor-level default fetch group. |
ClassDescriptor |
getDescriptor()
PUBLIC: Return the referenced descriptor. |
FetchGroup |
getFetchGroup(java.lang.String groupName)
Return a pre-defined named fetch group. |
java.util.Map |
getFetchGroups()
Return the fetch group map: keyed by the group name, valued by the fetch group object. |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the fetch groups. |
boolean |
isAttributeFetched(java.lang.Object object,
java.lang.String attributeName)
Return true if the attribute of the object has already been fetched |
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 |
prepareQueryWithFetchGroup(ObjectLevelReadQuery query)
INTERNAL: Prepare the query with the fetch group to add group attributes to the query for partial reading. |
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: Reset object attributes to the default their values. |
void |
setRefreshOnFetchGroupToObject(java.lang.Object source,
boolean shouldRefreshOnFetchgroup)
INTERNAL: Set if the tracked object is fetched from executing a query with or without refresh. |
boolean |
shouldWriteInto(java.lang.Object cachedObject,
java.lang.Object clone)
INTERNAL: Return true if the cached object data should be written in clone. |
void |
unionFetchGroupIntoObject(java.lang.Object source,
FetchGroup newFetchGroup,
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 getFetchGroups()
public FetchGroup getDefaultFetchGroup()
ObjectLevelReadQuery.setShouldUseDefaultFetchGroup(boolean)
public FetchGroup getFetchGroup(java.lang.String groupName)
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 unionFetchGroupIntoObject(java.lang.Object source, FetchGroup newFetchGroup, org.eclipse.persistence.internal.sessions.AbstractSession session)
public FetchGroup unionFetchGroups(FetchGroup first, FetchGroup second)
public void reset(java.lang.Object source)
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 object, java.lang.String attributeName)
public ClassDescriptor getDescriptor()
public ClassDescriptor getClassDescriptor()
public void setDescriptor(ClassDescriptor descriptor)
public void prepareQueryWithFetchGroup(ObjectLevelReadQuery query)
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public java.lang.Object clone()
clone
in class java.lang.Object
|
EclipseLink 1.2.0, build 'v20091016-r5565' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |