Class PrometheusDataInfoSet<T extends PrometheusDataInfoItem>
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem
MetisFieldItem.MetisFieldDef, MetisFieldItem.MetisFieldItemType, MetisFieldItem.MetisFieldSetDef, MetisFieldItem.MetisFieldTableItem, MetisFieldItem.MetisFieldUpdatableItem, MetisFieldItem.MetisFieldVersionedDef -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrometheusDataInfoSet(PrometheusDataItem pOwner, PrometheusStaticDataItem.PrometheusStaticList<?> pTypeList, PrometheusDataInfoItem.PrometheusDataInfoList<T> pInfoList) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck for history.abstract Iterator<PrometheusDataInfoClass> Obtain class iterator for the underlying infoClasses.protected voidcloneTheDataInfoSet(PrometheusDataInfoSet<T> pSource) Clone the dataInfoSet.voiddeRegisterInfo(T pInfo) deRegister Info.fieldChanged(PrometheusDataInfoClass pInfoClass) Determine whether a particular field has changed in this edit view.voidformatObject(OceanusDataFormatter pFormatter) Obtain Object summary.Get the EditState for this item.getField(PrometheusDataInfoClass pInfoClass) Obtain the field value for the infoClass.abstract MetisDataItem.MetisDataFieldIdObtain the field for the infoSet class.getInfo(PrometheusDataInfoClass pInfoClass) Obtain the field value for the infoClass.protected PrometheusDataInfoLinkSet<T> getInfoLinkSet(PrometheusDataInfoClass pInfoClass) Obtain the infoLinkSet for the infoClass.List<?> getListValue(PrometheusDataInfoClass pInfoClass) Obtain the list iterator for the infoClass.getOwner()Obtain owner.getState()Get the State for this infoSet.<X> XgetValue(PrometheusDataInfoClass pInfoClass, Class<X> pClass) Obtain the value for the infoClass.booleanDetermine whether the set has changes.booleanisEmpty()Is the infoSet empty?booleanisExisting(PrometheusDataInfoClass pInfoClass) Is there active values for the infoClass?iterator()voidlinkValue(PrometheusDataInfoClass pInfoClass, PrometheusDataItem pLink) link the value for the infoClass.voidPop history.voidPush history.voidregisterInfo(T pInfo) Register Info.voidRemove items.voidrewindInfoLinkSet(T pInfo) deRegister Info.voidsetDeleted(boolean bDeleted) Set values as deleted/restored.voidsetListValue(PrometheusDataInfoClass pInfoClass, List<? extends PrometheusDataItem> pLinks) set the list value for the infoClass.voidsetValue(PrometheusDataInfoClass pInfoClass, Object pValue) Set the value for the infoClass.voidSort linkSets.voidtouch underlying items after update.voidtouch underlying items.voidwipeInfo(PrometheusDataInfoClass pInfoClass) wipe information regarding the infoClass.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem
getDataFieldSet
-
Constructor Details
-
PrometheusDataInfoSet
protected PrometheusDataInfoSet(PrometheusDataItem pOwner, PrometheusStaticDataItem.PrometheusStaticList<?> pTypeList, PrometheusDataInfoItem.PrometheusDataInfoList<T> pInfoList) Constructor.- Parameters:
pOwner- the Owner to which this Set belongspTypeList- the infoTypeList for the setpInfoList- the infoList for the set
-
-
Method Details
-
formatObject
Description copied from interface:MetisDataItem.MetisDataObjectFormatObtain Object summary.- Specified by:
formatObjectin interfaceMetisDataItem.MetisDataObjectFormat- Parameters:
pFormatter- the data formatter- Returns:
- the display summary of the object
-
getOwner
Obtain owner.- Returns:
- the owner
-
classIterator
Obtain class iterator for the underlying infoClasses.- Returns:
- the Iterator
-
cloneTheDataInfoSet
Clone the dataInfoSet.- Parameters:
pSource- the InfoSet to clone
-
getValue
Obtain the value for the infoClass.- Type Parameters:
X- the infoClass- Parameters:
pInfoClass- the Info ClasspClass- the Value Class- Returns:
- the value
-
getListValue
Obtain the list iterator for the infoClass.- Parameters:
pInfoClass- the Info Class- Returns:
- the iterator
-
isExisting
Is there active values for the infoClass?- Parameters:
pInfoClass- the info class- Returns:
- true/false
-
getField
Obtain the field value for the infoClass.- Parameters:
pInfoClass- the Info Class- Returns:
- the value
-
getInfo
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 ClasspLink- 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 ClasspLinks- the links value- Throws:
OceanusException- on error
-
getInfoLinkSet
Obtain the infoLinkSet for the infoClass.- Parameters:
pInfoClass- the Info Class- Returns:
- the value
-
fieldChanged
Determine whether a particular field has changed in this edit view.- Parameters:
pInfoClass- the class to test- Returns:
true/false
-
setValue
Set the value for the infoClass.- Parameters:
pInfoClass- the Info ClasspValue- the Value- Throws:
OceanusException- on error
-
sortLinkSets
public void sortLinkSets()Sort linkSets. -
registerInfo
Register Info.- Parameters:
pInfo- the info to register- Throws:
OceanusException- on error
-
deRegisterInfo
deRegister Info.- Parameters:
pInfo- the info to deRegister
-
rewindInfoLinkSet
deRegister Info.- Parameters:
pInfo- the info to deRegister
-
wipeInfo
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:
trueif changes were made,falseotherwise
-
setDeleted
public void setDeleted(boolean bDeleted) Set values as deleted/restored.- Parameters:
bDeleted-true/false
-
getEditState
Get the EditState for this item.- Returns:
- the EditState
-
getState
Get the State for this infoSet.- Returns:
- the State
-
iterator
- Specified by:
iteratorin interfaceIterable<T extends PrometheusDataInfoItem>
-
forEach
- Specified by:
forEachin interfaceIterable<T extends PrometheusDataInfoItem>
-
spliterator
- Specified by:
spliteratorin interfaceIterable<T extends PrometheusDataInfoItem>
-
isEmpty
public boolean isEmpty()Is the infoSet empty?- Returns:
- true/false.
-
removeItems
public void removeItems()Remove items. -
getFieldForClass
Obtain the field for the infoSet class.- Parameters:
pClass- the class- Returns:
- the field
-