Interface ReadableObjectPool<T extends DataObject>

All Superinterfaces:
Iterable<T>, ObjectPoolFactoryImplementation
All Known Subinterfaces:
WriteableObjectPool<T>
All Known Implementing Classes:
WriteableObjectPoolImpl

public interface ReadableObjectPool<T extends DataObject> extends Iterable<T>, ObjectPoolFactoryImplementation
A readable object pool is a container for DataObject. The pool provides special access methods that are interpreting the objectIds of the data objects.

A pool can contain arbitrary DataObjects. That means, that the objects can belong to different DataClasses.

Author:
Rainer Maximini
See Also:
  • Method Details

    • setId

      void setId(String id)
      Each Pool must have an id. This Id is used as base in objectId.
    • getId

      String getId()
      Each Pool must have an id. This Id is used as base in objectId.
    • getObject

      T getObject(String objectId)
      Returns:
      The object with the given id.
    • getObjectIds

      Set<String> getObjectIds()
      Returns:
      The set of all object ids.
    • getObjectIds

      Set<String> getObjectIds(DataClass dataClass)
      Returns:
      A set of the object ids for the specified data class.
    • iterator

      DataObjectIterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T extends DataObject>
      Returns:
      An iterator over all DataObjects.
    • size

      int size()
      Returns:
      The number of DataObjects in the pool.
    • getNESTGraphIds

      Set<String> getNESTGraphIds()
    • getNESTGraphObjectsRecursively

      Set<NESTWorkflowObject> getNESTGraphObjectsRecursively()
      Returns:
      A set of all NESTWorkflowObjects in the pool, no matter how deeply nested.
    • getCollection

      Collection<T> getCollection()
    • hasSameValueAsIn

      boolean hasSameValueAsIn(ReadableObjectPool objectPool)
      This method makes a deep compare. The elements in both pools are compared.
      Parameters:
      objectPool - The object pool to compare.
      Returns:
      true if the given object pool has the same objects as this one.
    • stream

      Stream<T> stream()
      This method is a short call for supplying a stream access to the graphs in the pool.
      Returns:
      a stream of the pool objects
    • toXML

      String toXML()
      Converts object pool to XML
      Returns:
      XML String