Package com.thortech.xl.vo
Class UDFormData
java.lang.Object
com.thortech.xl.vo.UDFormData
- All Implemented Interfaces:
Serializable
Value object that store both the parent and child table data for a form.
- Author:
- Anuj Jain
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUDFormData
(long objectKey, String objectName, long formDefinitionKey, String formDefinitionName, String frmType) Constructor -
Method Summary
Modifier and TypeMethodDescriptionaddChildTableRecord
(String tableKey, String tableName, String action, HashMap recordValues) Add Child Table Record and Action TypegetChildTableRecords
(String tableKey) Get all the Child Table Records for a particular child tableGet all Child Tables for which data has been providedReturns the child table versions the data is associated withReturns all the data set for the parent formlong
Returns the key of the form definition for which data is specifiedReturns the name of the form for which data is specifiedReturns the type of the form for which data is specifiedlong
Parent from versionlong
Returns the key of the object for which data is specifiedReturns the name of the object for which data is specifiedGets the value for specified field from the form datavoid
removeChildTableRecord
(String tableKey, UDChildTableRecord record) Remove a Child Table Record from the value objectvoid
setChildTableVersions
(HashMap childTableVersions) Sets the child table key and version the child table data is associated withvoid
setFormData
(HashMap parentFormData) Sets the data for the parent formvoid
setFormVersion
(long formVersion) Sets the parent form version the parent data is associated withvoid
Sets the value for specified field in the form data
-
Constructor Details
-
UDFormData
public UDFormData(long objectKey, String objectName, long formDefinitionKey, String formDefinitionName, String frmType) Constructor- Parameters:
objectKey
- Resource Object KeyobjectName
- Resource Object NameformDefinitionKey
- Key of the parent formformDefinitionName
- Name of the parent formfrmType
- form type
-
-
Method Details
-
getFormData
Returns all the data set for the parent form- Returns:
- HashMap representing the record. Key is the column name, Value is the column value
-
setFormData
Sets the data for the parent form- Parameters:
parentFormData
- HashMap representing the record. Key is the column name, Value is the column value
-
addChildTableRecord
public UDChildTableRecord addChildTableRecord(String tableKey, String tableName, String action, HashMap recordValues) Add Child Table Record and Action Type- Parameters:
tableKey
- child tbale key to which record is addedtableName
- child tbale name to which record is addedaction
- action indicates whether you want to add/delete a child table record. the values that should be provided are Add OR DeleterecordValues
- child table record data- Returns:
- UDChildTableRecord object
-
removeChildTableRecord
Remove a Child Table Record from the value object- Parameters:
tableKey
- table from which the record should be deletedrecord
-
-
getChildTableRecords
Get all the Child Table Records for a particular child table- Parameters:
tableKey
-- Returns:
-
getChildTables
Get all Child Tables for which data has been provided- Returns:
- a HashMap conating the child table key and table name
-
setValue
Sets the value for specified field in the form data- Parameters:
fieldName
- name of the field in the formvalue
- value to be set
-
getValue
Gets the value for specified field from the form data- Parameters:
fieldName
- fieldName for which to retreive the form data- Returns:
- the value of the specified field in the formData
-
getObjectKey
public long getObjectKey()Returns the key of the object for which data is specified- Returns:
- Key of the object for which this data is specified
-
getObjectName
Returns the name of the object for which data is specified- Returns:
- Name of the object for which this data is specified
-
getFormDefinitionKey
public long getFormDefinitionKey()Returns the key of the form definition for which data is specified- Returns:
- Key of the form definition for which this data is specified
-
getFormName
Returns the name of the form for which data is specified- Returns:
- Name of the form for which this data is specified
-
getFormType
Returns the type of the form for which data is specified- Returns:
- Type of the form for which this data is specified
-
getFormVersion
public long getFormVersion()Parent from version- Returns:
- the parent form version the data is associated with
-
setFormVersion
public void setFormVersion(long formVersion) Sets the parent form version the parent data is associated with- Parameters:
formVersion
- , parent form version number
-
getChildTableVersions
Returns the child table versions the data is associated with- Returns:
- HashMap containing the child table key and the version the data is associated with
-
setChildTableVersions
Sets the child table key and version the child table data is associated with- Parameters:
childTableVersions
-
-