Class PrometheusDataSet
java.lang.Object
io.github.tonywasher.joceanus.prometheus.data.PrometheusDataSet
- All Implemented Interfaces:
MetisDataItem.MetisDataObjectFormat,MetisFieldItem,PrometheusCryptographyData.PrometheusCryptographicDataSet,PrometheusData.PrometheusDataSetCtl,PrometheusData.PrometheusDataSetListCtl
public abstract class PrometheusDataSet
extends Object
implements MetisFieldItem, PrometheusCryptographyData.PrometheusCryptographicDataSet
DataSet definition and list. A DataSet is a set of DataLists backed by the three security lists.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem
MetisFieldItem.MetisFieldDef, MetisFieldItem.MetisFieldItemType, MetisFieldItem.MetisFieldSetCtl<T extends MetisFieldItem>, MetisFieldItem.MetisFieldSetDef, MetisFieldItem.MetisFieldTableItem, MetisFieldItem.MetisFieldVersionedDef -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrometheusDataSet(PrometheusDataSet pSource) Constructor for a cloned DataSet.protectedPrometheusDataSet(PrometheusToolkit pToolkit) Constructor for new empty DataSet. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddList(MetisListKey pListType, PrometheusDataList<?> pList) Add DataList to list of lists.protected voidbuildEmptyCloneSet(PrometheusDataSet pSource) Build an empty clone dataSet.voidcheckSecurity(TethysUIThreadStatusReport pReport) Check Security for incomplete security operations.abstract PrometheusDataSetConstruct a Clone for a DataSet.protected voidderiveCloneSet(PrometheusDataSet pSource) Construct a Clone for a DataSet.protected voidderiveDifferences(TethysUIThreadStatusReport pReport, PrometheusDataSet pNew, PrometheusDataSet pOld) Construct a difference extract between two DataSets.abstract PrometheusDataSetConstruct an update extract for a FinanceData Set.protected voidderiveUpdateSet(PrometheusDataSet pSource) Construct an update extract for a DataSet.Obtain list iterator.booleanformatObject(OceanusDataFormatter pFormatter) Obtain Object summary.Get the control record.Get ControlData.Get the control key.Get ControlKeys.Get ControlKeySets.Obtain the data formatter.Get DataKeySets.<L extends PrometheusData.PrometheusDataListCtl<?>>
LgetDataList(MetisListKey pListType, Class<L> pListClass) Obtain the list for a class.<L extends PrometheusDataList<?>>
LgetDataList(Class<L> pListClass) Obtain DataList for an list class.abstract PrometheusDataSetgetDifferenceSet(TethysUIThreadStatusReport pReport, PrometheusDataSet pOld) Construct a difference extract between two DataSets.Get the Password Hash.protected ObjectgetFieldListValue(MetisListKey pListType) Obtain debug value for list.Get KeySetSpec.protected Map<MetisListKey, PrometheusDataList<?>> Get List Map.intGet Number of activeKeySets.Get Password Manager.getValidator(MetisListKey pItemType) Obtain a validator fot=r the itemType.intGet Version.booleanhasDataType(MetisListKey pDataType) Does this list have the dataType?inthashCode()booleanDetermine whether the Data-set has updates.voidinitialiseSecurity(TethysUIThreadStatusReport pReport, PrometheusDataSet pBase) Initialise Security from database (if present).booleanisEmpty()Determine whether a DataSet has entries.iterator()Obtain list iterator.Obtain listKey iterator.voidreBase(TethysUIThreadStatusReport pReport, PrometheusDataSet pOld) ReBase this data set against an earlier version.voidrenewSecurity(TethysUIThreadStatusReport pReport) Renew Security.voidReset changes in a dataSet.voidrewindToVersion(int pVersion) Rewind items to the required version.voidSet the validator factory.voidsetVersion(int pVersion) Set Version.voidUndo changes in a dataSet.voidupdateFactoryLock(TethysUIThreadStatusReport pReport, String pSource) Update data with a new password.voidupdateSecurity(TethysUIThreadStatusReport pReport) Update Security.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.tonywasher.joceanus.metis.field.MetisFieldItem
getDataFieldSet
-
Field Details
-
HASH_PRIME
protected static final int HASH_PRIMEThe Hash prime.- See Also:
-
-
Constructor Details
-
PrometheusDataSet
Constructor for new empty DataSet.- Parameters:
pToolkit- the toolkit set
-
PrometheusDataSet
Constructor for a cloned DataSet.- Parameters:
pSource- the source DataSet
-
-
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
-
getDataFormatter
Description copied from interface:PrometheusData.PrometheusDataSetCtlObtain the data formatter.- Specified by:
getDataFormatterin interfacePrometheusData.PrometheusDataSetCtl- Returns:
- the formatter
-
setValidatorFactory
Set the validator factory.- Parameters:
pFactory- the validator factory
-
getValidator
Description copied from interface:PrometheusData.PrometheusDataSetCtlObtain a validator fot=r the itemType.- Specified by:
getValidatorin interfacePrometheusData.PrometheusDataSetCtl- Parameters:
pItemType- the itemType- Returns:
- the validator.
-
getPasswordMgr
Description copied from interface:PrometheusData.PrometheusDataSetCtlGet Password Manager.- Specified by:
getPasswordMgrin interfacePrometheusData.PrometheusDataSetCtl- Returns:
- the password manager
-
getControlKeys
Get ControlKeys.- Returns:
- the controlKeys
-
getControlKeySets
Get ControlKeySets.- Returns:
- the controlKeySets
-
getDataKeySets
Get DataKeySets.- Returns:
- the dataKeySets
-
getControlData
Get ControlData.- Returns:
- the controlData
-
getVersion
public int getVersion()Description copied from interface:PrometheusData.PrometheusDataSetCtlGet Version.- Specified by:
getVersionin interfacePrometheusData.PrometheusDataSetCtl- Returns:
- the version
-
getNumActiveKeySets
public int getNumActiveKeySets()Get Number of activeKeySets.- Specified by:
getNumActiveKeySetsin interfacePrometheusData.PrometheusDataSetCtl- Returns:
- the # active KeySets
-
getKeySetSpec
Description copied from interface:PrometheusData.PrometheusDataSetCtlGet KeySetSpec.- Specified by:
getKeySetSpecin interfacePrometheusData.PrometheusDataSetCtl- Returns:
- the keySetSpec
-
getListMap
Get List Map.- Returns:
- the list map
-
hasDataType
Description copied from interface:PrometheusData.PrometheusDataSetListCtlDoes this list have the dataType?- Specified by:
hasDataTypein interfacePrometheusData.PrometheusDataSetListCtl- Parameters:
pDataType- the dataType- Returns:
- true/false
-
deriveCloneSet
Construct a Clone for a DataSet.- Returns:
- the extract
- Throws:
OceanusException- on error
-
buildEmptyCloneSet
Build an empty clone dataSet.- Parameters:
pSource- the source DataSet- Throws:
OceanusException- on error
-
deriveCloneSet
Construct a Clone for a DataSet.- Parameters:
pSource- the source DataSet- Throws:
OceanusException- on error
-
deriveUpdateSet
Construct an update extract for a FinanceData Set.- Returns:
- the extract
- Throws:
OceanusException- on error
-
deriveUpdateSet
Construct an update extract for a DataSet.- Parameters:
pSource- the source of the extract- Throws:
OceanusException- on error
-
getDifferenceSet
public abstract PrometheusDataSet getDifferenceSet(TethysUIThreadStatusReport pReport, PrometheusDataSet pOld) throws OceanusException Construct a difference extract between two DataSets. The difference extract will only contain items that differ between the two DataSets. Items that are in the new list, but not in the old list will be viewed as inserted. Items that are in the old list but not in the new list will be viewed as deleted. Items that are in both list but differ will be viewed as changed- Parameters:
pReport- the reportpOld- The old list to extract from- Returns:
- the difference set
- Throws:
OceanusException- on error
-
deriveDifferences
protected void deriveDifferences(TethysUIThreadStatusReport pReport, PrometheusDataSet pNew, PrometheusDataSet pOld) throws OceanusException Construct a difference extract between two DataSets. The difference extract will only contain items that differ between the two DataSets. Items that are in the new list, but not in the old list will be viewed as inserted. Items that are in the old list but not in the new list will be viewed as deleted. Items that are in both list but differ will be viewed as changed- Parameters:
pReport- the reportpNew- The new list to comparepOld- The old list to compare- Throws:
OceanusException- on error
-
reBase
public void reBase(TethysUIThreadStatusReport pReport, PrometheusDataSet pOld) throws OceanusException ReBase this data set against an earlier version.- Parameters:
pReport- the reportpOld- The old data to reBase against- Throws:
OceanusException- on error
-
addList
Add DataList to list of lists.- Parameters:
pListType- the list typepList- the list to add
-
getDataList
public <L extends PrometheusData.PrometheusDataListCtl<?>> L getDataList(MetisListKey pListType, Class<L> pListClass) Description copied from interface:PrometheusData.PrometheusDataSetListCtlObtain the list for a class.- Specified by:
getDataListin interfacePrometheusData.PrometheusDataSetListCtl- Type Parameters:
L- the list type- Parameters:
pListType- the data typepListClass- the list class- Returns:
- the list
-
getFieldListValue
Obtain debug value for list.- Parameters:
pListType- the list type- Returns:
- true/false
-
getDataList
Obtain DataList for an list class.- Type Parameters:
L- the List type- Parameters:
pListClass- the class of the list- Returns:
- the list of items
-
setVersion
public void setVersion(int pVersion) Set Version.- Specified by:
setVersionin interfacePrometheusData.PrometheusDataSetCtl- Parameters:
pVersion- the version
-
rewindToVersion
public void rewindToVersion(int pVersion) Rewind items to the required version.- Parameters:
pVersion- the version to rewind to
-
equals
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty()Determine whether a DataSet has entries.- Returns:
trueif the DataSet has entries
-
hasUpdates
public boolean hasUpdates()Determine whether the Data-set has updates.- Returns:
trueif the Data-set has updates,falseif not
-
getControl
Get the control record.- Specified by:
getControlin interfacePrometheusCryptographyData.PrometheusCryptographicDataSet- Returns:
- the control record
-
getControlKey
Description copied from interface:PrometheusCryptographyData.PrometheusCryptographicDataSetGet the control key.- Specified by:
getControlKeyin interfacePrometheusCryptographyData.PrometheusCryptographicDataSet- Returns:
- the control key
-
initialiseSecurity
public void initialiseSecurity(TethysUIThreadStatusReport pReport, PrometheusDataSet pBase) throws OceanusException Initialise Security from database (if present).- Parameters:
pReport- the reportpBase- the database data- Throws:
OceanusException- on error
-
renewSecurity
Renew Security.- Parameters:
pReport- the report- Throws:
OceanusException- on error
-
checkSecurity
Check Security for incomplete security operations.- Parameters:
pReport- the report- Throws:
OceanusException- on error
-
updateSecurity
Update Security.- Parameters:
pReport- the report- Throws:
OceanusException- on error
-
getFactoryLock
Get the Password Hash.- Returns:
- the password hash
- Throws:
OceanusException- on error
-
updateFactoryLock
public void updateFactoryLock(TethysUIThreadStatusReport pReport, String pSource) throws OceanusException Update data with a new password.- Parameters:
pReport- the reportpSource- the source of the data- Throws:
OceanusException- on error
-
undoLastChange
public void undoLastChange()Undo changes in a dataSet. -
resetChanges
public void resetChanges()Reset changes in a dataSet. -
iterator
Obtain list iterator.- Returns:
- the iterator
-
entryIterator
Obtain list iterator.- Returns:
- the iterator
-
keyIterator
Obtain listKey iterator.- Returns:
- the iterator
-