use of org.jaffa.components.finder.OrderByField in project jaffa-framework by jaffa-projects.
the class BusinessEventLogFinderTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(BusinessEventLogFinderInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(BusinessEventLogMeta.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.getLogId(), BusinessEventLogMeta.LOG_ID, criteria);
FinderTx.addCriteria(input.getCorrelationType(), BusinessEventLogMeta.CORRELATION_TYPE, criteria);
FinderTx.addCriteria(input.getCorrelationKey1(), BusinessEventLogMeta.CORRELATION_KEY1, criteria);
FinderTx.addCriteria(input.getCorrelationKey2(), BusinessEventLogMeta.CORRELATION_KEY2, criteria);
FinderTx.addCriteria(input.getCorrelationKey3(), BusinessEventLogMeta.CORRELATION_KEY3, criteria);
FinderTx.addCriteria(input.getScheduledTaskId(), BusinessEventLogMeta.SCHEDULED_TASK_ID, criteria);
FinderTx.addCriteria(input.getMessageId(), BusinessEventLogMeta.MESSAGE_ID, criteria);
FinderTx.addCriteria(input.getLoggedOn(), BusinessEventLogMeta.LOGGED_ON, criteria);
FinderTx.addCriteria(input.getLoggedBy(), BusinessEventLogMeta.LOGGED_BY, criteria);
FinderTx.addCriteria(input.getProcessName(), BusinessEventLogMeta.PROCESS_NAME, criteria);
FinderTx.addCriteria(input.getSubProcessName(), BusinessEventLogMeta.SUB_PROCESS_NAME, criteria);
FinderTx.addCriteria(input.getMessageType(), BusinessEventLogMeta.MESSAGE_TYPE, criteria);
FinderTx.addCriteria(input.getMessageText(), BusinessEventLogMeta.MESSAGE_TEXT, criteria);
FinderTx.addCriteria(input.getSourceClass(), BusinessEventLogMeta.SOURCE_CLASS, criteria);
FinderTx.addCriteria(input.getSourceMethod(), BusinessEventLogMeta.SOURCE_METHOD, criteria);
FinderTx.addCriteria(input.getSourceLine(), BusinessEventLogMeta.SOURCE_LINE, criteria);
FinderTx.addCriteria(input.getStackTrace(), BusinessEventLogMeta.STACK_TRACE, 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 ItemFinderTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(ItemFinderInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(ItemMeta.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.getSegregationCode(), ItemMeta.SC, criteria);
FinderTx.addCriteria(input.getPartNo(), ItemMeta.PART, criteria);
FinderTx.addCriteria(input.getSerial(), ItemMeta.SERIAL, criteria);
FinderTx.addCriteria(input.getQty(), ItemMeta.QTY, 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 AttachmentFinderTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(AttachmentFinderInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(AttachmentMeta.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.getAttachmentId(), AttachmentMeta.ATTACHMENT_ID, criteria);
FinderTx.addCriteria(input.getSerializedKey(), AttachmentMeta.SERIALIZED_KEY, criteria);
FinderTx.addCriteria(input.getOriginalFileName(), AttachmentMeta.ORIGINAL_FILE_NAME, criteria);
FinderTx.addCriteria(input.getAttachmentType(), AttachmentMeta.ATTACHMENT_TYPE, criteria);
FinderTx.addCriteria(input.getContentType(), AttachmentMeta.CONTENT_TYPE, criteria);
FinderTx.addCriteria(input.getDescription(), AttachmentMeta.DESCRIPTION, criteria);
FinderTx.addCriteria(input.getRemarks(), AttachmentMeta.REMARKS, criteria);
FinderTx.addCriteria(input.getSupercededBy(), AttachmentMeta.SUPERCEDED_BY, criteria);
FinderTx.addCriteria(input.getCreatedOn(), AttachmentMeta.CREATED_ON, criteria);
FinderTx.addCriteria(input.getCreatedBy(), AttachmentMeta.CREATED_BY, criteria);
FinderTx.addCriteria(input.getLastChangedOn(), AttachmentMeta.LAST_CHANGED_ON, criteria);
FinderTx.addCriteria(input.getLastChangedBy(), AttachmentMeta.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 AttachmentLookupTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(AttachmentLookupInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(AttachmentMeta.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.getAttachmentId(), AttachmentMeta.ATTACHMENT_ID, criteria);
FinderTx.addCriteria(input.getSerializedKey(), AttachmentMeta.SERIALIZED_KEY, criteria);
FinderTx.addCriteria(input.getOriginalFileName(), AttachmentMeta.ORIGINAL_FILE_NAME, criteria);
FinderTx.addCriteria(input.getAttachmentType(), AttachmentMeta.ATTACHMENT_TYPE, criteria);
FinderTx.addCriteria(input.getContentType(), AttachmentMeta.CONTENT_TYPE, criteria);
FinderTx.addCriteria(input.getDescription(), AttachmentMeta.DESCRIPTION, criteria);
FinderTx.addCriteria(input.getRemarks(), AttachmentMeta.REMARKS, criteria);
FinderTx.addCriteria(input.getSupercededBy(), AttachmentMeta.SUPERCEDED_BY, criteria);
FinderTx.addCriteria(input.getCreatedOn(), AttachmentMeta.CREATED_ON, criteria);
FinderTx.addCriteria(input.getCreatedBy(), AttachmentMeta.CREATED_BY, criteria);
FinderTx.addCriteria(input.getLastChangedOn(), AttachmentMeta.LAST_CHANGED_ON, criteria);
FinderTx.addCriteria(input.getLastChangedBy(), AttachmentMeta.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 UserLookupTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(UserLookupInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(UserMeta.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.getUserName(), UserMeta.USER_NAME, criteria);
FinderTx.addCriteria(input.getFirstName(), UserMeta.FIRST_NAME, criteria);
FinderTx.addCriteria(input.getLastName(), UserMeta.LAST_NAME, criteria);
FinderTx.addCriteria(input.getStatus(), UserMeta.STATUS, criteria);
FinderTx.addCriteria(input.getEMailAddress(), UserMeta.E_MAIL_ADDRESS, 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