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 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 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