站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

AbstractHibernateTestCase - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.test.core
Class AbstractHibernateTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.jboss.portal.test.core.AbstractHibernateTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ModelTestCase

public abstract class AbstractHibernateTestCase
extends junit.framework.TestCase


Field Summary
protected  org.hibernate.cfg.Configuration cfg
          .
protected  org.hibernate.Session currentSession
          The currently opened session.
protected  org.hibernate.Transaction currentTransaction
          The currently transaction.
protected  java.lang.String dbName
          .
protected  org.hibernate.SessionFactory factory
          .
protected  java.lang.String[] mappings
          .
 
Constructor Summary
AbstractHibernateTestCase(java.lang.String name)
           
 
Method Summary
protected  void beginTransaction()
           
protected  void closeSession()
           
protected  boolean commitTransaction()
          Try to commit the transaction and return true if the commit was succesful
protected  void createConfiguration()
           
protected  void createSchema()
           
protected  void createSessionFactory()
           
protected  void destroyConfiguration()
           
protected  void destroySchema()
           
protected  void destroySessionFactory()
           
protected  org.hibernate.Session getCurrentSession()
           
protected  org.hibernate.Session openSession()
           
protected  boolean rollbackTransaction()
          Rollback the transaction and return true if the rollback was succesful
 void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mappings

protected java.lang.String[] mappings
.


dbName

protected java.lang.String dbName
.


cfg

protected org.hibernate.cfg.Configuration cfg
.


factory

protected org.hibernate.SessionFactory factory
.


currentSession

protected org.hibernate.Session currentSession
The currently opened session.


currentTransaction

protected org.hibernate.Transaction currentTransaction
The currently transaction.

Constructor Detail

AbstractHibernateTestCase

public AbstractHibernateTestCase(java.lang.String name)
Method Detail

createConfiguration

protected void createConfiguration()

createSessionFactory

protected void createSessionFactory()

createSchema

protected void createSchema()

destroySchema

protected void destroySchema()

destroySessionFactory

protected void destroySessionFactory()

destroyConfiguration

protected void destroyConfiguration()

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception

beginTransaction

protected void beginTransaction()

commitTransaction

protected boolean commitTransaction()
Try to commit the transaction and return true if the commit was succesful


rollbackTransaction

protected boolean rollbackTransaction()
Rollback the transaction and return true if the rollback was succesful


closeSession

protected void closeSession()

getCurrentSession

protected org.hibernate.Session getCurrentSession()

openSession

protected org.hibernate.Session openSession()