use of org.jaffa.modules.printing.components.formeventviewer.dto.FormUsageDto in project jaffa-framework by jaffa-projects.
the class FormEventViewerTx method addRelatedDtos.
// .//GEN-END:_buildDto_3_be
// .//GEN-BEGIN:_addRelatedDtos_1_be
private void addRelatedDtos(UOW uow, FormEventViewerOutDto output, FormEvent formEvent) throws UOWException {
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_1_be
if (formEvent.getEventName() != null) {
Criteria criteria = new Criteria();
criteria.setTable(FormUsageMeta.getName());
criteria.addCriteria(FormUsageMeta.EVENT_NAME, formEvent.getEventName());
criteria.addOrderBy("FormName", Criteria.ORDER_BY_ASC);
// .//GEN-END:_addRelatedDtos_FormUsage_1_be
// Add custom code to set the criteria before the query //GEN-FIRST:_addRelatedDtos_FormUsage_1
// .//GEN-LAST:_addRelatedDtos_FormUsage_1
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_2_be
Iterator itr = uow.query(criteria).iterator();
while (itr.hasNext()) {
FormUsage formUsage = (FormUsage) itr.next();
FormUsageDto dto = new FormUsageDto();
// .//GEN-END:_addRelatedDtos_FormUsage_2_be
// Add custom code before all the setters //GEN-FIRST:_addRelatedDtos_FormUsage_2
// .//GEN-LAST:_addRelatedDtos_FormUsage_2
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_FormName_1_be
dto.setFormName(formUsage.getFormName());
// .//GEN-END:_addRelatedDtos_FormUsage_FormName_1_be
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_EventName_1_be
dto.setEventName(formUsage.getEventName());
// .//GEN-END:_addRelatedDtos_FormUsage_EventName_1_be
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_FormAlternate_1_be
dto.setFormAlternate(formUsage.getFormAlternate());
// .//GEN-END:_addRelatedDtos_FormUsage_FormAlternate_1_be
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_Copies_1_be
dto.setCopies(formUsage.getCopies());
// .//GEN-END:_addRelatedDtos_FormUsage_Copies_1_be
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_CreatedOn_1_be
dto.setCreatedOn(formUsage.getCreatedOn());
// .//GEN-END:_addRelatedDtos_FormUsage_CreatedOn_1_be
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_CreatedBy_1_be
dto.setCreatedBy(formUsage.getCreatedBy());
// .//GEN-END:_addRelatedDtos_FormUsage_CreatedBy_1_be
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_LastChangedOn_1_be
dto.setLastChangedOn(formUsage.getLastChangedOn());
// .//GEN-END:_addRelatedDtos_FormUsage_LastChangedOn_1_be
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_LastChangedBy_1_be
dto.setLastChangedBy(formUsage.getLastChangedBy());
// .//GEN-END:_addRelatedDtos_FormUsage_LastChangedBy_1_be
// Add custom code to pass values to the dto //GEN-FIRST:_addRelatedDtos_FormUsage_3
// .//GEN-LAST:_addRelatedDtos_FormUsage_3
// .//GEN-BEGIN:_addRelatedDtos_FormUsage_3_be
output.addFormUsage(dto);
}
}
// .//GEN-END:_addRelatedDtos_FormUsage_3_be
// .//GEN-BEGIN:_addRelatedDtos_2_be
}
use of org.jaffa.modules.printing.components.formeventviewer.dto.FormUsageDto in project jaffa-framework by jaffa-projects.
the class FormEventViewerForm method populateRelatedFormUsage.
private void populateRelatedFormUsage(GridModel rows) {
rows.clearRows();
FormEventViewerOutDto outputDto = ((FormEventViewerComponent) getComponent()).getFormEventViewerOutDto();
if (outputDto != null) {
GridModelRow row = null;
FormUsageDto[] formUsage = outputDto.getFormUsage();
for (int i = 0; i < formUsage.length; i++) {
FormUsageDto rowDto = formUsage[i];
row = rows.newRow();
row.addElement("formName", rowDto.getFormName());
row.addElement("eventName", rowDto.getEventName());
row.addElement("formAlternate", rowDto.getFormAlternate());
row.addElement("copies", rowDto.getCopies());
row.addElement("createdOn", rowDto.getCreatedOn());
row.addElement("createdBy", rowDto.getCreatedBy());
row.addElement("lastChangedOn", rowDto.getLastChangedOn());
row.addElement("lastChangedBy", rowDto.getLastChangedBy());
// .//GEN-END:RelatedFormUsage_1_be
// Add custom code for the row //GEN-FIRST:RelatedFormUsage_1
// .//GEN-LAST:RelatedFormUsage_1
// .//GEN-BEGIN:RelatedFormUsage_2_be
}
}
}
Aggregations