return findEventCompositesByCriteria(subject, criteria);
}
@Override
public PageList<EventComposite> findEventCompositesByCriteria(Subject subject, EventCriteria criteria) {
CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
String replacementSelectList = "" //
+ " new org.rhq.core.domain.event.composite.EventComposite( " //
+ " event.detail," //
+ " event.source.resource.id," //
+ " event.source.resource.name," //
+ " event.source.resource.ancestry," //
+ " event.source.resource.resourceType.id," //
+ " event.id," //
+ " event.severity," //
+ " event.source.location," //
+ " event.timestamp ) ";
generator.alterProjection(replacementSelectList);
if (authorizationManager.isInventoryManager(subject) == false) {
generator.setAuthorizationResourceFragment(CriteriaQueryGenerator.AuthorizationTokenType.RESOURCE,
"source.resource", subject.getId());
}
// log.info(generator.getParameterReplacedQuery(false));
// log.info(generator.getParameterReplacedQuery(true));