use of org.hibernate.envers.AuditReader in project wildfly by wildfly.
the class SLSBAuditMO method retrieveOldPhoneListVersionFromCustomer.
public String retrieveOldPhoneListVersionFromCustomer(int id) {
AuditReader reader = AuditReaderFactory.get(em);
CustomerMO cust_rev = reader.find(CustomerMO.class, id, 1);
return cust_rev.getPhones().get(0).getType();
}
use of org.hibernate.envers.AuditReader in project wildfly by wildfly.
the class SLSBOrg method retrieveOldOrgbyId.
public Organization retrieveOldOrgbyId(int id) {
AuditReader reader = AuditReaderFactory.get(em);
List<Number> revList = reader.getRevisions(Organization.class, id);
Organization org1_rev = reader.find(Organization.class, id, 2);
return org1_rev;
}
use of org.hibernate.envers.AuditReader in project wildfly by wildfly.
the class SLSBPU method retrieveOldPersonVersionFromAddress.
public int retrieveOldPersonVersionFromAddress(int id) {
AuditReader reader = AuditReaderFactory.get(em);
Address address1_rev = reader.find(Address.class, id, 1);
return address1_rev.getPersons().size();
}
use of org.hibernate.envers.AuditReader in project wildfly by wildfly.
the class SLSBValidityStrategyOrg method verifyEndRevision.
public List<Map<String, Object>> verifyEndRevision(Integer id) {
AuditReader reader = AuditReaderFactory.get(em);
boolean b;
String queryString = "select a from " + Organization.class.getName() + "_AUD a where a.originalId.id=:id";
Query query = em.createQuery(queryString);
query.setParameter("id", id);
List<Map<String, Object>> orgHistory = query.getResultList();
return orgHistory;
}
use of org.hibernate.envers.AuditReader in project wildfly by wildfly.
the class SLSBValidityStrategyOrg method retrieveOldOrgbyId.
public Organization retrieveOldOrgbyId(int id) {
AuditReader reader = AuditReaderFactory.get(em);
Organization org1_rev = reader.find(Organization.class, id, 2);
return org1_rev;
}
Aggregations