org.hibernate.envers.test
Class AbstractOneSessionTest

java.lang.Object
  extended by org.hibernate.envers.test.AbstractEnversTest
      extended by org.hibernate.envers.test.AbstractOneSessionTest
Direct Known Subclasses:
ReadEntityAssociatedAuditedTest, ReadEntityAssociatedNotAuditedTest, ReadEntityWhitEntityNameTest, ReadEntityWithAuditedCollectionTest, ReadEntityWithAuditedCollectionTest, ReadEntityWithAuditedManyToManyTest, SingleDomainObjectToMultipleTablesTest

public abstract class AbstractOneSessionTest
extends AbstractEnversTest

Base class for testing envers with Session when the same session and auditReader must be used for the hole test.


Field Summary
protected  Configuration config
           
 
Constructor Summary
AbstractOneSessionTest()
           
 
Method Summary
 void closeSessionFactory()
           
 void forceNewSession()
          Creates a new session and auditReader.
protected  AuditReader getAuditReader()
           
protected  String getHibernateConfigurationFileName()
           
protected  Session getSession()
           
 void init()
           
 void initializeSession()
          Creates a new session and auditReader only if there is nothing created before
protected abstract  void initMappings()
           
 
Methods inherited from class org.hibernate.envers.test.AbstractEnversTest
data, getAuditStrategy, setTestData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected Configuration config
Constructor Detail

AbstractOneSessionTest

public AbstractOneSessionTest()
Method Detail

init

public void init()
          throws URISyntaxException
Throws:
URISyntaxException

initMappings

protected abstract void initMappings()
                              throws MappingException,
                                     URISyntaxException
Throws:
MappingException
URISyntaxException

getHibernateConfigurationFileName

protected String getHibernateConfigurationFileName()

closeSessionFactory

public void closeSessionFactory()

initializeSession

public void initializeSession()
Creates a new session and auditReader only if there is nothing created before


forceNewSession

public void forceNewSession()
Creates a new session and auditReader.


getSession

protected Session getSession()

getAuditReader

protected AuditReader getAuditReader()


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.