Class MetisFieldVersionValues
java.lang.Object
io.github.tonywasher.joceanus.metis.field.MetisFieldVersionValues
- Direct Known Subclasses:
PrometheusEncryptedValues
Set of dataValues.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckValueType(MetisFieldItem.MetisFieldDef pField, Object pValue) Check the value.cloneIt()Clone this ValueSet.voidcopyFrom(MetisFieldVersionValues pPrevious) Initialise values from a previous set.differs(MetisFieldVersionValues pOriginal) Check for differences.booleanfieldChanged(MetisDataItem.MetisDataFieldId pFieldId, MetisFieldVersionValues pOriginal) Check for a difference in a particular field.fieldChanged(MetisFieldItem.MetisFieldDef pField, MetisFieldVersionValues pOriginal) Check for a difference in a particular field.Obtain the field definitions.protected MetisFieldVersionedItemgetItem()Obtain the underlying item.getValue(MetisDataItem.MetisDataFieldId pFieldId) Get the value.<X> XgetValue(MetisDataItem.MetisDataFieldId pFieldId, Class<X> pClazz) Get the value.getValue(MetisFieldItem.MetisFieldDef pField) Get the value.<X> XgetValue(MetisFieldItem.MetisFieldDef pField, Class<X> pClazz) Get the value as an object type.intObtain the version # of the values.inthashCode()booleanDetermine if this object is a record of a deletion event.voidsetDeletion(boolean pDeletion) Adjust deletion flag.voidsetUncheckedValue(MetisDataItem.MetisDataFieldId pFieldId, Object pValue) Set the value.voidsetUncheckedValue(MetisFieldItem.MetisFieldDef pField, Object pValue) Set the unchecked value.voidsetValue(MetisDataItem.MetisDataFieldId pFieldId, Object pValue) Set the value.voidsetValue(MetisFieldItem.MetisFieldDef pField, Object pValue) Set the value.voidsetVersion(int pVersion) Set the version # of the values.
-
Field Details
-
ERROR_NOTVERSIONED
The versioned error.- See Also:
-
-
Constructor Details
-
MetisFieldVersionValues
Constructor.- Parameters:
pItem- the associated item
-
-
Method Details
-
getFields
Obtain the field definitions.- Returns:
- the field definitions
-
getItem
Obtain the underlying item.- Returns:
- the item
-
getVersion
public int getVersion()Obtain the version # of the values.- Returns:
- the version #
-
setVersion
public void setVersion(int pVersion) Set the version # of the values.- Parameters:
pVersion- the version #
-
isDeletion
public boolean isDeletion()Determine if this object is a record of a deletion event.- Returns:
- true/false
-
setDeletion
public void setDeletion(boolean pDeletion) Adjust deletion flag.- Parameters:
pDeletion- true/false
-
cloneIt
Clone this ValueSet.- Returns:
- the cloned set
-
copyFrom
Initialise values from a previous set.- Parameters:
pPrevious- the previous valueSet
-
setValue
public void setValue(MetisDataItem.MetisDataFieldId pFieldId, Object pValue) throws OceanusException Set the value.- Parameters:
pFieldId- the fieldIdpValue- the value- Throws:
OceanusException- on error
-
setValue
Set the value.- Parameters:
pField- the fieldpValue- the value- Throws:
OceanusException- on error
-
setUncheckedValue
Set the value.- Parameters:
pFieldId- the fieldIdpValue- the value
-
setUncheckedValue
Set the unchecked value.- Parameters:
pField- the fieldpValue- the value
-
getValue
Get the value.- Parameters:
pFieldId- the fieldId- Returns:
- the value
-
getValue
Get the value.- Parameters:
pField- the field- Returns:
- the value
-
getValue
Get the value.- Type Parameters:
X- the required type- Parameters:
pFieldId- the fieldIdpClazz- the class- Returns:
- the value
-
getValue
Get the value as an object type.- Type Parameters:
X- the required type- Parameters:
pField- the fieldpClazz- the class- Returns:
- the value
-
equals
-
hashCode
public int hashCode() -
differs
Check for differences.- Parameters:
pOriginal- the object to check for differences- Returns:
- the difference
-
fieldChanged
public MetisDataDifference fieldChanged(MetisDataItem.MetisDataFieldId pFieldId, MetisFieldVersionValues pOriginal) Check for a difference in a particular field.- Parameters:
pFieldId- the field to check for differencespOriginal- the original value set- Returns:
- the difference
-
fieldChanged
public MetisDataDifference fieldChanged(MetisFieldItem.MetisFieldDef pField, MetisFieldVersionValues pOriginal) Check for a difference in a particular field.- Parameters:
pField- the field to check for differencespOriginal- the original value set- Returns:
- the difference
-
checkValueType
protected void checkValueType(MetisFieldItem.MetisFieldDef pField, Object pValue) throws OceanusException Check the value.- Parameters:
pField- the fieldpValue- the value- Throws:
OceanusException- on error
-