Class 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 Detail

      • 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.
    • Constructor Detail

      • FetchGroupMetaData

        public FetchGroupMetaData​(java.lang.String name)
        Constructor for a named fetch group. Set fields using setters, before populate().
        Parameters:
        name - Name of fetch group
    • Method Detail

      • getName

        public final java.lang.String getName()
      • getPostLoad

        public final java.lang.Boolean getPostLoad()
      • 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