Package org.hibernate.envers

Examples of org.hibernate.envers.DefaultRevisionEntity


        for (Map<String, Object> revisionEntity : orgHistory) {

            Assert.assertNotNull(revisionEntity);

            Date revendTimestamp = (Date) revisionEntity.get("REVEND_VALIDITY");
            DefaultRevisionEntity revEnd = (DefaultRevisionEntity) revisionEntity.get("REVEND");

            if (revendTimestamp != null) {
                Assert.assertEquals(revendTimestamp.getTime(), revEnd.getTimestamp());
            }

        }

    }
View Full Code Here


      List<Map<String, Object>> revisionEntities) {
    for (Map<String, Object> revisionEntity : revisionEntities) {

      Date revendTimestamp = (Date) revisionEntity
          .get(revendTimestampColumName);
      DefaultRevisionEntity revEnd = (DefaultRevisionEntity) revisionEntity
          .get("REVEND");

      if (revendTimestamp == null) {
        assert revEnd == null;
      } else {
        assert revendTimestamp.getTime() == revEnd.getTimestamp();
      }
    }
  }
View Full Code Here

        if (personHistory.size() == 0) {
            sb.append("A person with id ").append(personId).append(" does not exist.\n");
        } else {
            for (Object historyObj : personHistory) {
                Object[] history = (Object[]) historyObj;
                DefaultRevisionEntity revision = (DefaultRevisionEntity) history[1];
                sb.append("revision = ").append(revision.getId()).append(", ");
                printPerson(sb, (Person) history[0]);
                sb.append(" (").append(revision.getRevisionDate()).append(")\n");
            }
        }
    }
View Full Code Here

        if (addressHistory.size() == 0) {
            sb.append("A address with id ").append(addressId).append(" does not exist.\n");
        } else {
            for (Object historyObj : addressHistory) {
                Object[] history = (Object[]) historyObj;
                DefaultRevisionEntity revision = (DefaultRevisionEntity) history[1];
                sb.append("revision = ").append(revision.getId()).append(", ");
                printAddress(sb, (Address) history[0]);
                sb.append(" (").append(revision.getRevisionDate()).append(")\n");
            }
        }
    }
View Full Code Here

        for (Map<String, Object> revisionEntity : orgHistory) {

            Assert.assertNotNull(revisionEntity);

            Date revendTimestamp = (Date) revisionEntity.get("REVEND_VALIDITY");
            DefaultRevisionEntity revEnd = (DefaultRevisionEntity) revisionEntity.get("REVEND");

            if (revendTimestamp != null) {
                Assert.assertEquals(revendTimestamp.getTime(), revEnd.getTimestamp());
            }

        }

    }
View Full Code Here

    List <Object[]> bookRevisions = linkController.getHistoricalBook(book.getBookId());

    for(Object[] revisionData: bookRevisions)
    {   
      Book temp = (Book) revisionData[0]; // note use of array notation to retrieve historical records
      DefaultRevisionEntity rev = (DefaultRevisionEntity) revisionData[1];
 
      System.out.print(temp.getTitle()+" ");
      System.out.print(temp.getAuthor()+" ");
     
      System.out.print(rev.getId()+" ");
      System.out.print(rev.getRevisionDate()+" ");
     
      RevisionType revType = (RevisionType) revisionData[2];
      System.out.println(revType);
    }
  }
View Full Code Here

    {
      Book oldBook = (Book) auditData[0];
     
      System.out.print(oldBook);
     
      DefaultRevisionEntity revData = (DefaultRevisionEntity) auditData[1];
     
      System.out.print(" "+revData);
     
      RevisionType revType = (RevisionType) auditData[2];
View Full Code Here

TOP

Related Classes of org.hibernate.envers.DefaultRevisionEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.