Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents |
---|
Code Block | ||
---|---|---|
| ||
import org.joget.apps.app.service.AppUtil;
import org.joget.apps.form.dao.FormDataDao;
import org.joget.apps.form.model.FormRow;
FormDataDao formDataDao = (FormDataDao) AppUtil.getApplicationContext().getBean("formDataDao");
String formId = "crm_account";
String tableName = "crm_account";
String id = "0001";
//Get the record
FormRow row = formDataDao.load(formId, tableName, id); |
public void clearFormCache(org.joget.apps.form.model.Form form)
Clear cache for a form
public java.lang.Long count(org.joget.apps.form.model.Form form, final java.lang.String condition, final java.lang.Object[] params)
Query total row count for a form.
public java.lang.Long count(java.lang.String formDefId, java.lang.String tableName, final java.lang.String condition, final java.lang.Object[] params)
Query total row count for a form.
public void delete(org.joget.apps.form.model.Form form, java.lang.String[] primaryKeyValues)
Delete form data by primary keys
public void delete(java.lang.String formDefId, java.lang.String tableName, java.lang.String[] primaryKeyValues)
Delete form data by primary keys
public void delete(java.lang.String formDefId, java.lang.String tableName, org.joget.apps.form.model.FormRowSet rows)
Delete form data by rows
public org.joget.apps.form.model.FormRowSet find(org.joget.apps.form.model.Form form, final java.lang.String condition, final java.lang.Object[] params, final java.lang.String sort, final java.lang.Boolean desc, final java.lang.Integer start, final java.lang.Integer rows)
Query to find a list of matching form rows.
public org.joget.apps.form.model.FormRowSet find(java.lang.String formDefId, java.lang.String tableName, final java.lang.String condition, final java.lang.Object[] params, final java.lang.String sort, final java.lang.Boolean desc, final java.lang.Integer start, final java.lang.Integer rows)
Query to find a list of matching form rows.
public java.lang.String findPrimaryKey(org.joget.apps.form.model.Form form, final java.lang.String fieldName, final java.lang.String value)
Query to find find primary key based on a field name and it's value.
public java.lang.String findPrimaryKey(java.lang.String formDefId, java.lang.String tableName, final java.lang.String fieldName, final java.lang.String value)
Query to find find primary key based on a field name and it's value.
public java.lang.String getEntityName(java.lang.String tableName, java.lang.String columnName)
Returns EntityName of form mapped to a table & column
public java.util.Collection<java.lang.String> getFormDefinitionColumnNames(java.lang.String tableName)
Returns collection of all columns from forms mapped to a table
public java.lang.String getFormEntityName(org.joget.apps.form.model.Form form)
Gets the generated hibernate entity name for the form
public java.lang.String getFormEntityName(java.lang.String formDefId)
Gets the generated hibernate entity name for the form
public java.util.Collection<java.lang.String> getFormRowColumnNames(org.joget.apps.form.model.FormRowSet rowSet)
Returns collection of all column names to be saved
public java.lang.String getFormTableName(org.joget.apps.form.model.Form form)
Gets the defined table name for the form
public java.lang.String getFormTableName(java.lang.String formDefId, java.lang.String tableName)
Gets the defined table name for the form
public org.joget.apps.form.model.FormRow load(org.joget.apps.form.model.Form form, java.lang.String primaryKey)
Loads a data row for a form based on the primary key
public org.joget.apps.form.model.FormRow load(java.lang.String formDefId, java.lang.String tableName, java.lang.String primaryKey)
Loads a data row for a form based on the primary key
public org.joget.apps.form.model.FormRow loadByTableNameAndColumnName(java.lang.String tableName, java.lang.String columnName, java.lang.String primaryKey)
Loads a data row for a table based on the primary key
Paramaters:
columnName - is not used
public org.joget.apps.form.model.FormRow loadWithoutTransaction(org.joget.apps.form.model.Form form, java.lang.String primaryKey)
Loads a data row for a form based on the primary key.
This method is transactional (since v5), but retains the method name for backward compatibility reasons.
public org.joget.apps.form.model.FormRow loadWithoutTransaction(java.lang.String formDefID, java.lang.String tableName, java.lang.String primaryKey)
Loads a data row for a form based on the primary key.
This method is transactional (since v5), but retains the method name for backward compatibility reasons.
public void saveOrUpdate(org.joget.apps.form.model.Form form, org.joget.apps.form.model.FormRowSet rowSet)
Saves (creates or updates) form data
public void saveOrUpdate(java.lang.String formDefId, java.lang.String tableName, org.joget.apps.form.model.FormRowSet rowSet)
Saves (creates or updates) form data
public void updateSchema(org.joget.apps.form.model.Form form, org.joget.apps.form.model.FormRowSet rowSet)
Call Hibernate to update DB schema
public void updateSchema(java.lang.String formDefId, java.lang.String tableName, org.joget.apps.form.model.FormRowSet rowSet)
Call Hibernate to update DB schema