Class CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem,​DESCRIPTOR extends CoreDescriptor>

    • Constructor Detail

      • CoreAttributeGroup

        public CoreAttributeGroup​(String name)
      • CoreAttributeGroup

        public CoreAttributeGroup​(String name,
                                  String type,
                                  boolean isValidated)
      • CoreAttributeGroup

        public CoreAttributeGroup​(String name,
                                  Class type,
                                  boolean isValidated)
        INTERNAL: This constructer is to only be used by EclipseLink internally
        Parameters:
        name -
        type -
      • CoreAttributeGroup

        public CoreAttributeGroup()
    • Method Detail

      • addAttribute

        public void addAttribute​(String attributeNameOrPath)
        Add a basic attribute or nested attribute with each String representing an attribute on the path to what needs to be included in the AttributeGroup.

        Example: group.addAttribute("firstName");
        group.addAttribute("manager.address");

        Parameters:
        attributeNameOrPath - A simple attribute, array or attributes forming a path
      • addAttribute

        public void addAttribute​(String attributeNameOrPath,
                                 Collection<? extends CoreAttributeGroup> groups)
        Add an attribute and the corresponding list of AttributeGroups. Multiple groups are added in the case of inheritance

        Parameters:
        attributeNameOrPath - A simple attribute, array or attributes forming a path
        groups - - a collection of AttributeGroups to be added.
      • addAttribute

        public void addAttribute​(String attributeNameOrPath,
                                 CoreAttributeGroup group)
        Add a basic attribute or nested attribute with each String representing an attribute on the path to what needs to be included in the AttributeGroup.

        Example: group.addAttribute("firstName", group1);
        group.addAttribute("manager.address", group2);
        Note that existing group corresponding to attributeNameOrPath will be overridden with the passed group.

        Parameters:
        attributeNameOrPath - A simple attribute, array or attributes forming a path
        group - - an AttributeGroup to be added.
      • addAttributeKey

        public void addAttributeKey​(String attributeNameOrPath,
                                    CoreAttributeGroup group)
        Add a basic attribute or nested attribute with each String representing the key of an attribute of type Map on the path to what needs to be included in the AttributeGroup.

        Example: group.addAttribute("firstName", group1);
        group.addAttribute("manager.address", group2);
        Note that existing group corresponding to attributeNameOrPath will be overridden with the passed group.

        Parameters:
        attributeNameOrPath - A simple attribute, array or attributes forming a path to a Map key
        group - - an AttributeGroup to be added.
      • addAttributes

        public void addAttributes​(Collection<String> attrOrPaths)
        Add a set of attributes to the group.
      • containsAttribute

        public boolean containsAttribute​(String attributeNameOrPath)
        Return if the attribute is defined in the group.
      • containsAttributeInternal

        public boolean containsAttributeInternal​(String attributeName)
        INTERNAL: Return if the attribute is defined in the group. Only local attribute names are checked.
      • convertClassNamesToClasses

        public void convertClassNamesToClasses​(ClassLoader classLoader)
        INTERNAL: Convert all the class-name-based settings in this Descriptor to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.
        Parameters:
        classLoader -
      • getAttributeNames

        public Set<String> getAttributeNames()
      • getGroup

        public CoreAttributeGroup getGroup​(String attributeNameOrPath)
        Returns AttributeGroup corresponding to the passed (possibly nested) attribute.
      • getItem

        public ATTRIBUTE_ITEM getItem​(String attributeNameOrPath)
        INTERNAL: Lookup the AttributeItem for the provided attribute name or path.
        Returns:
        item or null
        Throws:
        IllegalArgumentException - if name is not valid attribute name or path
      • getName

        public String getName()
      • getType

        public Class getType()
      • getTypeName

        public String getTypeName()
        INTERNAL: Returns the name of the type this group represents
      • hasInheritance

        public boolean hasInheritance()
        Indicates whether this group is part of an inheritance hierarchy
      • hasItems

        public boolean hasItems()
        Indicates whether the group has at least one attribute.
      • insertSubClass

        public void insertSubClass​(CoreAttributeGroup group)
        INTERNAL: This method will insert the group into the entity hierarchy just below this AttributeGroup.
        Parameters:
        group -
      • isConcurrent

        public boolean isConcurrent()
        INTERNAL: Only LoadGroups allow concurrency.
      • isCopyGroup

        public boolean isCopyGroup()
        INTERNAL: This method is used internally when converting to a copy group.
        Returns:
      • isFetchGroup

        public boolean isFetchGroup()
      • isLoadGroup

        public boolean isLoadGroup()
      • isValidated

        public boolean isValidated()
        INTERNAL:
        Returns:
        the isValidated
      • removeAttribute

        public void removeAttribute​(String attributeNameOrPath)
        Remove an attribute from the group.
      • setAttributeNames

        public void setAttributeNames​(Set attributeNames)
      • setName

        public void setName​(String name)