net.xoetrope.optional.data.pojo
Class XPojoHibernateAdapter

java.lang.Object
  extended by net.xoetrope.registry.ComponentAdapter
      extended by net.xoetrope.registry.ReflectionAdapter
          extended by net.xoetrope.optional.data.pojo.XPojoAdapter
              extended by net.xoetrope.optional.data.pojo.XPojoHibernateAdapter

public class XPojoHibernateAdapter
extends XPojoAdapter

An adapter for Hibernate POJO's mapping the XUI model's use of the pojo, including customizations specified by the datasourec configuration to the interface provided by the POJO.


Field Summary
protected  java.util.Hashtable getterTransactions
           
protected  boolean isDao
           
protected  java.util.Hashtable setterTransactions
           
 
Fields inherited from class net.xoetrope.optional.data.pojo.XPojoAdapter
dataSource, GETTER_PREFIXES, SETTER_PREFIXES, transientProperties
 
Fields inherited from class net.xoetrope.registry.ComponentAdapter
className, clazz, getters, setters, UI
 
Constructor Summary
XPojoHibernateAdapter(java.lang.Class clazz, XPojoHibernateDataSource ds)
          Creates a new instance of XPojoHibernateAdapter object
 
Method Summary
protected  boolean getterRequiresTransaction(java.lang.String propertyName, java.lang.Class[] argTypes)
          Indicates whether the property getter requires an active transaction
protected  boolean isDao()
           
protected  void setDao(boolean state)
           
protected  void setGetterTransaction(java.lang.String propertyName, java.lang.String getterSig)
          Marks that the invocation of the specified getter method must be done within the bounds of an active transaction
protected  void setSetterTransaction(java.lang.String propertyName, java.lang.String sig)
          Marks that the specified setter method must be invoked within the bounds of an active transaction.
protected  boolean setterRequiresTransaction(java.lang.String propertyName, java.lang.Class[] argTypes)
          Indicates whether the property setter requires an active transaction
protected  void unsetGetterTransaction(java.lang.String propertyName, java.lang.String getterSig)
          Removes the information that the invocation of the specified getter method must be done within the bound of an active transaction.
protected  void unsetSetterTransaction(java.lang.String propertyName, java.lang.String sig)
          Removes the information that the invocation of the specified setter method must be done within the bound of an active transaction.
 
Methods inherited from class net.xoetrope.optional.data.pojo.XPojoAdapter
customizeProperty, findFirstMethod, getGetter, getId, getSetter, isTransient, setTransient
 
Methods inherited from class net.xoetrope.registry.ReflectionAdapter
addProperty, getProperty, setProperty
 
Methods inherited from class net.xoetrope.registry.ComponentAdapter
addProperty, getAdapterClass, getAdapterClassName, getUI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

getterTransactions

protected java.util.Hashtable getterTransactions

setterTransactions

protected java.util.Hashtable setterTransactions

isDao

protected boolean isDao
Constructor Detail

XPojoHibernateAdapter

public XPojoHibernateAdapter(java.lang.Class clazz,
                             XPojoHibernateDataSource ds)
Creates a new instance of XPojoHibernateAdapter object

Parameters:
clazz - the class to be adapted
ds - the data source object
Method Detail

isDao

protected boolean isDao()

setDao

protected void setDao(boolean state)

setGetterTransaction

protected void setGetterTransaction(java.lang.String propertyName,
                                    java.lang.String getterSig)
Marks that the invocation of the specified getter method must be done within the bounds of an active transaction

Parameters:
propertyName - the name of the property to which the getter is assigned
getterSig - the getter method signature

unsetGetterTransaction

protected void unsetGetterTransaction(java.lang.String propertyName,
                                      java.lang.String getterSig)
Removes the information that the invocation of the specified getter method must be done within the bound of an active transaction.

Parameters:
propertyName - the name of the property to which the getter is assigned
getterSig - the getter method signature

setSetterTransaction

protected void setSetterTransaction(java.lang.String propertyName,
                                    java.lang.String sig)
Marks that the specified setter method must be invoked within the bounds of an active transaction.

Parameters:
propertyName - the name of the property to which the setter is assigned.
setterSig - the setter method signature

unsetSetterTransaction

protected void unsetSetterTransaction(java.lang.String propertyName,
                                      java.lang.String sig)
Removes the information that the invocation of the specified setter method must be done within the bound of an active transaction.

Parameters:
propertyName - the name of the property to which the getter is assigned
sig - the getter method signature

getterRequiresTransaction

protected boolean getterRequiresTransaction(java.lang.String propertyName,
                                            java.lang.Class[] argTypes)
Indicates whether the property getter requires an active transaction

Parameters:
propertyName - the name of the property whose getter is to be queried
argTypes - the getter argument types
Returns:
true if the specified getter exists and requires an active transaction, false otherwise

setterRequiresTransaction

protected boolean setterRequiresTransaction(java.lang.String propertyName,
                                            java.lang.Class[] argTypes)
Indicates whether the property setter requires an active transaction

Parameters:
propertyName - the name of the property whose setter is to be queried
argTypes - the setter argument types, this should be a table containing one Class object.
Returns:
true if the specified setter exists and requires an active transaction, false otherwise