use of org.jaffa.components.finder.OrderByField in project jaffa-framework by jaffa-projects.
the class PrinterOutputTypeLookupTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(PrinterOutputTypeLookupInDto 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);
FinderTx.addCriteria(input.getCreatedOn(), PrinterOutputTypeMeta.CREATED_ON, criteria);
FinderTx.addCriteria(input.getCreatedBy(), PrinterOutputTypeMeta.CREATED_BY, criteria);
FinderTx.addCriteria(input.getLastChangedOn(), PrinterOutputTypeMeta.LAST_CHANGED_ON, criteria);
FinderTx.addCriteria(input.getLastChangedBy(), PrinterOutputTypeMeta.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 FormEventFinderTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(FormEventFinderInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(FormEventMeta.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.getEventName(), FormEventMeta.EVENT_NAME, criteria);
FinderTx.addCriteria(input.getDescription(), FormEventMeta.DESCRIPTION, 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 FormGroupFinderTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(FormGroupFinderInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(FormGroupMeta.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.getFormName(), FormGroupMeta.FORM_NAME, criteria);
FinderTx.addCriteria(input.getFormType(), FormGroupMeta.FORM_TYPE, 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 FormGroupLookupTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(FormGroupLookupInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(FormGroupMeta.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.getFormName(), FormGroupMeta.FORM_NAME, criteria);
FinderTx.addCriteria(input.getDescription(), FormGroupMeta.DESCRIPTION, criteria);
FinderTx.addCriteria(input.getFormType(), FormGroupMeta.FORM_TYPE, criteria);
FinderTx.addCriteria(input.getCreatedOn(), FormGroupMeta.CREATED_ON, criteria);
FinderTx.addCriteria(input.getCreatedBy(), FormGroupMeta.CREATED_BY, criteria);
FinderTx.addCriteria(input.getLastChangedOn(), FormGroupMeta.LAST_CHANGED_ON, criteria);
FinderTx.addCriteria(input.getLastChangedBy(), FormGroupMeta.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 FormDefinitionLookupTx method buildCriteria.
// .//GEN-END:_find_3_be
// .//GEN-BEGIN:_buildCriteria_1_be
private Criteria buildCriteria(FormDefinitionLookupInDto input, UOW uow) {
Criteria criteria = new Criteria();
criteria.setTable(FormDefinitionMeta.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.getFormId(), FormDefinitionMeta.FORM_ID, criteria);
FinderTx.addCriteria(input.getFormName(), FormDefinitionMeta.FORM_NAME, criteria);
FinderTx.addCriteria(input.getFormAlternate(), FormDefinitionMeta.FORM_ALTERNATE, criteria);
FinderTx.addCriteria(input.getFormVariation(), FormDefinitionMeta.FORM_VARIATION, criteria);
FinderTx.addCriteria(input.getOutputType(), FormDefinitionMeta.OUTPUT_TYPE, criteria);
FinderTx.addCriteria(input.getFormTemplate(), FormDefinitionMeta.FORM_TEMPLATE, criteria);
FinderTx.addCriteria(input.getFieldLayout(), FormDefinitionMeta.FIELD_LAYOUT, criteria);
FinderTx.addCriteria(input.getDescription(), FormDefinitionMeta.DESCRIPTION, criteria);
FinderTx.addCriteria(input.getRemarks(), FormDefinitionMeta.REMARKS, criteria);
FinderTx.addCriteria(input.getDomFactory(), FormDefinitionMeta.DOM_FACTORY, criteria);
FinderTx.addCriteria(input.getDomClass(), FormDefinitionMeta.DOM_CLASS, criteria);
FinderTx.addCriteria(input.getDomKey1(), FormDefinitionMeta.DOM_KEY1, criteria);
FinderTx.addCriteria(input.getDomKey2(), FormDefinitionMeta.DOM_KEY2, criteria);
FinderTx.addCriteria(input.getDomKey3(), FormDefinitionMeta.DOM_KEY3, criteria);
FinderTx.addCriteria(input.getDomKey4(), FormDefinitionMeta.DOM_KEY4, criteria);
FinderTx.addCriteria(input.getDomKey5(), FormDefinitionMeta.DOM_KEY5, criteria);
FinderTx.addCriteria(input.getDomKey6(), FormDefinitionMeta.DOM_KEY6, criteria);
FinderTx.addCriteria(input.getAdditionalDataComponent(), FormDefinitionMeta.ADDITIONAL_DATA_COMPONENT, criteria);
FinderTx.addCriteria(input.getFollowOnFormName(), FormDefinitionMeta.FOLLOW_ON_FORM_NAME, criteria);
FinderTx.addCriteria(input.getFollowOnFormAlternate(), FormDefinitionMeta.FOLLOW_ON_FORM_ALTERNATE, criteria);
FinderTx.addCriteria(input.getCreatedOn(), FormDefinitionMeta.CREATED_ON, criteria);
FinderTx.addCriteria(input.getCreatedBy(), FormDefinitionMeta.CREATED_BY, criteria);
FinderTx.addCriteria(input.getLastChangedOn(), FormDefinitionMeta.LAST_CHANGED_ON, criteria);
FinderTx.addCriteria(input.getLastChangedBy(), FormDefinitionMeta.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;
}
Aggregations