Class PrometheusDataInfoLinkSet<T extends PrometheusDataInfoItem>
java.lang.Object
io.github.tonywasher.joceanus.metis.field.MetisFieldVersionedItem
io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem
io.github.tonywasher.joceanus.prometheus.data.PrometheusEncryptedDataItem
io.github.tonywasher.joceanus.prometheus.data.PrometheusDataInfoItem
io.github.tonywasher.joceanus.prometheus.data.PrometheusDataInfoLinkSet<T>
- Type Parameters:
T- the data type
- All Implemented Interfaces:
MetisDataItem.MetisDataDeletableItem,MetisDataItem.MetisDataIndexedItem,MetisDataItem.MetisDataObjectFormat,MetisFieldItem,MetisFieldItem.MetisFieldTableItem,MetisFieldItem.MetisFieldUpdatableItem,PrometheusTableItem,Comparable<Object>
public class PrometheusDataInfoLinkSet<T extends PrometheusDataInfoItem>
extends PrometheusDataInfoItem
Representation of a set of DataInfo links for a DataItem.
- Author:
- Tony Washer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classValue List.Nested classes/interfaces inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusDataInfoItem
PrometheusDataInfoItem.PrometheusDataInfoList<T extends PrometheusDataInfoItem>Nested classes/interfaces inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusEncryptedDataItem
PrometheusEncryptedDataItem.PrometheusEncryptedList<T extends PrometheusEncryptedDataItem>Nested classes/interfaces inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem
MetisFieldItem.MetisFieldDef, MetisFieldItem.MetisFieldItemType, MetisFieldItem.MetisFieldSetDef, MetisFieldItem.MetisFieldTableItem, MetisFieldItem.MetisFieldUpdatableItem, MetisFieldItem.MetisFieldVersionedDefNested classes/interfaces inherited from interface io.github.tonywasher.joceanus.prometheus.data.PrometheusTableItem
PrometheusTableItem.PrometheusTableList<T extends PrometheusTableItem> -
Field Summary
FieldsFields inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusDataInfoItem
DATALEN, ERROR_BADDATA, ERROR_BADDATATYPE, ERROR_BADINFOCLASSFields inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem
DESCLEN, ERROR_CREATEITEM, ERROR_DISABLED, ERROR_DUPLICATE, ERROR_EXIST, ERROR_INVALIDCHAR, ERROR_LENGTH, ERROR_MISSING, ERROR_MULT, ERROR_NEGATIVE, ERROR_POSITIVE, ERROR_RANGE, ERROR_RESOLUTION, ERROR_UNKNOWN, ERROR_VALIDATION, ERROR_ZERO, NAMELEN -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrometheusDataInfoLinkSet(PrometheusDataInfoItem.PrometheusDataInfoList<T> pList, PrometheusDataInfoLinkSet<T> pSet) Constructor.protectedPrometheusDataInfoLinkSet(PrometheusDataInfoItem.PrometheusDataInfoList<T> pList, PrometheusDataItem pOwner, PrometheusStaticDataItem pInfoType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNewLinks(List<? extends PrometheusDataItem> pActive) Add/restore all required links.booleanCheck to see whether any changes were made.voidClear all the links.voidclearUnnecessaryLinks(List<? extends PrometheusDataItem> pActive) Clear all unnecessary links.Determine whether any item has changed in this edit view.formatObject(OceanusDataFormatter pFormatter) Obtain Object summary.Obtain Active Links.Obtain the fieldSet.Obtain InfoClass.Obtain InfoType.getItemForValue(PrometheusDataItem pValue) Obtain item linked to value.getOwner()Obtain Owner.getState()Get the State for this infoSet.booleanIs there any history.booleanisEmpty()Is the link list empty?booleanIs there active values for the infoClass?booleanisItemLinked(T pItem) Check whether an item is linked.iterator()Obtain an iterator through the list.voidAdd link to Item.voidRemove the last changes for the history buffer and restore values from it.voidPush current values into history buffer ready for changes to be made.voidsetDeleted(boolean bDeleted) Set the deleted flags for the item.protected voidSort the list.voidAdjust touches on update.voidTouch underlying items that are referenced by this item.voidunlinkItem(T pItem) Remove link to Item.Methods inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusDataInfoItem
compareValues, getField, getField, getInfoTypeId, getLink, getLink, getLinkName, getOwnerId, getValue, getValue, getValueBytes, markDeleted, rewindInfoLinkSet, rewindToVersion, setValue, setValueBytes, setValueInfoType, setValueInfoType, setValueInfoType, setValueLink, setValueLink, setValueOwner, setValueOwner, setValueOwner, setValueValue, setValueValue, toStringMethods inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusEncryptedDataItem
adoptSecurity, getDataKeySet, getDataKeySetId, getDifference, getEncryptor, getList, getOriginalValues, getValues, initialiseSecurity, newVersionValues, resolveDataSetLinks, setDataKeySet, setDataKeySet, setEncryptedValue, setEncryptedValue, setEncryptedValue, setNextDataKeySet, updateSecurityMethods inherited from class io.github.tonywasher.joceanus.prometheus.data.PrometheusDataItem
addError, adjustMapForItem, applyChanges, byteLength, clearActive, clearTouches, compareId, compareTo, deRegister, equals, fieldChanged, getBase, getBaseState, getDataSet, getFieldState, getItemState, getItemType, getNextVersion, getStyle, getTouchStatus, getValueSetVersion, hashCode, includeXmlField, indexOf, isActive, isDisabled, isEditable, isHeader, isListLocked, isLocked, removeItem, resolveDataLink, setBase, setHeader, setHistory, setNewVersion, setValidEdit, touchItem, unLink, updateMaps, validate, validStringMethods inherited from class io.github.tonywasher.joceanus.metis.field.MetisFieldVersionedItem
adjustState, clearErrors, clearHistory, condenseHistory, fieldChanged, getEditState, getFieldErrors, getFieldErrors, getFirstError, getIndexedId, getOriginalVersion, getValidation, getValuesHistory, getVersion, getVersionedField, hasChanges, hasErrors, hasErrors, isDeleted, isValid, maybePopHistory, pushHistory, resetHistory, setEditState, setHistory, setIndexedId, setItemType, setValuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.tonywasher.joceanus.metis.data.MetisDataItem.MetisDataDeletableItem
isDeletedMethods inherited from interface io.github.tonywasher.joceanus.metis.data.MetisDataItem.MetisDataIndexedItem
getIndexedIdMethods inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem.MetisFieldUpdatableItem
getFieldErrors, getFieldErrors, getValuesHistory, hasErrors, skipField
-
Field Details
-
ITEM_SEP
Item separator.- See Also:
-
-
Constructor Details
-
PrometheusDataInfoLinkSet
protected PrometheusDataInfoLinkSet(PrometheusDataInfoItem.PrometheusDataInfoList<T> pList, PrometheusDataItem pOwner, PrometheusStaticDataItem pInfoType) Constructor.- Parameters:
pList- the infoListpOwner- the set ownerpInfoType- the info type
-
PrometheusDataInfoLinkSet
protected PrometheusDataInfoLinkSet(PrometheusDataInfoItem.PrometheusDataInfoList<T> pList, PrometheusDataInfoLinkSet<T> pSet) Constructor.- Parameters:
pList- the infoListpSet- the infoLinkSet to clone
-
-
Method Details
-
getDataFieldSet
Description copied from interface:MetisFieldItemObtain the fieldSet.- Specified by:
getDataFieldSetin interfaceMetisFieldItem- Overrides:
getDataFieldSetin classMetisFieldVersionedItem- Returns:
- the fieldSet
-
formatObject
Description copied from interface:MetisDataItem.MetisDataObjectFormatObtain Object summary.- Specified by:
formatObjectin interfaceMetisDataItem.MetisDataObjectFormat- Overrides:
formatObjectin classPrometheusDataInfoItem- Parameters:
pFormatter- the data formatter- Returns:
- the display summary of the object
-
getOwner
Description copied from class:PrometheusDataInfoItemObtain Owner.- Specified by:
getOwnerin classPrometheusDataInfoItem- Returns:
- the Owner
-
getInfoType
Description copied from class:PrometheusDataInfoItemObtain InfoType.- Specified by:
getInfoTypein classPrometheusDataInfoItem- Returns:
- the InfoTypeId
-
getInfoClass
Description copied from class:PrometheusDataInfoItemObtain InfoClass.- Specified by:
getInfoClassin classPrometheusDataInfoItem- Returns:
- the InfoClass
-
getActive
Obtain Active Links.- Returns:
- the Owner
-
isEmpty
public boolean isEmpty()Is the link list empty?- Returns:
- true/false
-
linkItem
Add link to Item.- Parameters:
pItem- the item to link to
-
unlinkItem
Remove link to Item.- Parameters:
pItem- the item to unlink
-
isItemLinked
Check whether an item is linked.- Parameters:
pItem- the item to check- Returns:
- true/false
-
getItemForValue
Obtain item linked to value.- Parameters:
pValue- the value to check- Returns:
- true/false
-
clearAllLinks
public void clearAllLinks()Clear all the links. -
addNewLinks
Add/restore all required links.- Parameters:
pActive- the active items- Throws:
OceanusException- on error
-
clearUnnecessaryLinks
Clear all unnecessary links.- Parameters:
pActive- the active items
-
sortLinks
protected void sortLinks()Sort the list. -
fieldChanged
Determine whether any item has changed in this edit view.- Returns:
true/false
-
hasHistory
public boolean hasHistory()Description copied from class:MetisFieldVersionedItemIs there any history.- Overrides:
hasHistoryin classMetisFieldVersionedItem- Returns:
- whether there are entries in the history list
-
pushHistory
public void pushHistory()Description copied from interface:MetisFieldItem.MetisFieldUpdatableItemPush current values into history buffer ready for changes to be made.- Specified by:
pushHistoryin interfaceMetisFieldItem.MetisFieldUpdatableItem- Overrides:
pushHistoryin classMetisFieldVersionedItem
-
popHistory
public void popHistory()Description copied from interface:MetisFieldItem.MetisFieldUpdatableItemRemove the last changes for the history buffer and restore values from it.- Specified by:
popHistoryin interfaceMetisFieldItem.MetisFieldUpdatableItem- Overrides:
popHistoryin classPrometheusDataItem
-
checkForHistory
public boolean checkForHistory()Description copied from interface:MetisFieldItem.MetisFieldUpdatableItemCheck to see whether any changes were made. If no changes were made remove last saved history since it is not needed.- Specified by:
checkForHistoryin interfaceMetisFieldItem.MetisFieldUpdatableItem- Overrides:
checkForHistoryin classMetisFieldVersionedItem- Returns:
trueif changes were made,falseotherwise
-
getState
Get the State for this infoSet.- Overrides:
getStatein classMetisFieldVersionedItem- Returns:
- the State
-
isExisting
public boolean isExisting()Is there active values for the infoClass?- Returns:
- true/false
-
setDeleted
public void setDeleted(boolean bDeleted) Description copied from interface:MetisDataItem.MetisDataDeletableItemSet the deleted flags for the item.- Specified by:
setDeletedin interfaceMetisDataItem.MetisDataDeletableItem- Overrides:
setDeletedin classMetisFieldVersionedItem- Parameters:
bDeleted- true/false
-
touchUnderlyingItems
public void touchUnderlyingItems()Description copied from class:PrometheusDataItemTouch underlying items that are referenced by this item.- Overrides:
touchUnderlyingItemsin classPrometheusDataInfoItem
-
touchOnUpdate
public void touchOnUpdate()Description copied from class:PrometheusDataItemAdjust touches on update.- Overrides:
touchOnUpdatein classPrometheusDataItem
-
iterator
Obtain an iterator through the list.- Returns:
- the iterator
-