select audit_date from org.alfresco.repo.audit.hibernate.AuditDateImpl as audit_date where audit_date.id = (select max(audit_date_2.id) from org.alfresco.repo.audit.hibernate.AuditDateImpl as audit_date_2) select audit_config from org.alfresco.repo.audit.hibernate.AuditConfigImpl as audit_config where audit_config.id = (select max(audit_config_2.id) from org.alfresco.repo.audit.hibernate.AuditConfigImpl as audit_config_2) select audit_store_byid from org.alfresco.repo.audit.hibernate.AuditSourceImpl as audit_store_byid where audit_store_byid = (select max(audit_store.id) from org.alfresco.repo.audit.hibernate.AuditSourceImpl as audit_store where audit_store.application = :application and audit_store.service is null and audit_store.method is null) select audit_store_byid from org.alfresco.repo.audit.hibernate.AuditSourceImpl as audit_store_byid where audit_store_byid = (select max(audit_store.id) from org.alfresco.repo.audit.hibernate.AuditSourceImpl as audit_store where audit_store.application = :application and audit_store.service = :service and audit_store.method = :method) select audit_fact from org.alfresco.repo.audit.hibernate.AuditFactImpl as audit_fact where (audit_fact.storeProtocol = :protocol and audit_fact.storeId = :store_id and audit_fact.nodeUUID = :node_id) or arg1 like :nodeRef or arg2 like :nodeRef or arg3 like :nodeRef or arg4 like :nodeRef or arg5 like :nodeRef or returnValue like :nodeRef order by audit_fact.date asc