Class PrometheusEditSet
java.lang.Object
io.github.tonywasher.joceanus.prometheus.views.PrometheusEditSet
- All Implemented Interfaces:
MetisDataItem.MetisDataObjectFormat,MetisFieldItem,OceanusEventRegistrar.OceanusEventProvider<PrometheusDataEvent>,PrometheusDataList.PrometheusDataListSet
public class PrometheusEditSet
extends Object
implements MetisFieldItem, OceanusEventRegistrar.OceanusEventProvider<PrometheusDataEvent>, PrometheusDataList.PrometheusDataListSet
Provides control of a set of update-able DataLists.
-
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
ConstructorsConstructorDescriptionPrometheusEditSet(PrometheusDataControl pControl) Constructor for an update list.PrometheusEditSet(PrometheusDataControl pControl, PrometheusDataSet pDataSet) Constructor for an update list. -
Method Summary
Modifier and TypeMethodDescriptionformatObject(OceanusDataFormatter pFormatter) Obtain Object summary.Obtain the fieldSet.<L extends PrometheusDataList<?>>
LgetDataList(MetisListKey pDataType, Class<L> pClass) Obtain the list for a class.Obtain the dataSet.Get the edit state of this set of tables.Obtain registration object for listeners.intObtain the version.booleanhasDataType(MetisListKey pDataType) Does this list have the dataType?booleanHas this UpdateSet got errors?booleanHas this UpdateSet got updates?voidIncrement Version.Is the item editing?Obtain an iterator over the listKeys.Obtain an iterator over the listKeys.voidprocessCommand(PrometheusUIEvent pCmd, MetisErrorPanel pError) Process Save command.voidprocessEditCommand(PrometheusUIEvent pCmd, int pVersion, MetisErrorPanel pError) Process Edit command.<T extends PrometheusDataItem>
PrometheusEditEntry<T> registerType(MetisListKey pDataType) Register an entry for a class.voidsetDataSet(PrometheusDataSet pDataSet) Set the dataSet.<T extends PrometheusDataItem>
voidsetEditEntryList(MetisListKey pDataType, PrometheusDataList<T> pList) Set the editEntry for a type.voidsetEditing(Boolean pFlag) Set editing flag.voidvalidate()Validate the updateSet.
-
Constructor Details
-
PrometheusEditSet
Constructor for an update list.- Parameters:
pControl- the Data Control
-
PrometheusEditSet
Constructor for an update list.- Parameters:
pControl- the Data ControlpDataSet- the DataSet
-
-
Method Details
-
getDataFieldSet
Description copied from interface:MetisFieldItemObtain the fieldSet.- Specified by:
getDataFieldSetin interfaceMetisFieldItem- Returns:
- the fieldSet
-
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
-
getEventRegistrar
Description copied from interface:OceanusEventRegistrar.OceanusEventProviderObtain registration object for listeners.- Specified by:
getEventRegistrarin interfaceOceanusEventRegistrar.OceanusEventProvider<PrometheusDataEvent>- Returns:
- the registrar
-
setEditing
Set editing flag.- Parameters:
pFlag- the editing flag
-
isEditing
Is the item editing?- Returns:
- true/false
-
getVersion
public int getVersion()Obtain the version.- Returns:
- the version
-
getDataSet
Obtain the dataSet.- Returns:
- the dataSet
-
setDataSet
Set the dataSet.- Parameters:
pDataSet- the dataSet
-
registerType
Register an entry for a class.- Type Parameters:
T- the object type- Parameters:
pDataType- the data type- Returns:
- the list class entry
-
getDataList
Obtain the list for a class.Will look first for the list in the updateSet and then in the underlying data.
- Specified by:
getDataListin interfacePrometheusDataList.PrometheusDataListSet- Type Parameters:
L- the list type- Parameters:
pDataType- the data typepClass- the list class- Returns:
- the list
-
hasDataType
Description copied from interface:PrometheusDataList.PrometheusDataListSetDoes this list have the dataType?- Specified by:
hasDataTypein interfacePrometheusDataList.PrometheusDataListSet- Parameters:
pDataType- the dataType- Returns:
- true/false
-
setEditEntryList
public <T extends PrometheusDataItem> void setEditEntryList(MetisListKey pDataType, PrometheusDataList<T> pList) Set the editEntry for a type.- Type Parameters:
T- the dataType- Parameters:
pDataType- the data typepList- the list
-
keyIterator
Obtain an iterator over the listKeys.- Returns:
- the iterator
-
listIterator
Obtain an iterator over the listKeys.- Returns:
- the iterator
-
incrementVersion
public void incrementVersion()Increment Version. -
hasUpdates
public boolean hasUpdates()Has this UpdateSet got updates?- Returns:
- true/false
-
hasErrors
public boolean hasErrors()Has this UpdateSet got errors?- Returns:
- true/false
-
validate
public void validate()Validate the updateSet. -
getEditState
Get the edit state of this set of tables.- Returns:
- the edit state
-
processCommand
Process Save command.- Parameters:
pCmd- the command.pError- the error panel
-
processEditCommand
Process Edit command.- Parameters:
pCmd- the command.pVersion- the versionpError- the error panel
-