javax.jdo.FetchGroup - JDO interface
javax.jdo
Interface FetchGroup
Fetch groups are updated using methods on this interface. An instance of a class implementing this interface can be obtained from PersistenceManager.getFetchGroup
or PersistenceManagerFactory.getFetchGroup
.
A FetchGroup can be unscoped or can be in one of two scopes (the PersistenceManager
or the PersistenceManagerFactory
scope). Unscoped FetchGroups do not affect any behavior. A FetchGroup in PersistenceManager scope hides the corresponding FetchGroup in the PersistenceManagerFactory scope.
- When a FetchGroup is obtained via
PersistenceManager.getFetchGroup
, it is immediately in scope of itsPersistenceManager
. Subsequent modifications of the FetchGroup immediately affectFetchPlan
s that contain theFetchGroup
. - When a FetchGroup is obtained via
PersistenceManagerFactory.getFetchGroup
, it is unscoped. - When a FetchGroup is added to the set of active FetchGroups via
PersistenceManagerFactory.addFetchGroups
, it is put in scope of thePersistenceManagerFactory
. - When a FetchGroup is removed from the set of active FetchGroups via
PersistenceManagerFactory.removeFetchGroups
,PersistenceManagerFactory.removeAllFetchGroups
, or replaced viaPersistenceManagerFactory.addFetchGroups
, it is unscoped.
- Since:
- JDO 2.2
addCategory
and removeCategory
calls. This category includes all members in the persistent type. Using this category also sets the fetch-depth for the members in the default fetch group.
- Since:
- JDO 2.2
addCategory
and removeCategory
calls. This category includes members of all primitive and immutable object class types as defined in section 6.4 of the specification, including String, Locale, Currency, BigDecimal, and BigInteger; as well as Date and its jdbc subtypes and Enum types. - Since:
- JDO 2.2
addCategory
and removeCategory
calls. This category includes members defined in the default fetch group in xml or annotations. Redefining the default fetch group via the API does not affect the members defined by this category. Using this category also sets the fetch-depth for the members in the default fetch group.
- Since:
- JDO 2.2
addCategory
and removeCategory
calls. This category includes members of all multi-valued types, including Collection, array, and Map types of basic and relationship types. - Since:
- JDO 2.2
addCategory
and removeCategory
calls. This category includes members of all relationship types. - Since:
- JDO 2.2
addMembers
was called. After this method executes, the category is not remembered. - Parameters:
-
categoryName
-
- Returns:
- the FetchGroup
- Throws:
-
JDOUserException
- if the FetchGroup is unmodifiable
- Since:
- JDO 2.2
- Parameters:
-
memberName
- the name of a member to add to the FetchGroup
- Returns:
- the FetchGroup
- Throws:
-
JDOUserException
- if the parameter is not a member of the persistent type -
JDOUserException
- if the FetchGroup is unmodifiable
- Since:
- JDO 2.2
- Parameters:
-
memberNames
- the names of members to add to the FetchGroup
- Returns:
- the FetchGroup
- Throws:
-
JDOUserException
- if any parameter is not a member of the persistent type -
JDOUserException
- if the FetchGroup is unmodifiable
- Since:
- JDO 2.2
- Parameters:
-
other
-
- Returns:
- whether this instance is equal to the other
- Since:
- JDO 2.2
- Returns:
- an immutable Set containing the names of all members in the FetchGroup
- Since:
- JDO 2.2
- Returns:
- the name
- Since:
- JDO 2.2
- Returns:
- the post-load property
- Since:
- JDO 2.2
- Parameters:
-
memberName
- the name of the field or property
- Returns:
- the recursion-depth for this member
- Throws:
-
JDOUserException
- if the member is not in the FetchGroup
- Since:
- JDO 2.2
- Returns:
- the persistent type
- Since:
- JDO 2.2
- Returns:
- the hash code
- Since:
- JDO 2.2
setPostLoad
, addMember
, removeMember
, addMembers
, removeMembers
, addCategory
, and removeCategory
will throw JDOUserException
. - Returns:
- whether the FetchGroup is unmodifiable
- Since:
- JDO 2.2
removeMembers
was called. After this method executes, the category is not remembered. - Parameters:
-
categoryName
-
- Returns:
- the FetchGroup
- Throws:
-
JDOUserException
- if the FetchGroup is unmodifiable
- Since:
- JDO 2.2
- Parameters:
-
memberName
-
- Returns:
- the FetchGroup
- Throws:
-
JDOUserException
- if the parameter is not a member of the persistent type -
JDOUserException
- if the FetchGroup is unmodifiable
- Since:
- JDO 2.2
- Parameters:
-
memberNames
-
- Returns:
- the FetchGroup
- Throws:
-
JDOUserException
- if any parameter is not a member of the persistent type -
JDOUserException
- if the FetchGroup is unmodifiable
- Since:
- JDO 2.2
- Parameters:
-
postLoad
-
- Returns:
- the FetchGroup
- Throws:
-
JDOUserException
- if the FetchGroup is unmodifiable
- Since:
- JDO 2.2
- Parameters:
-
memberName
- the name of the field or property -
recursionDepth
- the value for the recursion-depth property
- Returns:
- the FetchGroup
- Throws:
-
JDOUserException
- if the member does not exist -
JDOUserException
- if the FetchGroup is unmodifiable
- Since:
- JDO 2.2
- Returns:
- the FetchGroup
- Since:
- JDO 2.2