use of org.jaffa.modules.printing.components.printeroutputtypeviewer.dto.OutputCommandDto in project jaffa-framework by jaffa-projects.
the class PrinterOutputTypeViewerTx method addRelatedDtos.
// .//GEN-END:_buildDto_3_be
// .//GEN-BEGIN:_addRelatedDtos_1_be
private void addRelatedDtos(UOW uow, PrinterOutputTypeViewerOutDto output, PrinterOutputType printerOutputType) throws UOWException {
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_1_be
if (printerOutputType.getOutputType() != null) {
Criteria criteria = new Criteria();
criteria.setTable(OutputCommandMeta.getName());
criteria.addCriteria(OutputCommandMeta.OUTPUT_TYPE, printerOutputType.getOutputType());
criteria.addOrderBy("OutputCommandId", Criteria.ORDER_BY_ASC);
// .//GEN-END:_addRelatedDtos_OutputCommand_1_be
// Add custom code to set the criteria before the query //GEN-FIRST:_addRelatedDtos_OutputCommand_1
// .//GEN-LAST:_addRelatedDtos_OutputCommand_1
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_2_be
Iterator itr = uow.query(criteria).iterator();
while (itr.hasNext()) {
OutputCommand outputCommand = (OutputCommand) itr.next();
OutputCommandDto dto = new OutputCommandDto();
// .//GEN-END:_addRelatedDtos_OutputCommand_2_be
// Add custom code before all the setters //GEN-FIRST:_addRelatedDtos_OutputCommand_2
// .//GEN-LAST:_addRelatedDtos_OutputCommand_2
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_OutputCommandId_1_be
dto.setOutputCommandId(outputCommand.getOutputCommandId());
// .//GEN-END:_addRelatedDtos_OutputCommand_OutputCommandId_1_be
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_OutputType_1_be
dto.setOutputType(outputCommand.getOutputType());
// .//GEN-END:_addRelatedDtos_OutputCommand_OutputType_1_be
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_SequenceNo_1_be
dto.setSequenceNo(outputCommand.getSequenceNo());
// .//GEN-END:_addRelatedDtos_OutputCommand_SequenceNo_1_be
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_OsPattern_1_be
dto.setOsPattern(outputCommand.getOsPattern());
// .//GEN-END:_addRelatedDtos_OutputCommand_OsPattern_1_be
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_CommandLine_1_be
dto.setCommandLine(outputCommand.getCommandLine());
// .//GEN-END:_addRelatedDtos_OutputCommand_CommandLine_1_be
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_CreatedOn_1_be
dto.setCreatedOn(outputCommand.getCreatedOn());
// .//GEN-END:_addRelatedDtos_OutputCommand_CreatedOn_1_be
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_CreatedBy_1_be
dto.setCreatedBy(outputCommand.getCreatedBy());
// .//GEN-END:_addRelatedDtos_OutputCommand_CreatedBy_1_be
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_LastChangedOn_1_be
dto.setLastChangedOn(outputCommand.getLastChangedOn());
// .//GEN-END:_addRelatedDtos_OutputCommand_LastChangedOn_1_be
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_LastChangedBy_1_be
dto.setLastChangedBy(outputCommand.getLastChangedBy());
// .//GEN-END:_addRelatedDtos_OutputCommand_LastChangedBy_1_be
// Add custom code to pass values to the dto //GEN-FIRST:_addRelatedDtos_OutputCommand_3
// .//GEN-LAST:_addRelatedDtos_OutputCommand_3
// .//GEN-BEGIN:_addRelatedDtos_OutputCommand_3_be
output.addOutputCommand(dto);
}
}
// .//GEN-END:_addRelatedDtos_OutputCommand_3_be
// .//GEN-BEGIN:_addRelatedDtos_2_be
}
use of org.jaffa.modules.printing.components.printeroutputtypeviewer.dto.OutputCommandDto in project jaffa-framework by jaffa-projects.
the class PrinterOutputTypeViewerForm method populateRelatedOutputCommand.
private void populateRelatedOutputCommand(GridModel rows) {
rows.clearRows();
PrinterOutputTypeViewerOutDto outputDto = ((PrinterOutputTypeViewerComponent) getComponent()).getPrinterOutputTypeViewerOutDto();
if (outputDto != null) {
GridModelRow row = null;
OutputCommandDto[] outputCommand = outputDto.getOutputCommand();
for (int i = 0; i < outputCommand.length; i++) {
OutputCommandDto rowDto = outputCommand[i];
row = rows.newRow();
row.addElement("outputCommandId", rowDto.getOutputCommandId());
row.addElement("outputType", rowDto.getOutputType());
row.addElement("sequenceNo", rowDto.getSequenceNo());
row.addElement("osPattern", rowDto.getOsPattern());
row.addElement("commandLine", rowDto.getCommandLine());
row.addElement("createdOn", rowDto.getCreatedOn());
row.addElement("createdBy", rowDto.getCreatedBy());
row.addElement("lastChangedOn", rowDto.getLastChangedOn());
row.addElement("lastChangedBy", rowDto.getLastChangedBy());
// .//GEN-END:RelatedOutputCommand_1_be
// Add custom code for the row //GEN-FIRST:RelatedOutputCommand_1
// .//GEN-LAST:RelatedOutputCommand_1
// .//GEN-BEGIN:RelatedOutputCommand_2_be
}
}
}
Aggregations