Package javax.jdo

Interface FetchGroup

    • Method Detail

      • hashCode

        int hashCode()
        Return the hashCode for this instance. The hash code should combine both the class and fetch group name. The hash codes for two equal instances must be identical.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code
        Since:
        2.2
      • equals

        boolean equals​(Object other)
        Return whether this instance is equal to the other. The equals method must compare the class for identity and the fetch group name for equality.
        Overrides:
        equals in class Object
        Returns:
        whether this instance is equal to the other
        Since:
        2.2
      • getName

        String getName()
        Get the name of this FetchGroup. The name is set only in the factory method.
        Returns:
        the name
        Since:
        2.2
      • getType

        Class getType()
        Get the persistent type (class or interface) of this FetchGroup. The persistent type is set only in the factory method(s).
        Returns:
        the persistent type
        Since:
        2.2
      • getPostLoad

        boolean getPostLoad()
        Get the post-load property of this FetchGroup.
        Returns:
        the post-load property
        Since:
        2.2
      • setPostLoad

        FetchGroup setPostLoad​(boolean postLoad)
        Set the post-load property of this FetchGroup.
        Parameters:
        postLoad - Whether to post load this fetch group
        Returns:
        the FetchGroup
        Throws:
        JDOUserException - if the FetchGroup is unmodifiable
        Since:
        2.2
      • addMember

        FetchGroup addMember​(String memberName)
        Add the member (field or property) to the set of members in this FetchGroup.
        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:
        2.2
      • addMembers

        FetchGroup addMembers​(String... memberNames)
        Add the member (field or property) to the set of members in this FetchGroup. Duplicates are ignored.
        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:
        2.2
      • removeMember

        FetchGroup removeMember​(String memberName)
        Remove the member (field or property) from the set of members in this FetchGroup.
        Parameters:
        memberName - Name of the member of the class to remove from 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:
        2.2
      • removeMembers

        FetchGroup removeMembers​(String... memberNames)
        Remove the member (field or property) from the set of members in this FetchGroup. Duplicates in the parameter list are eliminated before removing them from the membership.
        Parameters:
        memberNames - Member names of the class to remove from this FetchGroup.
        Returns:
        the FetchGroup
        Throws:
        JDOUserException - if any parameter is not a member of the persistent type
        JDOUserException - if the FetchGroup is unmodifiable
        Since:
        2.2
      • addCategory

        FetchGroup addCategory​(String categoryName)
        Add the members (fields or properties) of the named category to the set of members in this FetchGroup. This method first resolves the category name to a set of members and then adds the members as if addMembers(java.lang.String...) was called. After this method executes, the category is not remembered.
        Parameters:
        categoryName - Category to add to this FetchGroup.
        Returns:
        the FetchGroup
        Throws:
        JDOUserException - if the FetchGroup is unmodifiable
        Since:
        2.2
      • removeCategory

        FetchGroup removeCategory​(String categoryName)
        Remove the members (fields or properties) of the named category from the set of members in this FetchGroup. This method first resolves the category name to a set of members and then removes the members as if removeMembers(java.lang.String...) was called. After this method executes, the category is not remembered.
        Parameters:
        categoryName - Category to remove from this FetchGroup.
        Returns:
        the FetchGroup
        Throws:
        JDOUserException - if the FetchGroup is unmodifiable
        Since:
        2.2
      • setRecursionDepth

        FetchGroup setRecursionDepth​(String memberName,
                                     int recursionDepth)
        Set the recursion-depth for this member. The default is 1. A value of 0 means don't fetch the member (as if the member were omitted entirely). A value of -1 means fetch all instances reachable via this member.
        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:
        2.2
      • getRecursionDepth

        int getRecursionDepth​(String memberName)
        Get the recursion-depth for this member.
        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:
        2.2
      • getMembers

        Set getMembers()
        Return an immutable Set of String containing the names of all members. The Set is a copy of the currently defined members and will not change based on subsequent changes to the membership in the FetchGroup.
        Returns:
        an immutable Set containing the names of all members in the FetchGroup
        Since:
        2.2
      • setUnmodifiable

        FetchGroup setUnmodifiable()
        Make this FetchGroup unmodifiable. If already unmodifiable, this method has no effect.
        Returns:
        the FetchGroup
        Since:
        2.2