org.formaria.data.pojo
Class HibernatePojoDataSource
java.lang.Object
org.formaria.data.DataSource
org.formaria.data.pojo.PojoDataSource
org.formaria.data.pojo.PersistentPojoDataSource
org.formaria.data.pojo.HibernatePojoDataSource
public class HibernatePojoDataSource
- extends PersistentPojoDataSource
A data source for working with Hibernate POJOs. When the application is loaded the
datasources are instantiated and in the case of a PojoDataSource the
PojoRoot instance specified by the root element is
instantiated and configured. The configuration project involves traversing
the class hierarchy and setting up PojoModel nodes or proxies for each class
in the pojo hierarchy, applying Hibernate mapping configuration to the POJO adapters that
are used in the application. The configuration can specify naming overrides if the
names established by reflection are not suitable
Copyright (c) Formaria Ltd., 2008
License: see license.txt
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hibernateConfiguration
protected java.util.Hashtable hibernateConfiguration
xmlParser
protected JaxpXmlParser xmlParser
HibernatePojoDataSource
public HibernatePojoDataSource(Project project)
- Creates a new instance of HibernatePojoDataSource
- Parameters:
project - the owner project
getOverrideXml
protected XmlElement getOverrideXml(PojoAdapter adapter)
- Gets the xml element describing overrides of the class
being adapted by the specified adapter. The runtime class name
might be different from the one defined in the source code because
of the Hibernate proxy object.
- Overrides:
getOverrideXml in class PojoDataSource
- Parameters:
adapter - the adapter object
- Returns:
- XmlElement object describing the overrides.
overrideAdapter
protected void overrideAdapter(PojoAdapter adapter)
- Overrides the specified adapter, adds the information about
lazily initialized properties.
- Overrides:
overrideAdapter in class PersistentPojoDataSource
- Parameters:
adapter - the adapter to be overrided.
createPojoModel
protected PojoModel createPojoModel(DataModel parent,
java.lang.String subPath)
- Creates and returns a new instance of HibernatePojoModel
- Overrides:
createPojoModel in class PersistentPojoDataSource
- Parameters:
parent - the parent model of the model node
which is to be createdsubpath - String consisting of pojo properties,
must be in the format: propertyName(arguments...)[idx]
- Returns:
- PojoModel object
createPojoModel
protected PojoModel createPojoModel(DataModel parent,
java.lang.Object pojo)
- Creates and returns a new instance of HibernatePojoModel
- Overrides:
createPojoModel in class PersistentPojoDataSource
- Parameters:
parent - the parent model node
- Returns:
- PojoModel object