use of org.jaffa.components.finder.OrderByField in project jaffa-framework by jaffa-projects.
the class UserRequestFinderTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(UserRequestFinderInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(UserRequestMeta.getName());
// .//GEN-END:_buildCriteria_1_be
// Add custom criteria //GEN-FIRST:_buildCriteria_1
// .//GEN-LAST:_buildCriteria_1
// .//GEN-BEGIN:_buildCriteria_2_be
FinderTx.addCriteria(input.getRequestId(), UserRequestMeta.REQUEST_ID, criteria);
FinderTx.addCriteria(input.getUserName(), UserRequestMeta.USER_NAME, criteria);
FinderTx.addCriteria(input.getFirstName(), UserRequestMeta.FIRST_NAME, criteria);
FinderTx.addCriteria(input.getLastName(), UserRequestMeta.LAST_NAME, criteria);
FinderTx.addCriteria(input.getPassword(), UserRequestMeta.PASSWORD, criteria);
FinderTx.addCriteria(input.getEMailAddress(), UserRequestMeta.E_MAIL_ADDRESS, criteria);
FinderTx.addCriteria(input.getSecurityQuestion(), UserRequestMeta.SECURITY_QUESTION, criteria);
FinderTx.addCriteria(input.getSecurityAnswer(), UserRequestMeta.SECURITY_ANSWER, criteria);
FinderTx.addCriteria(input.getRemarks(), UserRequestMeta.REMARKS, criteria);
FinderTx.addCriteria(input.getCreatedOn(), UserRequestMeta.CREATED_ON, criteria);
FinderTx.addCriteria(input.getProcessedDatetime(), UserRequestMeta.PROCESSED_DATETIME, criteria);
FinderTx.addCriteria(input.getProcessedUserId(), UserRequestMeta.PROCESSED_USER_ID, criteria);
FinderTx.addCriteria(input.getStatus(), UserRequestMeta.STATUS, criteria);
// append an orderBy clause to the criteria
OrderByField[] orderByFields = input.getOrderByFields();
if (orderByFields != null) {
for (int i = 0; i < orderByFields.length; i++) {
OrderByField orderByField = orderByFields[i];
int sort = Criteria.ORDER_BY_ASC;
if (orderByField.getSortAscending() != null && !orderByField.getSortAscending().booleanValue())
sort = Criteria.ORDER_BY_DESC;
criteria.addOrderBy(orderByField.getFieldName(), sort);
}
}
// .//GEN-BEGIN:_buildCriteria_3_be
return criteria;
}
use of org.jaffa.components.finder.OrderByField in project jaffa-framework by jaffa-projects.
the class UserRequestLookupTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(UserRequestLookupInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(UserRequestMeta.getName());
// .//GEN-END:_buildCriteria_1_be
// Add custom criteria //GEN-FIRST:_buildCriteria_1
// .//GEN-LAST:_buildCriteria_1
// .//GEN-BEGIN:_buildCriteria_2_be
FinderTx.addCriteria(input.getRequestId(), UserRequestMeta.REQUEST_ID, criteria);
FinderTx.addCriteria(input.getUserName(), UserRequestMeta.USER_NAME, criteria);
FinderTx.addCriteria(input.getFirstName(), UserRequestMeta.FIRST_NAME, criteria);
FinderTx.addCriteria(input.getLastName(), UserRequestMeta.LAST_NAME, criteria);
FinderTx.addCriteria(input.getPassword(), UserRequestMeta.PASSWORD, criteria);
FinderTx.addCriteria(input.getEMailAddress(), UserRequestMeta.E_MAIL_ADDRESS, criteria);
FinderTx.addCriteria(input.getSecurityQuestion(), UserRequestMeta.SECURITY_QUESTION, criteria);
FinderTx.addCriteria(input.getSecurityAnswer(), UserRequestMeta.SECURITY_ANSWER, criteria);
FinderTx.addCriteria(input.getRemarks(), UserRequestMeta.REMARKS, criteria);
FinderTx.addCriteria(input.getCreatedOn(), UserRequestMeta.CREATED_ON, criteria);
FinderTx.addCriteria(input.getProcessedDatetime(), UserRequestMeta.PROCESSED_DATETIME, criteria);
FinderTx.addCriteria(input.getProcessedUserId(), UserRequestMeta.PROCESSED_USER_ID, criteria);
FinderTx.addCriteria(input.getStatus(), UserRequestMeta.STATUS, criteria);
// append an orderBy clause to the criteria
OrderByField[] orderByFields = input.getOrderByFields();
if (orderByFields != null) {
for (int i = 0; i < orderByFields.length; i++) {
OrderByField orderByField = orderByFields[i];
int sort = Criteria.ORDER_BY_ASC;
if (orderByField.getSortAscending() != null && !orderByField.getSortAscending().booleanValue())
sort = Criteria.ORDER_BY_DESC;
criteria.addOrderBy(orderByField.getFieldName(), sort);
}
}
// .//GEN-BEGIN:_buildCriteria_3_be
return criteria;
}
use of org.jaffa.components.finder.OrderByField in project jaffa-framework by jaffa-projects.
the class PrinterOutputTypeFinderTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(PrinterOutputTypeFinderInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(PrinterOutputTypeMeta.getName());
// .//GEN-END:_buildCriteria_1_be
// Add custom criteria //GEN-FIRST:_buildCriteria_1
// .//GEN-LAST:_buildCriteria_1
// .//GEN-BEGIN:_buildCriteria_2_be
FinderTx.addCriteria(input.getOutputType(), PrinterOutputTypeMeta.OUTPUT_TYPE, criteria);
FinderTx.addCriteria(input.getDescription(), PrinterOutputTypeMeta.DESCRIPTION, criteria);
FinderTx.addCriteria(input.getDirectPrinting(), PrinterOutputTypeMeta.DIRECT_PRINTING, criteria);
// append an orderBy clause to the criteria
OrderByField[] orderByFields = input.getOrderByFields();
if (orderByFields != null) {
for (int i = 0; i < orderByFields.length; i++) {
OrderByField orderByField = orderByFields[i];
int sort = Criteria.ORDER_BY_ASC;
if (orderByField.getSortAscending() != null && !orderByField.getSortAscending().booleanValue())
sort = Criteria.ORDER_BY_DESC;
criteria.addOrderBy(orderByField.getFieldName(), sort);
}
}
// .//GEN-BEGIN:_buildCriteria_3_be
return criteria;
}
use of org.jaffa.components.finder.OrderByField in project jaffa-framework by jaffa-projects.
the class OutputCommandLookupTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(OutputCommandLookupInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(OutputCommandMeta.getName());
// .//GEN-END:_buildCriteria_1_be
// Add custom criteria //GEN-FIRST:_buildCriteria_1
// .//GEN-LAST:_buildCriteria_1
// .//GEN-BEGIN:_buildCriteria_2_be
FinderTx.addCriteria(input.getOutputCommandId(), OutputCommandMeta.OUTPUT_COMMAND_ID, criteria);
FinderTx.addCriteria(input.getOutputType(), OutputCommandMeta.OUTPUT_TYPE, criteria);
FinderTx.addCriteria(input.getSequenceNo(), OutputCommandMeta.SEQUENCE_NO, criteria);
FinderTx.addCriteria(input.getOsPattern(), OutputCommandMeta.OS_PATTERN, criteria);
FinderTx.addCriteria(input.getCommandLine(), OutputCommandMeta.COMMAND_LINE, criteria);
FinderTx.addCriteria(input.getCreatedOn(), OutputCommandMeta.CREATED_ON, criteria);
FinderTx.addCriteria(input.getCreatedBy(), OutputCommandMeta.CREATED_BY, criteria);
FinderTx.addCriteria(input.getLastChangedOn(), OutputCommandMeta.LAST_CHANGED_ON, criteria);
FinderTx.addCriteria(input.getLastChangedBy(), OutputCommandMeta.LAST_CHANGED_BY, criteria);
// append an orderBy clause to the criteria
OrderByField[] orderByFields = input.getOrderByFields();
if (orderByFields != null) {
for (int i = 0; i < orderByFields.length; i++) {
OrderByField orderByField = orderByFields[i];
int sort = Criteria.ORDER_BY_ASC;
if (orderByField.getSortAscending() != null && !orderByField.getSortAscending().booleanValue())
sort = Criteria.ORDER_BY_DESC;
criteria.addOrderBy(orderByField.getFieldName(), sort);
}
}
// .//GEN-BEGIN:_buildCriteria_3_be
return criteria;
}
use of org.jaffa.components.finder.OrderByField in project jaffa-framework by jaffa-projects.
the class PrinterDefinitionLookupTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(PrinterDefinitionLookupInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(PrinterDefinitionMeta.getName());
// .//GEN-END:_buildCriteria_1_be
// Add custom criteria //GEN-FIRST:_buildCriteria_1
// .//GEN-LAST:_buildCriteria_1
// .//GEN-BEGIN:_buildCriteria_2_be
FinderTx.addCriteria(input.getPrinterId(), PrinterDefinitionMeta.PRINTER_ID, criteria);
FinderTx.addCriteria(input.getDescription(), PrinterDefinitionMeta.DESCRIPTION, criteria);
FinderTx.addCriteria(input.getSiteCode(), PrinterDefinitionMeta.SITE_CODE, criteria);
FinderTx.addCriteria(input.getLocationCode(), PrinterDefinitionMeta.LOCATION_CODE, criteria);
FinderTx.addCriteria(input.getRealPrinterName(), PrinterDefinitionMeta.REAL_PRINTER_NAME, criteria);
FinderTx.addCriteria(input.getOutputType(), PrinterDefinitionMeta.OUTPUT_TYPE, criteria);
FinderTx.addCriteria(input.getScaleToPageSize(), PrinterDefinitionMeta.SCALE_TO_PAGE_SIZE, criteria);
FinderTx.addCriteria(input.getRemote(), PrinterDefinitionMeta.REMOTE, criteria);
// append an orderBy clause to the criteria
OrderByField[] orderByFields = input.getOrderByFields();
if (orderByFields != null) {
for (int i = 0; i < orderByFields.length; i++) {
OrderByField orderByField = orderByFields[i];
int sort = Criteria.ORDER_BY_ASC;
if (orderByField.getSortAscending() != null && !orderByField.getSortAscending().booleanValue())
sort = Criteria.ORDER_BY_DESC;
criteria.addOrderBy(orderByField.getFieldName(), sort);
}
}
// .//GEN-BEGIN:_buildCriteria_3_be
return criteria;
}
Aggregations