Search in sources :

Example 1 with AuditTransactionViewQueryResponse

use of org.jaffa.components.audit.apis.data.AuditTransactionViewQueryResponse in project jaffa-framework by jaffa-projects.

the class AuditTransactionViewService method query.

/**
 * Query domain objects, returning an array of Graphs in the response.
 * By default no related objects are returned, and any foreign objects will only
 * contain key information. Use the <code>setResultGraphRules()</code> method on
 * the criteria to change this.
 * When an error occurs, one or more instances of ServiceError, indicating
 * some kind of internal system error (like a problem accessing the database),
 * or listing the business logic errors will be returned in the response.
 * @param criteria This specified the criteria for the records to be retrieved.
 * @return An array of Graphs, the content of this graph is based on the result filter 'rules', as provided in the criteria object.
 * while processing. When an error occurs, an array of ServiceError instances will be returned
 * with details about the root cause of the problem.
 */
public AuditTransactionViewQueryResponse query(AuditTransactionCriteria criteria) {
    criteria.queryView(true);
    AuditTransactionViewQueryResponse response = super._query(criteria);
    try {
        super.handler.removeHiddenFields(response);
    } catch (FrameworkException e) {
        log.error("Exception thrown while removing hidden fields from the response", e);
        response = super.createGraphQueryResponse(null, e);
    }
    return response;
}
Also used : AuditTransactionViewQueryResponse(org.jaffa.components.audit.apis.data.AuditTransactionViewQueryResponse) FrameworkException(org.jaffa.exceptions.FrameworkException)

Aggregations

AuditTransactionViewQueryResponse (org.jaffa.components.audit.apis.data.AuditTransactionViewQueryResponse)1 FrameworkException (org.jaffa.exceptions.FrameworkException)1