use of org.hibernate.envers.query.AuditQuery in project hibernate-orm by hibernate.
the class AbstractModifiedFlagsEntityTest method queryForPropertyHasChanged.
protected List queryForPropertyHasChanged(Class<?> clazz, Object id, String... propertyNames) {
AuditQuery query = createForRevisionsQuery(clazz, id, false);
addHasChangedProperties(query, propertyNames);
return query.getResultList();
}
use of org.hibernate.envers.query.AuditQuery in project hibernate-orm by hibernate.
the class AbstractModifiedFlagsEntityTest method queryForPropertyHasChangedWithDeleted.
protected List queryForPropertyHasChangedWithDeleted(Class<?> clazz, Object id, String... propertyNames) {
AuditQuery query = createForRevisionsQuery(clazz, id, true);
addHasChangedProperties(query, propertyNames);
return query.getResultList();
}
use of org.hibernate.envers.query.AuditQuery in project hibernate-orm by hibernate.
the class AbstractModifiedFlagsEntityTest method queryForPropertyHasNotChanged.
protected List queryForPropertyHasNotChanged(Class<?> clazz, Object id, String... propertyNames) {
AuditQuery query = createForRevisionsQuery(clazz, id, false);
addHasNotChangedProperties(query, propertyNames);
return query.getResultList();
}
use of org.hibernate.envers.query.AuditQuery in project hibernate-orm by hibernate.
the class AbstractModifiedFlagsEntityTest method queryForPropertyHasNotChangedWithDeleted.
protected List queryForPropertyHasNotChangedWithDeleted(Class<?> clazz, Object id, String... propertyNames) {
AuditQuery query = createForRevisionsQuery(clazz, id, true);
addHasNotChangedProperties(query, propertyNames);
return query.getResultList();
}
use of org.hibernate.envers.query.AuditQuery in project hibernate-orm by hibernate.
the class EmbeddableQuery method testAuditQueryUsingEmbeddableEquals.
@Test
public void testAuditQueryUsingEmbeddableEquals() {
final NameInfo nameInfo = new NameInfo("John", "Doe");
final AuditQuery query = getAuditReader().createQuery().forEntitiesAtRevision(Person.class, 1);
query.add(AuditEntity.property("nameInfo").eq(nameInfo));
List<?> results = query.getResultList();
assertEquals(1, results.size());
final Person person = (Person) results.get(0);
assertEquals(nameInfo, person.getNameInfo());
}
Aggregations