java.lang.Object
io.github.tonywasher.joceanus.prometheus.data.PrometheusDataInfoSet<T>
Type Parameters:
T - the data type
All Implemented Interfaces:
MetisDataItem.MetisDataObjectFormat, MetisFieldItem, Iterable<T>

public abstract class PrometheusDataInfoSet<T extends PrometheusDataInfoItem> extends Object implements MetisFieldItem, Iterable<T>
Representation of an information set extension of a DataItem.
Author:
Tony Washer
  • Constructor Details

  • Method Details

    • formatObject

      public String formatObject(OceanusDataFormatter pFormatter)
      Description copied from interface: MetisDataItem.MetisDataObjectFormat
      Obtain Object summary.
      Specified by:
      formatObject in interface MetisDataItem.MetisDataObjectFormat
      Parameters:
      pFormatter - the data formatter
      Returns:
      the display summary of the object
    • getOwner

      public PrometheusDataItem getOwner()
      Obtain owner.
      Returns:
      the owner
    • classIterator

      public abstract Iterator<PrometheusDataInfoClass> classIterator()
      Obtain class iterator for the underlying infoClasses.
      Returns:
      the Iterator
    • cloneTheDataInfoSet

      protected void cloneTheDataInfoSet(PrometheusDataInfoSet<T> pSource)
      Clone the dataInfoSet.
      Parameters:
      pSource - the InfoSet to clone
    • getValue

      public <X> X getValue(PrometheusDataInfoClass pInfoClass, Class<X> pClass)
      Obtain the value for the infoClass.
      Type Parameters:
      X - the infoClass
      Parameters:
      pInfoClass - the Info Class
      pClass - the Value Class
      Returns:
      the value
    • getListValue

      public List<?> getListValue(PrometheusDataInfoClass pInfoClass)
      Obtain the list iterator for the infoClass.
      Parameters:
      pInfoClass - the Info Class
      Returns:
      the iterator
    • isExisting

      public boolean isExisting(PrometheusDataInfoClass pInfoClass)
      Is there active values for the infoClass?
      Parameters:
      pInfoClass - the info class
      Returns:
      true/false
    • getField

      public PrometheusEncryptedPair getField(PrometheusDataInfoClass pInfoClass)
      Obtain the field value for the infoClass.
      Parameters:
      pInfoClass - the Info Class
      Returns:
      the value
    • getInfo

      public T getInfo(PrometheusDataInfoClass pInfoClass)
      Obtain the field value for the infoClass.
      Parameters:
      pInfoClass - the Info Class
      Returns:
      the value
    • linkValue

      public void linkValue(PrometheusDataInfoClass pInfoClass, PrometheusDataItem pLink) throws OceanusException
      link the value for the infoClass.
      Parameters:
      pInfoClass - the Info Class
      pLink - the link value
      Throws:
      OceanusException - on error
    • setListValue

      public void setListValue(PrometheusDataInfoClass pInfoClass, List<? extends PrometheusDataItem> pLinks) throws OceanusException
      set the list value for the infoClass.
      Parameters:
      pInfoClass - the Info Class
      pLinks - the links value
      Throws:
      OceanusException - on error
    • getInfoLinkSet

      protected PrometheusDataInfoLinkSet<T> getInfoLinkSet(PrometheusDataInfoClass pInfoClass)
      Obtain the infoLinkSet for the infoClass.
      Parameters:
      pInfoClass - the Info Class
      Returns:
      the value
    • fieldChanged

      public MetisDataDifference fieldChanged(PrometheusDataInfoClass pInfoClass)
      Determine whether a particular field has changed in this edit view.
      Parameters:
      pInfoClass - the class to test
      Returns:
      true/false
    • setValue

      public void setValue(PrometheusDataInfoClass pInfoClass, Object pValue) throws OceanusException
      Set the value for the infoClass.
      Parameters:
      pInfoClass - the Info Class
      pValue - the Value
      Throws:
      OceanusException - on error
    • sortLinkSets

      public void sortLinkSets()
      Sort linkSets.
    • registerInfo

      public void registerInfo(T pInfo) throws OceanusException
      Register Info.
      Parameters:
      pInfo - the info to register
      Throws:
      OceanusException - on error
    • deRegisterInfo

      public void deRegisterInfo(T pInfo)
      deRegister Info.
      Parameters:
      pInfo - the info to deRegister
    • rewindInfoLinkSet

      public void rewindInfoLinkSet(T pInfo)
      deRegister Info.
      Parameters:
      pInfo - the info to deRegister
    • wipeInfo

      public void wipeInfo(PrometheusDataInfoClass pInfoClass)
      wipe information regarding the infoClass.
      Parameters:
      pInfoClass - the Info Class
    • touchUnderlyingItems

      public void touchUnderlyingItems()
      touch underlying items.
    • touchOnUpdate

      public void touchOnUpdate()
      touch underlying items after update.
    • hasHistory

      public boolean hasHistory()
      Determine whether the set has changes.
      Returns:
      true/false
    • pushHistory

      public void pushHistory()
      Push history.
    • popHistory

      public void popHistory()
      Pop history.
    • checkForHistory

      public boolean checkForHistory()
      Check for history.
      Returns:
      true if changes were made, false otherwise
    • setDeleted

      public void setDeleted(boolean bDeleted)
      Set values as deleted/restored.
      Parameters:
      bDeleted - true/false
    • getEditState

      public MetisDataEditState getEditState()
      Get the EditState for this item.
      Returns:
      the EditState
    • getState

      public MetisDataState getState()
      Get the State for this infoSet.
      Returns:
      the State
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T extends PrometheusDataInfoItem>
    • forEach

      public void forEach(Consumer<? super T> pAction)
      Specified by:
      forEach in interface Iterable<T extends PrometheusDataInfoItem>
    • spliterator

      public Spliterator<T> spliterator()
      Specified by:
      spliterator in interface Iterable<T extends PrometheusDataInfoItem>
    • isEmpty

      public boolean isEmpty()
      Is the infoSet empty?
      Returns:
      true/false.
    • removeItems

      public void removeItems()
      Remove items.
    • getFieldForClass

      public abstract MetisDataItem.MetisDataFieldId getFieldForClass(PrometheusDataInfoClass pClass)
      Obtain the field for the infoSet class.
      Parameters:
      pClass - the class
      Returns:
      the field