public final class ModData
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
ModData(DBField field,
java.lang.Object originalValue,
GlobalKey originalKey)
Creates a new modification data for a field.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone the mod data
|
GlobalKey |
getCurrentKey()
Gets the current global key for this LINKED field
|
java.lang.Object |
getCurrentValue()
The current value of the field.
|
GlobalKey |
getDefaultKey()
The default value's global key
|
java.lang.Object |
getDefaultValue()
What is the "default" value for this field ?
A DBObject that is NEW and only contains default values is said to be EMPTY.
|
DBField |
getField()
The field that this modification data is for.
|
java.lang.Long |
getKey()
The global key of the field for which this modification data is for.
|
DBClass |
getLookupClass()
returns the Lookup Class.
|
DBField |
getLookupFld()
returns the Lookup Field.
|
java.lang.String |
getLookupValue()
returns the Lookup Value.
|
GlobalKey |
getOriginalKey()
The original global key for this field.
|
java.lang.Object |
getOriginalValue()
The original value for this field.
|
GlobalKey |
getPreviousKey()
returns the previous global key.
|
java.lang.Object |
getPreviousValue()
The previous value of these field.
|
boolean |
isChangedByUser()
Was this field changed by the user ?
|
void |
setChangedByUser(boolean flag)
mark as changed by the user.
|
void |
setCurrentKey(GlobalKey gk)
Sets the current global key for the field.
|
void |
setCurrentValue(java.lang.Object value)
Sets the current value of this field.
|
void |
setDefaultKey(GlobalKey gk)
Sets the default's value global key
|
void |
setDefaultValue(java.lang.Object value)
Sets the default value of the field.
|
void |
setLookup(DBClass cls,
DBField fld,
java.lang.String val)
Sets the previous global key
|
void |
setPreviousKey(GlobalKey gk)
Sets the previous global key
|
void |
setPreviousValue(java.lang.Object value)
Sets the previous value of the field.
|
public ModData(@Nonnull DBField field, @Nullable java.lang.Object originalValue, @Nullable GlobalKey originalKey)
field
- The field that has been changed.originalValue
- The original value of the field which is non mutable.originalKey
- The original global key for a field which will be non mutable.public void setChangedByUser(boolean flag)
flag
- Was changed ?@CheckReturnValue public boolean isChangedByUser()
@CheckReturnValue @Nonnull public java.lang.Long getKey()
@CheckReturnValue @Nonnull public DBField getField()
@CheckReturnValue @Nullable public java.lang.Object getCurrentValue()
public void setCurrentValue(java.lang.Object value)
value
- The current value.@CheckReturnValue @Nullable public GlobalKey getCurrentKey()
public void setCurrentKey(GlobalKey gk)
gk
- The current global key.@CheckReturnValue @Nullable public java.lang.Object getDefaultValue()
@CheckReturnValue @Nonnull public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- should not happenpublic void setDefaultValue(java.lang.Object value)
value
- The default value.@CheckReturnValue @Nullable public GlobalKey getDefaultKey()
public void setDefaultKey(GlobalKey gk)
gk
- The default global key for this field.@CheckReturnValue @Nullable public java.lang.Object getOriginalValue()
@CheckReturnValue @Nullable public GlobalKey getOriginalKey()
@CheckReturnValue @Nullable public java.lang.Object getPreviousValue()
public void setPreviousValue(java.lang.Object value)
value
- The previous value.@CheckReturnValue @Nullable public GlobalKey getPreviousKey()
public void setPreviousKey(GlobalKey gk)
gk
- The previous global key.@CheckReturnValue @Nullable public DBClass getLookupClass()
@CheckReturnValue @Nullable public DBField getLookupFld()
@CheckReturnValue @Nullable public java.lang.String getLookupValue()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.