Package org.datanucleus.metadata
Class FetchGroupMetaData
java.lang.Object
org.datanucleus.metadata.MetaData
org.datanucleus.metadata.FetchGroupMetaData
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Set
<FetchGroupMetaData> A contained fetch-group element indicates that the named group is to be included in the group being defined.protected Set
<FetchGroupMemberMetaData> members (fields/properties) declared to be in this fetch group.(package private) final String
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
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 final long
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new FetchGroupMetaDatavoid
Add a new field/property.final Set
<FetchGroupMetaData> final Set
<FetchGroupMemberMetaData> Accessor for metadata for the members of this group.final String
getName()
int
final Boolean
newMemberMetaData
(String name) Method to create a new member, add it, and return it.setPostLoad
(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 Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
postLoad
boolean postLoadThe 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
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
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
members (fields/properties) declared to be in this fetch group.
-
-
Constructor Details
-
FetchGroupMetaData
Constructor for a named fetch group. Set fields using setters, before populate().- Parameters:
name
- Name of fetch group
-
-
Method Details
-
getName
-
getPostLoad
-
setPostLoad
-
getFetchGroups
-
getMembers
Accessor for metadata for the members of this group.- Returns:
- Returns the metadata for members
-
getNumberOfMembers
public int getNumberOfMembers() -
addFetchGroup
Add a new FetchGroupMetaData- Parameters:
fgmd
- the fetch group
-
addMember
Add a new field/property.- Parameters:
fgmmd
- the field/property metadata
-
newMemberMetaData
Method to create a new member, add it, and return it.- Parameters:
name
- The name of the fetch group- Returns:
- The field metadata
-