Search in sources :

Example 1 with IBusinessEventLogFinder

use of org.jaffa.modules.messaging.components.businesseventlogfinder.IBusinessEventLogFinder in project jaffa-framework by jaffa-projects.

the class BusinessEventLogFinderComponent method doInquiry.

// .//GEN-END:stackTrace_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;
    BusinessEventLogFinderInDto inputDto = new BusinessEventLogFinderInDto();
    // .//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 (getLogId() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getLogIdDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getLogIdDd()))
        inputDto.setLogId(StringCriteriaField.getStringCriteriaField(getLogIdDd(), getLogId(), null));
    if (getCorrelationType() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getCorrelationTypeDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getCorrelationTypeDd()))
        inputDto.setCorrelationType(StringCriteriaField.getStringCriteriaField(getCorrelationTypeDd(), getCorrelationType(), null));
    if (getCorrelationKey1() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getCorrelationKey1Dd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getCorrelationKey1Dd()))
        inputDto.setCorrelationKey1(StringCriteriaField.getStringCriteriaField(getCorrelationKey1Dd(), getCorrelationKey1(), null));
    if (getCorrelationKey2() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getCorrelationKey2Dd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getCorrelationKey2Dd()))
        inputDto.setCorrelationKey2(StringCriteriaField.getStringCriteriaField(getCorrelationKey2Dd(), getCorrelationKey2(), null));
    if (getCorrelationKey3() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getCorrelationKey3Dd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getCorrelationKey3Dd()))
        inputDto.setCorrelationKey3(StringCriteriaField.getStringCriteriaField(getCorrelationKey3Dd(), getCorrelationKey3(), null));
    if (getScheduledTaskId() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getScheduledTaskIdDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getScheduledTaskIdDd()))
        inputDto.setScheduledTaskId(StringCriteriaField.getStringCriteriaField(getScheduledTaskIdDd(), getScheduledTaskId(), null));
    if (getMessageId() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getMessageIdDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getMessageIdDd()))
        inputDto.setMessageId(StringCriteriaField.getStringCriteriaField(getMessageIdDd(), getMessageId(), null));
    try {
        if (getLoggedOn() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getLoggedOnDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getLoggedOnDd()))
            inputDto.setLoggedOn(DateTimeCriteriaField.getDateTimeCriteriaField(getLoggedOnDd(), getLoggedOn(), (DateTimeFieldMetaData) BusinessEventLogMeta.META_LOGGED_ON));
    } catch (ValidationException e) {
        if (appExps == null)
            appExps = new ApplicationExceptions();
        appExps.add(e);
    }
    if (getLoggedBy() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getLoggedByDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getLoggedByDd()))
        inputDto.setLoggedBy(StringCriteriaField.getStringCriteriaField(getLoggedByDd(), getLoggedBy(), null));
    if (getProcessName() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getProcessNameDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getProcessNameDd()))
        inputDto.setProcessName(StringCriteriaField.getStringCriteriaField(getProcessNameDd(), getProcessName(), null));
    if (getSubProcessName() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getSubProcessNameDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getSubProcessNameDd()))
        inputDto.setSubProcessName(StringCriteriaField.getStringCriteriaField(getSubProcessNameDd(), getSubProcessName(), null));
    if (getMessageType() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getMessageTypeDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getMessageTypeDd()))
        inputDto.setMessageType(StringCriteriaField.getStringCriteriaField(getMessageTypeDd(), getMessageType(), null));
    if (getMessageText() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getMessageTextDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getMessageTextDd()))
        inputDto.setMessageText(StringCriteriaField.getStringCriteriaField(getMessageTextDd(), getMessageText(), null));
    if (getSourceClass() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getSourceClassDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getSourceClassDd()))
        inputDto.setSourceClass(StringCriteriaField.getStringCriteriaField(getSourceClassDd(), getSourceClass(), null));
    if (getSourceMethod() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getSourceMethodDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getSourceMethodDd()))
        inputDto.setSourceMethod(StringCriteriaField.getStringCriteriaField(getSourceMethodDd(), getSourceMethod(), null));
    try {
        if (getSourceLine() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getSourceLineDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getSourceLineDd()))
            inputDto.setSourceLine(IntegerCriteriaField.getIntegerCriteriaField(getSourceLineDd(), getSourceLine(), (IntegerFieldMetaData) BusinessEventLogMeta.META_SOURCE_LINE));
    } catch (ValidationException e) {
        if (appExps == null)
            appExps = new ApplicationExceptions();
        appExps.add(e);
    }
    if (getStackTrace() != null || CriteriaField.RELATIONAL_IS_NULL.equals(getStackTraceDd()) || CriteriaField.RELATIONAL_IS_NOT_NULL.equals(getStackTraceDd()))
        inputDto.setStackTrace(StringCriteriaField.getStringCriteriaField(getStackTraceDd(), getStackTrace(), 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 = (IBusinessEventLogFinder) Factory.createObject(IBusinessEventLogFinder.class);
    FinderOutDto finderOutDto = m_tx.find(inputDto);
    // .//GEN-BEGIN:_doInquiry_3_be
    return finderOutDto;
}
Also used : IBusinessEventLogFinder(org.jaffa.modules.messaging.components.businesseventlogfinder.IBusinessEventLogFinder) ApplicationExceptions(org.jaffa.exceptions.ApplicationExceptions) BusinessEventLogFinderInDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderInDto) BusinessEventLogFinderOutDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto)

Aggregations

ApplicationExceptions (org.jaffa.exceptions.ApplicationExceptions)1 IBusinessEventLogFinder (org.jaffa.modules.messaging.components.businesseventlogfinder.IBusinessEventLogFinder)1 BusinessEventLogFinderInDto (org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderInDto)1 BusinessEventLogFinderOutDto (org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto)1