public class ComhandleFieldRef extends comhandle
All writing is done to both the DMO and the local comhandle
's private value
.
On instantiation, the current field value is saved in the comhandle
's private
value
, and this instance will be used for reading until assign(com.goldencode.p2j.util.Undoable)
or
setUnknown()
is called again.
This usage is OK
Modifier and Type | Field and Description |
---|---|
private FieldReference |
fieldRef
The field referenced by this instance.
|
Constructor and Description |
---|
ComhandleFieldRef(DataModelObject dmo,
java.lang.String property)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
assign(BaseDataType value)
Sets the state (data and unknown value) of this instance based on the state of the passed
instance.
|
void |
assign(ComObject newVal)
Dedicated assignment method for loading a
ComObject into this comhandle . |
void |
assign(Undoable value)
Modify the contained data of the instance to copy the instance data from the given instance.
|
void |
setUnknown()
Sets the state of this instance's
unknown value flag or state to true . |
_isValid, call, call, chain, chainCall, compareTo, defaultFormatString, duplicate, fromResourceId, fromString, getProperty, getResource, hashCode, instantiateUnknown, isUnknown, isValid, readExternal, removeResource, resourceId, setIndexedProperty, setProperty, showAccessError, toString, toString, toStringExport, toStringMessage, unwrapComObject, writeExternal
calcFormatLength, deepCopy, elementsOfType, equals, formatLength, generateDefault, generateUnknown, getTypeName, incompatibleTypesOnConversion, initializeDefaultExtent, instantiateDefault, instantiateDefaultExtent, isUnknownValue, maximum, minimum, notUnknownValue, sameType
changed, checkUndoable, checkUndoable, checkUndoable, isGlobal, isUndoable, markUndoable, popBlock, rollback, setGlobal
private final FieldReference fieldRef
public ComhandleFieldRef(DataModelObject dmo, java.lang.String property)
dmo
- Proxy for record whose field is being accessed.property
- Name of dmo field.public void assign(Undoable value)
assign
method is called, although this is not a strict requirement.
Also updates the fieldRef
with the new state of this comhandle instance.
public void assign(ComObject newVal)
ComObject
into this comhandle
.
This method is only called by ComServer.create(java.lang.String, com.goldencode.p2j.util.comhandle)
. Stores
a newly created ComObject
into this handle.
Also updates the fieldRef
with the new state of this comhandle instance.
public void assign(BaseDataType value)
Also updates the fieldRef
with the new state of this comhandle instance.
public void setUnknown()
unknown value
flag or state to true
.
Warning: the data stored in this instance may be invalid after calling this method.
Also updates the fieldRef
with the new state of this comhandle instance.
setUnknown
in class comhandle