Search in sources :

Example 6 with BusinessEventLogFinderOutDto

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

the class BusinessEventLogFinderTx method find.

// .//GEN-END:_destroy_2_be
// .//GEN-BEGIN:_find_1_be
/**
 * Searches for BusinessEventLog objects.
 * @param input The criteria based on which the search will be performed.
 * @throws ApplicationExceptions This will be thrown if the criteria contains invalid data.
 * @throws FrameworkException Indicates some system error
 * @return The search results.
 */
public BusinessEventLogFinderOutDto find(BusinessEventLogFinderInDto input) throws FrameworkException, ApplicationExceptions {
    UOW uow = null;
    try {
        // Print Debug Information for the input
        if (log.isDebugEnabled()) {
            log.debug("Input: " + input);
        }
        // create the UOW
        uow = new UOW();
        // Build the Criteria Object
        Criteria criteria = buildCriteria(input, uow);
        // .//GEN-END:_find_1_be
        // Add custom code before the query //GEN-FIRST:_find_1
        // .//GEN-LAST:_find_1
        // .//GEN-BEGIN:_find_2_be
        // Execute The Query
        Collection results = uow.query(criteria);
        // .//GEN-END:_find_2_be
        // Add custom code after the query //GEN-FIRST:_find_2
        // .//GEN-LAST:_find_2
        // .//GEN-BEGIN:_find_3_be
        // Convert the domain objects into the outbound dto
        BusinessEventLogFinderOutDto output = buildDto(uow, results, input);
        // Print Debug Information for the output
        if (log.isDebugEnabled()) {
            log.debug("Output: " + output);
        }
        return output;
    } finally {
        if (uow != null)
            uow.rollback();
    }
}
Also used : BusinessEventLogFinderOutDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto) AtomicCriteria(org.jaffa.persistence.AtomicCriteria) Criteria(org.jaffa.persistence.Criteria) UOW(org.jaffa.persistence.UOW)

Example 7 with BusinessEventLogFinderOutDto

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

the class TaskMaintenanceForm method populateRelatedBusinessEventLog.

private void populateRelatedBusinessEventLog(GridModel rows) {
    rows.clearRows();
    BusinessEventLogFinderOutDto businessEventLogOutDto = ((TaskMaintenanceComponent) getComponent()).getBusinessEventLog();
    if (businessEventLogOutDto != null) {
        for (int i = 0; i < businessEventLogOutDto.getRowsCount(); i++) {
            BusinessEventLogFinderOutRowDto rowDto = businessEventLogOutDto.getRows(i);
            GridModelRow row = rows.newRow();
            row.addElement("logId", rowDto.getLogId());
            row.addElement("messageId", rowDto.getMessageId());
            row.addElement("loggedOn", rowDto.getLoggedOn());
            row.addElement("processName", rowDto.getProcessName());
            row.addElement("subProcessName", rowDto.getSubProcessName());
            row.addElement("messageType", rowDto.getMessageType());
            row.addElement("messageText", rowDto.getMessageText());
        }
    }
}
Also used : BusinessEventLogFinderOutDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto) BusinessEventLogFinderOutRowDto(org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutRowDto) GridModelRow(org.jaffa.presentation.portlet.widgets.model.GridModelRow)

Aggregations

BusinessEventLogFinderOutDto (org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutDto)7 BusinessEventLogFinderOutRowDto (org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderOutRowDto)4 MessageViewerOutDto (org.jaffa.modules.messaging.components.messageviewer.dto.MessageViewerOutDto)2 GridModelRow (org.jaffa.presentation.portlet.widgets.model.GridModelRow)2 OrderByField (org.jaffa.components.finder.OrderByField)1 StringCriteriaField (org.jaffa.components.finder.StringCriteriaField)1 BusinessEventLogFinderInDto (org.jaffa.modules.messaging.components.businesseventlogfinder.dto.BusinessEventLogFinderInDto)1 BusinessEventLogFinderTx (org.jaffa.modules.messaging.components.businesseventlogfinder.tx.BusinessEventLogFinderTx)1 BusinessEventLog (org.jaffa.modules.messaging.domain.BusinessEventLog)1 AtomicCriteria (org.jaffa.persistence.AtomicCriteria)1 Criteria (org.jaffa.persistence.Criteria)1 UOW (org.jaffa.persistence.UOW)1