|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.data.DataSource
org.formaria.data.pojo.PojoDataSource
org.formaria.data.pojo.PersistentPojoDataSource
public class PersistentPojoDataSource
A data source for working with Persistent 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. The configuration can specify naming overrides if the
names established by reflection are not suitable
Copyright (c) Formaria Ltd., 2008
License: see license.txt
| Field Summary |
|---|
| Fields inherited from class org.formaria.data.pojo.PojoDataSource |
|---|
adapters, overrides, pojoContext, pojoRootModel |
| Fields inherited from class org.formaria.data.DataSource |
|---|
currentProject |
| Constructor Summary | |
|---|---|
PersistentPojoDataSource(Project project)
Creates a new instance of PersistentPojoDataSource |
|
| Method Summary | |
|---|---|
protected PojoAdapter |
createAdapter(java.lang.Class pojoClass)
Creates and returns a new instance of PersistentPojoAdapter |
protected PojoModel |
createPojoModel(DataModel parent,
java.lang.Object pojo)
Creates and returns a new instance of PojoModel |
protected PojoModel |
createPojoModel(DataModel parent,
java.lang.String subPath)
Creates and returns a new instance of PersitentPojoModel |
protected void |
customizeProperty(PojoAdapter adapter,
XmlElement propertyElement)
|
protected PojoContext |
instantiatePojoContext(java.lang.String className,
java.lang.ClassLoader classLoader)
Creates and returns new PersistenceController object |
protected void |
overrideAdapter(PojoAdapter adapter)
Override the adapter specification loaded via reflection and add the customization specified by the configuration |
| Methods inherited from class org.formaria.data.pojo.PojoDataSource |
|---|
createProxyAdapter, getAdapter, getOverrideXml, getPojoContext, loadTable |
| Methods inherited from class org.formaria.data.DataSource |
|---|
outputModel, outputModel, outputModel, read, read, readDataSource, setUseValueAsId, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentPojoDataSource(Project project)
project - the owner project| Method Detail |
|---|
protected PojoContext instantiatePojoContext(java.lang.String className,
java.lang.ClassLoader classLoader)
throws java.lang.Exception
instantiatePojoContext in class PojoDataSourcethe - name of the class, the instance of which should
be returnedclassLoader - ClassLoader object to load the specified
class defintion
java.lang.Exceptionprotected PojoAdapter createAdapter(java.lang.Class pojoClass)
createAdapter in class PojoDataSourcepojoClass - the class to be adapted by the returned
adapter
protected PojoModel createPojoModel(DataModel parent,
java.lang.String subPath)
createPojoModel in class PojoDataSourceparent - 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]
protected PojoModel createPojoModel(DataModel parent,
java.lang.Object pojo)
createPojoModel in class PojoDataSourceparent - the parent model node
protected void overrideAdapter(PojoAdapter adapter)
overrideAdapter in class PojoDataSourceadapter - the adapter being customized
protected void customizeProperty(PojoAdapter adapter,
XmlElement propertyElement)
customizeProperty in class PojoDataSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||