Search in sources :

Example 1 with FormEventFinderInDto

use of org.jaffa.modules.printing.components.formeventfinder.dto.FormEventFinderInDto in project jaffa-framework by jaffa-projects.

the class FormEventFinderComponent method doInquiry.

// .//GEN-END:description_1_be
// .//GEN-BEGIN:_doInquiry_1_be
/**
 * This performs the actual query to obtain the FinderOutDto.
 * @throws ApplicationExceptions This will be thrown in case any invalid data has been set.
 * @throws FrameworkException Indicates some system error.
 * @return the FinderOutDto object.
 */
protected FinderOutDto doInquiry() throws ApplicationExceptions, FrameworkException {
    ApplicationExceptions appExps = null;
    FormEventFinderInDto inputDto = new FormEventFinderInDto();
    // .//GEN-END:_doInquiry_1_be
    // Add custom code before processing the method //GEN-FIRST:_doInquiry_1
    // .//GEN-LAST:_doInquiry_1
    // .//GEN-BEGIN:_doInquiry_2_be
    inputDto.setMaxRecords(getMaxRecords());
    if (getEventName() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getEventNameDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getEventNameDd()))
        inputDto.setEventName(StringCriteriaField.getStringCriteriaField(getEventNameDd(), getEventName(), null));
    if (getDescription() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getDescriptionDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getDescriptionDd()))
        inputDto.setDescription(StringCriteriaField.getStringCriteriaField(getDescriptionDd(), getDescription(), null));
    // throw ApplicationExceptions, if any parsing errors occured
    if (appExps != null && appExps.size() > 0)
        throw appExps;
    inputDto.setHeaderDto(getHeaderDto());
    addSortCriteria(inputDto);
    // perform the inquiry
    if (m_tx == null)
        m_tx = (IFormEventFinder) Factory.createObject(IFormEventFinder.class);
    FinderOutDto finderOutDto = m_tx.find(inputDto);
    // .//GEN-BEGIN:_doInquiry_3_be
    return finderOutDto;
}
Also used : ApplicationExceptions(org.jaffa.exceptions.ApplicationExceptions) FormEventFinderInDto(org.jaffa.modules.printing.components.formeventfinder.dto.FormEventFinderInDto) FormEventFinderOutDto(org.jaffa.modules.printing.components.formeventfinder.dto.FormEventFinderOutDto) IFormEventFinder(org.jaffa.modules.printing.components.formeventfinder.IFormEventFinder)

Aggregations

ApplicationExceptions (org.jaffa.exceptions.ApplicationExceptions)1 IFormEventFinder (org.jaffa.modules.printing.components.formeventfinder.IFormEventFinder)1 FormEventFinderInDto (org.jaffa.modules.printing.components.formeventfinder.dto.FormEventFinderInDto)1 FormEventFinderOutDto (org.jaffa.modules.printing.components.formeventfinder.dto.FormEventFinderOutDto)1