Class EntityBucket

java.lang.Object
com.priint.pubserver.entity.Entity
com.priint.pubserver.entity.EntityBucket
All Implemented Interfaces:
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:
  • Field Details

  • Constructor Details

    • EntityBucket

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

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

    • 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 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(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:
    • getSubEntities

      public 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(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:
    • getCordEntities

      public 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(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:
    • getDummyLabel

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

      Defaults to an empty string.

      Returns:
      dummyLabel as String
    • setDummyLabel

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

      Throws a NullArgumentException if argument is null.

      Parameters:
      dummyLabel -
    • toString

      public String toString()
      Overrides:
      toString in class Entity