Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
check here FormDataDao#find
/** * * @param condition * @param formDef * @param params * @param start * @param rowCount * * @return FormRowSet * * @throws Exception */ public FormRowSet findRecords(String condition, FormDefinition formDef, ArrayList params, Integer start, Integer rowCount) throws Exception { LogUtil.info(TAG, ">>>>>>> extra conditions : " + condition); LogUtil.info(TAG, ">>>>>>> Row Limits : Start= " + start + ", Count= " + rowCount); FormRowSet rowSet = null; if (params.isEmpty() && (rowCount == null || rowCount == 0)) { throw new Exception("if parameters are empty, `rows` must be specifed"); } try { FormDataDao formDataDao = (FormDataDao) AppUtil.getApplicationContext().getBean("formDataDao"); rowSet = formDataDao.find(formDef.getName(), formDef.getTableName(), condition, params.toArray(), null, null, start, rowCount); } catch (Exception ex) { LogUtil.error(TAG, ex, ex.getMessage()); throw ex; } FormRowSet records = new FormRowSet(); for (FormRow formRow : rowSet) { String latestProcessId = null; try { latestProcessId = getLatestProcessId(formRow.getId()); } catch (Exception e) { LogUtil.error(TAG, e, e.getMessage()); } LogUtil.info(TAG, ">>>>>>> latestProcessId: " + latestProcessId); formRow.put("latest_processId", latestProcessId); records.add(formRow); } return records; }
You can use formdatadao.find and pass in no condition. It should return all and you can play with the rest of the parameters for paging purpose.
using formdatadao.load we can extract a specific row based on primary key but I want to extract all the data rows into a formrowset regardless of any condition or primary key and read from there later... Please do help..