Class EntityBucket

  • All Implemented Interfaces:
    java.io.Serializable

    public class EntityBucket
    extends Entity
    Entity for Buckets.

    A bucket is a container to collect content. A bucket entity can contain any number of content entities. It can have sub bucket entities (children) and can be linked to other bucket entities via cords. It can have a single parent bucket. It can be the root for a entity hierarchy.

    Dummy attributes are related to data fields the related entitydata bucket type.

    See Also:
    Bucket, Serialized Form
    • Constructor Detail

      • EntityBucket

        public EntityBucket​(java.lang.String label)
        Create a new bucket entity with label.
        Parameters:
        label - the label
      • EntityBucket

        public EntityBucket()
        Create a new bucket entity.
    • Method Detail

      • isRoot

        public boolean isRoot()
        Gets whether the bucket is a root entity, i.e. the root of a bucket hierarchy.

        Defaults to false.

        Returns:
        true if it is a root bucket
      • setRoot

        public void setRoot​(boolean root)
        Sets whether this is a root entity, i.e. the root of a bucket hierarchy.
        Parameters:
        root -
      • getBulkLoadLevel

        public int getBulkLoadLevel()
        Gets the bulk load level for the bucket entity. The bulk load level defines the number of levels of sub entities that will be loaded in a bulk.

        Defaults to 0 if there is no bulk load.

        Returns:
        positive integer for load level or 0 if there is no bulk load
      • setBulkLoadLevel

        public void setBulkLoadLevel​(int bulkLoadLevel)
        Sets the bulk load level for the entity bucket. The bulk load level defines the number of levels of sub entities that will be loaded in a bulk.

        Throws IllegalArgumentException if input is negative.

        Parameters:
        bulkLoadLevel -
      • getContentEntities

        public java.util.List<EntityDependency> getContentEntities()
        Gets the dependent content entities for the bucket entity.

        Defaults to an empty list.

        Returns:
        contentEntities as List of EntityDependency
      • setContentEntities

        public void setContentEntities​(java.util.List<EntityDependency> contentEntities)
        Sets the dependent content entities for the bucket entity.

        Throws a NullArgumentException if argument is null.

        Parameters:
        contentEntities -
      • addContentEntitiesDependency

        public boolean addContentEntitiesDependency​(EntityDependency dependency)
        Add a dependency to the list of content entities.

        Throws a NullArgumentException if argument is null.

        Parameters:
        dependency - the dependency
        Returns:
        true (as specified by java.util.Collection#add)
        See Also:
        List#add(Object)
      • getSubEntities

        public java.util.List<EntityDependency> getSubEntities()
        Gets the dependent sub-entities for the bucket entity.

        Defaults to an empty list.

        Returns:
        sub-entities as List of EntityDependency
      • setSubEntities

        public void setSubEntities​(java.util.List<EntityDependency> subEntities)
        Sets the dependent sub-entities for the bucket entity.

        Throws a NullArgumentException if argument is null.

        Parameters:
        subEntities -
      • addSubEntitiesDependency

        public boolean addSubEntitiesDependency​(EntityDependency dependency)
        Add a entity dependency to the list of sub-entities dependencies of the bucket entity.

        Throws a NullArgumentException if argument is null.

        Parameters:
        dependency - the dependency
        Returns:
        true (as specified by java.util.Collection#add)
        See Also:
        List#add(Object)
      • getCordEntities

        public java.util.List<EntityDependency> getCordEntities()
        Gets the dependent cord entities for the bucket entity.

        Defaults to an empty list.

        Returns:
        list of cords (empty if no cord found)
      • setCordEntities

        public void setCordEntities​(java.util.List<EntityDependency> cordEntities)
        Sets the dependent cord entities for the bucket entity.

        Throws a NullArgumentException if argument is null.

        Parameters:
        cordEntities - the cord entities
      • addCordEntitiesDependency

        public boolean addCordEntitiesDependency​(EntityDependency dependency)
        Add an entity dependency to the list of cord entity dependencies.

        Throws a NullArgumentException if argument is null.

        Parameters:
        dependency - the dependency
        Returns:
        true (as specified by java.util.Collection#add)
        See Also:
        List#add(Object)
      • getDummyLabel

        public java.lang.String getDummyLabel()
        Gets the dummy label text for the bucket entity.

        Defaults to an empty string.

        Returns:
        dummyLabel as String
      • setDummyLabel

        public void setDummyLabel​(java.lang.String dummyLabel)
        Sets the dummy label text for the bucket entity.

        Throws a NullArgumentException if argument is null.

        Parameters:
        dummyLabel -
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Entity