public class ObjectTableRow extends java.lang.Object implements CMultiFieldObjectAccess
Constructor and Description |
---|
ObjectTableRow(ObjectDataElt payload,
java.util.ArrayList<CMultiFieldConstraint> constraints,
javafx.scene.control.TableView<ObjectTableRow> tableview,
CObjectArray parentarraynode,
PageActionManager actionmanager)
creates an object table row
|
Modifier and Type | Method and Description |
---|---|
SimpleDataElt |
getFieldDataEltClone(java.lang.String fieldname)
gets a clone of one of the fields payload
|
java.lang.String |
getFieldRepresentation(java.lang.String fieldname)
gets the representation of the payload of a field
|
java.lang.String |
getFieldValueForConstraint(java.lang.String fieldname)
gets the field value according to constraint for the given field
|
ObjectDataElt |
getObject() |
java.util.ArrayList<java.lang.String> |
hasFieldRestriction(java.lang.String fieldname)
return the restrictions active for the field
|
boolean |
isRowFrozen() |
boolean |
isRowUpdate() |
void |
liftConstraint(java.lang.String fieldname)
lift constraint on the given field
|
DataEltType |
lookupFieldType(java.lang.String fieldname)
get the field type of the given field
|
void |
mothball()
removes all references inside this object table row to facilitate garbage
collecting.
|
void |
refreshTable()
This is a hack for versions before 1.8u60.
|
void |
resetChange()
reset all changes and go back to original data
|
void |
setConstraint(java.lang.String fieldname,
java.util.ArrayList<java.lang.String> constraint)
set a constraint
|
boolean |
setConstraint(java.lang.String fieldname,
java.util.ArrayList<java.lang.String> restrainedvalues,
java.lang.String selected) |
void |
updateField(java.lang.String fieldname,
java.lang.Object fieldpayload)
this method manages the update of objects on the table, and stored them.
|
public ObjectTableRow(ObjectDataElt payload, java.util.ArrayList<CMultiFieldConstraint> constraints, javafx.scene.control.TableView<ObjectTableRow> tableview, CObjectArray parentarraynode, PageActionManager actionmanager)
payload
- object payloadconstraints
- constraintstableview
- parent table viewparentarraynode
- parent nodeactionmanager
- action manager of the pagepublic java.util.ArrayList<java.lang.String> hasFieldRestriction(java.lang.String fieldname)
fieldname
- name of the fieldpublic boolean isRowFrozen()
public DataEltType lookupFieldType(java.lang.String fieldname)
fieldname
- unique name of the fieldpublic ObjectDataElt getObject()
public boolean isRowUpdate()
public java.lang.String getFieldRepresentation(java.lang.String fieldname)
fieldname
- field namepublic SimpleDataElt getFieldDataEltClone(java.lang.String fieldname)
fieldname
- field namepublic void resetChange()
public void updateField(java.lang.String fieldname, java.lang.Object fieldpayload)
fieldname
- the field to changefieldpayload
- the payload changedpublic void setConstraint(java.lang.String fieldname, java.util.ArrayList<java.lang.String> constraint)
fieldname
- field nameconstraint
- list of potential values for this fieldpublic boolean setConstraint(java.lang.String fieldname, java.util.ArrayList<java.lang.String> restrainedvalues, java.lang.String selected)
setConstraint
in interface CMultiFieldObjectAccess
fieldname
- the name of the fieldrestrainedvalues
- the set of possible selections for this field. The
following will be performed:
selected
- the prefered value out of the restrained value. Will
force the field to the prefered value if entered if
provided with null, wil not select anyting, if
provided wih empty string "", will force to blankpublic java.lang.String getFieldValueForConstraint(java.lang.String fieldname)
CMultiFieldObjectAccess
getFieldValueForConstraint
in interface CMultiFieldObjectAccess
fieldname
- unique java name of the fieldpublic void liftConstraint(java.lang.String fieldname)
CMultiFieldObjectAccess
liftConstraint
in interface CMultiFieldObjectAccess
fieldname
- unique java name of the fieldpublic void refreshTable()
public void mothball()