use of org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderInDto in project jaffa-framework by jaffa-projects.
the class MessageViewerTx method buildBusinessEventLogDto.
/**
* Obtains the related business event logs.
*/
private void buildBusinessEventLogDto(MessageViewerInDto input, MessageViewerOutDto output, Message message) throws FrameworkException, ApplicationExceptions, JMSException {
BusinessEventLogFinderInDto inputDto = new BusinessEventLogFinderInDto();
inputDto.setMessageId(message.getStringProperty(JmsBrowser.HEADER_ORIGINAL_MESSAGE_ID) != null ? new StringCriteriaField(CriteriaField.RELATIONAL_EQUALS, message.getStringProperty(JmsBrowser.HEADER_ORIGINAL_MESSAGE_ID)) : new StringCriteriaField(CriteriaField.RELATIONAL_EQUALS, message.getJMSMessageID()));
inputDto.setMaxRecords(new Integer(10));
inputDto.setOrderByFields(new OrderByField[] { new OrderByField(BusinessEventLogMeta.LOGGED_ON, Boolean.FALSE) });
BusinessEventLogFinderOutDto businessEventLogFinderOutDto = new BusinessEventLogFinderTx().find(inputDto);
output.setBusinessEventLog(businessEventLogFinderOutDto);
}
use of org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderInDto 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;
}
use of org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderInDto in project jaffa-framework by jaffa-projects.
the class TaskMaintenanceTx method buildBusinessEventLogDto.
private BusinessEventLogFinderOutDto buildBusinessEventLogDto(ScheduledTask task) throws FrameworkException, ApplicationExceptions {
// Create BusinessEventLogFinderInDto
BusinessEventLogFinderInDto inputDto = new BusinessEventLogFinderInDto();
inputDto.setScheduledTaskId(new StringCriteriaField(CriteriaField.RELATIONAL_EQUALS, task.getScheduledTaskId()));
inputDto.setMaxRecords(new Integer(10));
inputDto.setOrderByFields(new OrderByField[] { new OrderByField(BusinessEventLogMeta.LOGGED_ON, Boolean.FALSE) });
// Retrive businessEventLogFinderOutDto
return new BusinessEventLogFinderTx().find(inputDto);
}
Aggregations