checkEntityAudited( c.getName() ); return new RevisionsOfEntityQuery( enversService,
boolean selectDeletedEntities) { c = getTargetClassIfProxied( c ); checkEntityAudited( entityName ); return new RevisionsOfEntityQuery( enversService,
/** * Creates a query, which will return entities satisfying some conditions (specified later), * at a given revision. Deleted entities are not included. * * @param c Class of the entities for which to query. * @param revision Revision number at which to execute the query. * * @return A query for entities at a given revision, to which conditions can be added and which * can then be executed. The result of the query will be a list of entities (beans), unless a * projection is added. */ public AuditQuery forEntitiesAtRevision(Class<?> c, Number revision) { checkNotNull( revision, "Entity revision" ); checkPositive( revision, "Entity revision" ); c = getTargetClassIfProxied( c ); checkEntityAudited( c.getName() ); return new EntitiesAtRevisionQuery( enversService, auditReaderImplementor, c, revision, false ); }
/** * Creates a query, which will return entities modified at the specified revision. * <p/> * In comparison, the {@link #forEntitiesAtRevision(Class, String, Number)} query takes into all entities * which were present at a given revision, even if they were not modified. * * @param c Class of the entities for which to query. * @param revision Revision number at which to execute the query. * * @return A query for entities changed at a given revision, to which conditions can be added and which * can then be executed. * * @see #forEntitiesAtRevision(Class, Number) */ public AuditQuery forEntitiesModifiedAtRevision(Class<?> c, Number revision) { checkNotNull( revision, "Entity revision" ); checkPositive( revision, "Entity revision" ); c = getTargetClassIfProxied( c ); checkEntityAudited( c.getName() ); return new EntitiesModifiedAtRevisionQuery( enversService, auditReaderImplementor, c, revision ); }
/** * Creates a query, which will return entities modified at the specified revision. * <p/> * In comparison, the {@link #forEntitiesAtRevision(Class, String, Number)} query takes into all entities * which were present at a given revision, even if they were not modified. * * @param c Class of the entities for which to query. * @param entityName Name of the entity (if can't be guessed basing on the {@code c}). * @param revision Revision number at which to execute the query. * * @return A query for entities changed at a given revision, to which conditions can be added and which * can then be executed. * * @see #forEntitiesAtRevision(Class, String, Number) */ public AuditQuery forEntitiesModifiedAtRevision(Class<?> c, String entityName, Number revision) { checkNotNull( revision, "Entity revision" ); checkPositive( revision, "Entity revision" ); c = getTargetClassIfProxied( c ); checkEntityAudited( entityName ); return new EntitiesModifiedAtRevisionQuery( enversService, auditReaderImplementor, c, entityName, revision ); }
/** * Creates a query, which will return entities satisfying some conditions (specified later), * at a given revision and a given entityName. Deleted entities may be optionally * included. * * @param c Class of the entities for which to query. * @param entityName Name of the entity (if can't be guessed basing on the {@code c}). * @param revision Revision number at which to execute the query. * @param includeDeletions Whether to include deleted entities in the search. * * @return A query for entities at a given revision, to which conditions can be added and which * can then be executed. The result of the query will be a list of entities (beans), unless a * projection is added. */ public AuditQuery forEntitiesAtRevision(Class<?> c, String entityName, Number revision, boolean includeDeletions) { checkNotNull( revision, "Entity revision" ); checkPositive( revision, "Entity revision" ); c = getTargetClassIfProxied( c ); checkEntityAudited( entityName ); return new EntitiesAtRevisionQuery( enversService, auditReaderImplementor, c, entityName, revision, includeDeletions ); }