Package org.datanucleus.metadata
Class FetchGroupMetaData
- java.lang.Object
-
- org.datanucleus.metadata.MetaData
-
- org.datanucleus.metadata.FetchGroupMetaData
-
- All Implemented Interfaces:
java.io.Serializable
public class FetchGroupMetaData extends MetaData
A fetch group defines a particular loaded state for an object graph. It specifies fields/properties to be loaded for all of the instances in the graph when this fetch group is active.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<FetchGroupMetaData>
fetchGroups
A contained fetch-group element indicates that the named group is to be included in the group being defined.protected java.util.Set<FetchGroupMemberMetaData>
members
members (fields/properties) declared to be in this fetch group.(package private) java.lang.String
name
The name attribute on a field element contained within a fetch-group element is the name of field in the enclosing class or a dot-separated expression identifying a field reachable from the class by navigating a reference, collection or map.(package private) boolean
postLoad
The post-load attribute on the fetch-group element indicates whether the jdoPostLoad callback will be made when the fetch group is loaded.private static long
serialVersionUID
-
Fields inherited from class org.datanucleus.metadata.MetaData
EXTENSION_CLASS_CREATETIMESTAMP, EXTENSION_CLASS_CREATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_CREATEUSER, EXTENSION_CLASS_CREATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_CREATEUSER_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH, EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE, EXTENSION_CLASS_MULTITENANT, EXTENSION_CLASS_READ_ONLY, EXTENSION_CLASS_SOFTDELETE, EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME, EXTENSION_CLASS_UPDATETIMESTAMP, EXTENSION_CLASS_UPDATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_UPDATEUSER, EXTENSION_CLASS_UPDATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_UPDATEUSER_COLUMN_NAME, EXTENSION_CLASS_VERSION_FIELD_NAME, EXTENSION_CLASS_VIEW_DEFINITION, EXTENSION_CLASS_VIEW_IMPORTS, EXTENSION_INDEX_COLUMN_ORDERING, EXTENSION_MEMBER_CACHEABLE, EXTENSION_MEMBER_CALENDAR_ONE_COLUMN, EXTENSION_MEMBER_CASCADE_ATTACH, EXTENSION_MEMBER_CASCADE_DETACH, EXTENSION_MEMBER_CASCADE_PERSIST, EXTENSION_MEMBER_CASCADE_REFRESH, EXTENSION_MEMBER_COMPARATOR_NAME, EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS, EXTENSION_MEMBER_CREATE_TIMESTAMP, EXTENSION_MEMBER_CREATE_USER, EXTENSION_MEMBER_ENUM_VALUE_GETTER, EXTENSION_MEMBER_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_INSERTABLE, EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_LIST_ORDERING, EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN, EXTENSION_MEMBER_RELATION_DISCRIM_PK, EXTENSION_MEMBER_RELATION_DISCRIM_VALUE, EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL, EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED, EXTENSION_MEMBER_TYPE_CONVERTER_NAME, EXTENSION_MEMBER_UPDATE_TIMESTAMP, EXTENSION_MEMBER_UPDATE_USER, EXTENSION_MEMBER_UPDATEABLE, EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES, EXTENSION_VERSION_NUMBER_INITIAL_VALUE, extensions, metaDataState, parent, VENDOR_NAME
-
-
Constructor Summary
Constructors Constructor Description FetchGroupMetaData(java.lang.String name)
Constructor for a named fetch group.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFetchGroup(FetchGroupMetaData fgmd)
Add a new FetchGroupMetaDatavoid
addMember(FetchGroupMemberMetaData fgmmd)
Add a new field/property.java.util.Set<FetchGroupMetaData>
getFetchGroups()
java.util.Set<FetchGroupMemberMetaData>
getMembers()
Accessor for metadata for the members of this group.java.lang.String
getName()
int
getNumberOfMembers()
java.lang.Boolean
getPostLoad()
FetchGroupMemberMetaData
newMemberMetaData(java.lang.String name)
Method to create a new member, add it, and return it.FetchGroupMetaData
setPostLoad(java.lang.Boolean postLoad)
-
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtensions, getExtensions, getMetaDataManager, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setExtensions, setInitialised, setParent, setPopulated, setUsed
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
postLoad
boolean postLoad
The post-load attribute on the fetch-group element indicates whether the jdoPostLoad callback will be made when the fetch group is loaded. It defaults to false, for all fetch groups except the default fetch group, on which it defaults to true.
-
name
final java.lang.String name
The name attribute on a field element contained within a fetch-group element is the name of field in the enclosing class or a dot-separated expression identifying a field reachable from the class by navigating a reference, collection or map. For maps of persistable classes "#key" or "#value" may be appended to the name of the map field to navigate the key or value respectively (e.g. to include a field of the key class or value class in the fetch group). For collection and arrays of persistence-capable classes, "#element" may be appended to the name of the field to navigate the element. This is optional; if omitted for collections and arrays, #element is assumed.
-
fetchGroups
protected java.util.Set<FetchGroupMetaData> fetchGroups
A contained fetch-group element indicates that the named group is to be included in the group being defined. Nested fetch group elements are limited to only the name attribute.
-
members
protected java.util.Set<FetchGroupMemberMetaData> members
members (fields/properties) declared to be in this fetch group.
-
-
Method Detail
-
getName
public final java.lang.String getName()
-
getPostLoad
public final java.lang.Boolean getPostLoad()
-
setPostLoad
public FetchGroupMetaData setPostLoad(java.lang.Boolean postLoad)
-
getFetchGroups
public final java.util.Set<FetchGroupMetaData> getFetchGroups()
-
getMembers
public final java.util.Set<FetchGroupMemberMetaData> getMembers()
Accessor for metadata for the members of this group.- Returns:
- Returns the metadata for members
-
getNumberOfMembers
public int getNumberOfMembers()
-
addFetchGroup
public void addFetchGroup(FetchGroupMetaData fgmd)
Add a new FetchGroupMetaData- Parameters:
fgmd
- the fetch group
-
addMember
public void addMember(FetchGroupMemberMetaData fgmmd)
Add a new field/property.- Parameters:
fgmmd
- the field/property metadata
-
newMemberMetaData
public FetchGroupMemberMetaData newMemberMetaData(java.lang.String name)
Method to create a new member, add it, and return it.- Parameters:
name
- The name of the fetch group- Returns:
- The field metadata
-
-