org.formaria.editor.data.pojo
Class PersistentPojoDataSourceEx

java.lang.Object
  extended by org.formaria.data.DataSource
      extended by org.formaria.editor.data.pojo.PojoDataSourceEx
          extended by org.formaria.editor.data.pojo.PersistentPojoDataSourceEx
Direct Known Subclasses:
HibernatePojoDataSourceEx

public class PersistentPojoDataSourceEx
extends PojoDataSourceEx


Field Summary
 
Fields inherited from class org.formaria.editor.data.pojo.PojoDataSourceEx
adapters, GETTER_PREFIXES, modelListeners, overrides, pojoContext, pojoRootModel, propertiesRetriever, SETTER_PREFIXES
 
Fields inherited from class org.formaria.data.DataSource
currentProject
 
Constructor Summary
PersistentPojoDataSourceEx(Project project)
          Creates a new instance of PersistentPojoDataSourceEx
 
Method Summary
 PojoModelVis adaptPojo(java.lang.Class pojoClass, java.lang.String propertyName, DataModel parentNode)
          Adapts the specified POJO for use in the data visualizer.
 PojoModelVis adaptPojo(java.lang.reflect.Method gtr, java.lang.reflect.Method str, java.lang.String propertyName, DataModel parentNode)
          Adapts a POJO for use in the data visualiser
 PojoModelVis adaptPojo(java.lang.Object pojo, DataModel parentNode)
          Adapts a POJO for use in the data visualiser.
protected  PojoAdapterEx createAdapter(java.lang.Class pojoClass)
          Creates a new instance of PersistentPojoAdapterEx
protected  void customizeProperty(PojoAdapterEx adapter, XmlElement propertyElement)
          Cutsomizes the specified adapter applying the changes from the propertyElement
 
Methods inherited from class org.formaria.editor.data.pojo.PojoDataSourceEx
getAdapter, getDispValue, getPojoContext, getProjectClassLoader, getPropertiesRetriever, getterSupported, loadTable, overrideAdapter, setterSupported
 
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

PersistentPojoDataSourceEx

public PersistentPojoDataSourceEx(Project project)
Creates a new instance of PersistentPojoDataSourceEx

Parameters:
project - the owner project
Method Detail

adaptPojo

public PojoModelVis adaptPojo(java.lang.Object pojo,
                              DataModel parentNode)
Adapts a POJO for use in the data visualiser.

Overrides:
adaptPojo in class PojoDataSourceEx
Parameters:
pojo - the POJO to be adapted
parentNode - the parent model node
Returns:
model node wrapping the specified pojo

adaptPojo

public PojoModelVis adaptPojo(java.lang.reflect.Method gtr,
                              java.lang.reflect.Method str,
                              java.lang.String propertyName,
                              DataModel parentNode)
Adapts a POJO for use in the data visualiser

Overrides:
adaptPojo in class PojoDataSourceEx
Parameters:
method - the method, the invocation of which returns the POJO to be adapted
propertyName - the property name of the parent node whose value is to be adapted
parentNode - the parent model node
Returns:
model node wrapping the specified pojo

adaptPojo

public PojoModelVis adaptPojo(java.lang.Class pojoClass,
                              java.lang.String propertyName,
                              DataModel parentNode)
Adapts the specified POJO for use in the data visualizer.

Overrides:
adaptPojo in class PojoDataSourceEx
Parameters:
pojoClass - the type of the POJO to be adapted
propertyName - the property name of the parent node whose value is to be adapted
parentNode - the parent model node
Returns:
model node wrapping the specified pojo

customizeProperty

protected void customizeProperty(PojoAdapterEx adapter,
                                 XmlElement propertyElement)
Cutsomizes the specified adapter applying the changes from the propertyElement

Overrides:
customizeProperty in class PojoDataSourceEx
Parameters:
adapter - the adapter to be customized
propertyElement - xml node describing customization

createAdapter

protected PojoAdapterEx createAdapter(java.lang.Class pojoClass)
Creates a new instance of PersistentPojoAdapterEx

Overrides:
createAdapter in class PojoDataSourceEx
Parameters:
pojoClass - the class to be adapted