org.controlhaus.hibernate
Class HibernateControlBean

java.lang.Object
  extended by org.apache.beehive.controls.runtime.bean.ControlBean
      extended by org.controlhaus.hibernate.HibernateControlBean
All Implemented Interfaces:
java.beans.beancontext.BeanContextProxy, java.io.Serializable, org.apache.beehive.controls.api.bean.ControlBean, HibernateControl

public class HibernateControlBean
extends org.apache.beehive.controls.runtime.bean.ControlBean
implements HibernateControl

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.controlhaus.hibernate.HibernateControl
HibernateControl.ManagedTransactions
 
Field Summary
static org.apache.beehive.controls.api.properties.PropertyKey ManagedTransactionsValueKey
          A PropertyKey that can be used to access the value property of the ManagedTransactions PropertySet
 
Fields inherited from class org.apache.beehive.controls.runtime.bean.ControlBean
_implClass, FactorySeparator, IDSeparator
 
Constructor Summary
  HibernateControlBean()
          This is the public null-arg constructor for this ControlBean.
  HibernateControlBean(org.apache.beehive.controls.api.context.ControlBeanContext context, java.lang.String id, org.apache.beehive.controls.api.properties.PropertyMap props)
          This is the public constructor for the class.
protected HibernateControlBean(org.apache.beehive.controls.api.context.ControlBeanContext context, java.lang.String id, org.apache.beehive.controls.api.properties.PropertyMap props, java.lang.Class controlClass)
          This is the protected version that is used by any ControlBean subclass
 
Method Summary
 void closeSession()
          Implements org.controlhaus.hibernate.HibernateControl.closeSession
protected  java.lang.String[] getParameterNames(java.lang.reflect.Method m)
          Returns an array of parameter names for the request method, or null if no parameter data is available.
protected  java.util.Map getPropertyMapCache()
           
 net.sf.hibernate.Session getSession()
          Implements org.controlhaus.hibernate.HibernateControl.getSession
 net.sf.hibernate.SessionFactory getSessionFactory()
          Implements org.controlhaus.hibernate.HibernateControl.getSessionFactory
 net.sf.hibernate.Transaction getTransaction()
          Implements org.controlhaus.hibernate.HibernateControl.getTransaction
 boolean isManagedTransactionsValue()
           
 void setManagedTransactionsValue(boolean value)
           
 
Methods inherited from class org.apache.beehive.controls.runtime.bean.ControlBean
enforceVersionRequired, ensureControl, firePropertyChange, fireVetoableChange, getAnnotationMap, getBeanContext, getBeanContextProxy, getControlBeanContext, getControlID, getControlInterface, getControlProperty, getControlService, getEventNotifier, getImplInitializer, getLocalID, getMostDerivedInterface, getPropertyChangeSupport, getRawControlProperty, getVetoableChangeSupport, isSingleThreadedBean, postInvoke, preInvoke, setBeanContext, setControlID, setControlProperty, setEventNotifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ManagedTransactionsValueKey

public static org.apache.beehive.controls.api.properties.PropertyKey ManagedTransactionsValueKey
A PropertyKey that can be used to access the value property of the ManagedTransactions PropertySet

Constructor Detail

HibernateControlBean

public HibernateControlBean(org.apache.beehive.controls.api.context.ControlBeanContext context,
                            java.lang.String id,
                            org.apache.beehive.controls.api.properties.PropertyMap props)
This is the public constructor for the class. A client-defined control ID may be provided. This ID must be unique within the nesting ControlBeanContext.

Parameters:
context - The containing ControlBeanContext
id - The control identifier (or null to autogenerate a unique value)
props - The initialization Properties for the new instance (or null for defaults)

HibernateControlBean

public HibernateControlBean()
This is the public null-arg constructor for this ControlBean. If a control id is not provided, a unique value will be auto-generated.


HibernateControlBean

protected HibernateControlBean(org.apache.beehive.controls.api.context.ControlBeanContext context,
                               java.lang.String id,
                               org.apache.beehive.controls.api.properties.PropertyMap props,
                               java.lang.Class controlClass)
This is the protected version that is used by any ControlBean subclass

Method Detail

getParameterNames

protected java.lang.String[] getParameterNames(java.lang.reflect.Method m)
Returns an array of parameter names for the request method, or null if no parameter data is available.

Overrides:
getParameterNames in class org.apache.beehive.controls.runtime.bean.ControlBean

closeSession

public void closeSession()
                  throws net.sf.hibernate.HibernateException
Implements org.controlhaus.hibernate.HibernateControl.closeSession

Specified by:
closeSession in interface HibernateControl
Throws:
net.sf.hibernate.HibernateException

getTransaction

public net.sf.hibernate.Transaction getTransaction()
Implements org.controlhaus.hibernate.HibernateControl.getTransaction

Specified by:
getTransaction in interface HibernateControl
Returns:
The transaction for the current session. If there is no session or the control is not managing the transactions, it will return null.

getSession

public net.sf.hibernate.Session getSession()
                                    throws net.sf.hibernate.HibernateException
Implements org.controlhaus.hibernate.HibernateControl.getSession

Specified by:
getSession in interface HibernateControl
Returns:
The session that is currently associated with this Thread. If there is no session yet, one will be created.
Throws:
net.sf.hibernate.HibernateException

getSessionFactory

public net.sf.hibernate.SessionFactory getSessionFactory()
Implements org.controlhaus.hibernate.HibernateControl.getSessionFactory

Specified by:
getSessionFactory in interface HibernateControl
Returns:

setManagedTransactionsValue

public void setManagedTransactionsValue(boolean value)

isManagedTransactionsValue

public boolean isManagedTransactionsValue()

getPropertyMapCache

protected java.util.Map getPropertyMapCache()
Specified by:
getPropertyMapCache in class org.apache.beehive.controls.runtime.bean.ControlBean


Copyright © 2004-2005 Controlhaus. All Rights Reserved.