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

HibernateSupport - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.test.framework.embedded
Class HibernateSupport

java.lang.Object
  extended byorg.jboss.portal.test.framework.embedded.HibernateSupport

public class HibernateSupport
extends java.lang.Object

Version:
$Revision: 5498 $
Author:
Julien Viet

Field Summary
protected  org.hibernate.cfg.Configuration cfg
          .
static java.lang.String DS_JNDI_NAME
           
protected  org.hibernate.SessionFactory factory
          .
protected  java.lang.String jndiName
          .
protected  java.util.Collection mappings
          .
protected  org.hibernate.Session session
          .
protected  org.hibernate.cfg.Settings settings
          .
 
Constructor Summary
HibernateSupport()
           
 
Method Summary
 boolean commitTransaction()
          Try to commit the transaction and return true if the commit was succesful
 void create()
           
protected  void createConfiguration()
           
protected  void createSchema()
           
protected  void createSessionFactory()
           
 void destroy()
           
protected  void destroyConfiguration()
           
protected  void destroySchema()
           
protected  void destroySessionFactory()
           
 org.hibernate.cfg.Configuration getConfig()
           
 org.hibernate.Session getCurrentSession()
           
 java.lang.String getJNDIName()
           
 java.util.Collection getMappings()
           
 org.hibernate.SessionFactory getSessionFactory()
           
 org.hibernate.Session openSession()
           
 void rollbackTransaction()
          Rollback the transaction and return true if the rollback was succesful
 void setJNDIName(java.lang.String jndiName)
           
 void setMappings(java.util.Collection mappings)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DS_JNDI_NAME

public static final java.lang.String DS_JNDI_NAME
See Also:
Constant Field Values

jndiName

protected java.lang.String jndiName
.


mappings

protected java.util.Collection mappings
.


cfg

protected org.hibernate.cfg.Configuration cfg
.


factory

protected org.hibernate.SessionFactory factory
.


settings

protected org.hibernate.cfg.Settings settings
.


session

protected org.hibernate.Session session
.

Constructor Detail

HibernateSupport

public HibernateSupport()
Method Detail

getMappings

public java.util.Collection getMappings()

setMappings

public void setMappings(java.util.Collection mappings)

getConfig

public org.hibernate.cfg.Configuration getConfig()

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()

getJNDIName

public java.lang.String getJNDIName()

setJNDIName

public void setJNDIName(java.lang.String jndiName)

createConfiguration

protected void createConfiguration()

createSessionFactory

protected void createSessionFactory()

createSchema

protected void createSchema()

destroySchema

protected void destroySchema()

destroySessionFactory

protected void destroySessionFactory()

destroyConfiguration

protected void destroyConfiguration()

create

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

start

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

stop

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

destroy

public void destroy()

commitTransaction

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


rollbackTransaction

public void rollbackTransaction()
Rollback the transaction and return true if the rollback was succesful


getCurrentSession

public org.hibernate.Session getCurrentSession()

openSession

public org.hibernate.Session openSession()