use of org.jaffa.modules.printing.domain.FormDefinition in project jaffa-framework by jaffa-projects.
the class FormDefinitionMaintenanceTx method load.
// .//GEN-END:_preprocessUpdate_2_be
// .//GEN-BEGIN:_loadUpdate_1_be
/**
* Retrieve the domain object.
*/
private FormDefinition load(UOW uow, FormDefinitionMaintenanceUpdateInDto input) throws FrameworkException, ApplicationExceptions {
FormDefinition domain = null;
Criteria criteria = new Criteria();
criteria.setTable(FormDefinitionMeta.getName());
// .//GEN-END:_loadUpdate_1_be
// Add custom criteria//GEN-FIRST:_loadUpdate_1
// .//GEN-LAST:_loadUpdate_1
// .//GEN-BEGIN:_loadUpdate_2_be
criteria.addCriteria(FormDefinitionMeta.FORM_ID, input.getFormId());
criteria.setLocking(Criteria.LOCKING_PARANOID);
Iterator itr = uow.query(criteria).iterator();
if (itr.hasNext())
domain = (FormDefinition) itr.next();
// .//GEN-BEGIN:_loadUpdate_3_be
if (domain == null) {
ApplicationExceptions appExps = new ApplicationExceptions();
appExps.add(new DomainObjectNotFoundException(FormDefinitionMeta.getLabelToken()));
throw appExps;
}
return domain;
}
use of org.jaffa.modules.printing.domain.FormDefinition in project jaffa-framework by jaffa-projects.
the class FormDefinitionViewerTx method buildDto.
// .//GEN-END:_buildCriteria_3_be
// .//GEN-BEGIN:_buildDto_1_be
private FormDefinitionViewerOutDto buildDto(UOW uow, Collection results) throws UOWException {
FormDefinitionViewerOutDto output = null;
Iterator itr = results.iterator();
if (itr.hasNext()) {
// just return the details for the 1st record retrieved.
FormDefinition formDefinition = (FormDefinition) itr.next();
output = new FormDefinitionViewerOutDto();
// .//GEN-END:_buildDto_1_be
// Add custom code before all the setters//GEN-FIRST:_buildDto_1
// .//GEN-LAST:_buildDto_1
// .//GEN-BEGIN:_buildDto_FormId_1_be
output.setFormId(formDefinition.getFormId());
// .//GEN-END:_buildDto_FormId_1_be
// .//GEN-BEGIN:_buildDto_FormName_1_be
output.setFormName(formDefinition.getFormName());
// .//GEN-END:_buildDto_FormName_1_be
// .//GEN-BEGIN:_buildDto_FormAlternate_1_be
output.setFormAlternate(formDefinition.getFormAlternate());
// .//GEN-END:_buildDto_FormAlternate_1_be
// .//GEN-BEGIN:_buildDto_FormVariation_1_be
output.setFormVariation(formDefinition.getFormVariation());
// .//GEN-END:_buildDto_FormVariation_1_be
// .//GEN-BEGIN:_buildDto_Description_1_be
output.setDescription(formDefinition.getDescription());
// .//GEN-END:_buildDto_Description_1_be
// .//GEN-BEGIN:_buildDto_Remarks_1_be
output.setRemarks(formDefinition.getRemarks());
// .//GEN-END:_buildDto_Remarks_1_be
// .//GEN-BEGIN:_buildDto_OutputType_1_be
output.setOutputType(formDefinition.getOutputType());
// .//GEN-END:_buildDto_OutputType_1_be
// .//GEN-BEGIN:_buildDto_FollowOnFormName_1_be
output.setFollowOnFormName(formDefinition.getFollowOnFormName());
// .//GEN-END:_buildDto_FollowOnFormName_1_be
// .//GEN-BEGIN:_buildDto_FormTemplate_1_be
output.setFormTemplate(formDefinition.getFormTemplate());
// .//GEN-END:_buildDto_FormTemplate_1_be
// .//GEN-BEGIN:_buildDto_FieldLayout_1_be
output.setFieldLayout(formDefinition.getFieldLayout());
// .//GEN-END:_buildDto_FieldLayout_1_be
// .//GEN-BEGIN:_buildDto_DomClass_1_be
output.setDomClass(formDefinition.getDomClass());
// .//GEN-END:_buildDto_DomClass_1_be
// .//GEN-BEGIN:_buildDto_DomKey1_1_be
output.setDomKey1(formDefinition.getDomKey1());
// .//GEN-END:_buildDto_DomKey1_1_be
// .//GEN-BEGIN:_buildDto_DomKey2_1_be
output.setDomKey2(formDefinition.getDomKey2());
// .//GEN-END:_buildDto_DomKey2_1_be
// .//GEN-BEGIN:_buildDto_DomKey3_1_be
output.setDomKey3(formDefinition.getDomKey3());
// .//GEN-END:_buildDto_DomKey3_1_be
// .//GEN-BEGIN:_buildDto_DomKey4_1_be
output.setDomKey4(formDefinition.getDomKey4());
// .//GEN-END:_buildDto_DomKey4_1_be
// .//GEN-BEGIN:_buildDto_DomKey5_1_be
output.setDomKey5(formDefinition.getDomKey5());
// .//GEN-END:_buildDto_DomKey5_1_be
// .//GEN-BEGIN:_buildDto_DomKey6_1_be
output.setDomKey6(formDefinition.getDomKey6());
// .//GEN-END:_buildDto_DomKey6_1_be
// .//GEN-BEGIN:_buildDto_DomFactory_1_be
output.setDomFactory(formDefinition.getDomFactory());
// .//GEN-END:_buildDto_DomFactory_1_be
// .//GEN-BEGIN:_buildDto_AdditionalDataComponent_1_be
output.setAdditionalDataComponent(formDefinition.getAdditionalDataComponent());
// .//GEN-END:_buildDto_AdditionalDataComponent_1_be
// .//GEN-BEGIN:_buildDto_FollowOnFormAlternate_1_be
output.setFollowOnFormAlternate(formDefinition.getFollowOnFormAlternate());
// .//GEN-END:_buildDto_FollowOnFormAlternate_1_be
// .//GEN-BEGIN:_buildDto_2_be
// Add related objects, if required
addRelatedDtos(uow, output, formDefinition);
// .//GEN-END:_buildDto_2_be
// Add custom code to pass values to the dto//GEN-FIRST:_buildDto_2
// .//GEN-LAST:_buildDto_2
// .//GEN-BEGIN:_buildDto_3_be
}
return output;
}
Aggregations