|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.editor.data.pojo.PojoAdapterEx
public class PojoAdapterEx
A POJO adapter that extends the basic pojo to support listing and querying of all possible properties.
Copyright (c) Formaria Ltd., 2001-2006, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
| Field Summary | |
|---|---|
protected java.lang.Class |
clazz
|
protected PojoDataSourceEx |
dataSource
|
protected java.util.Hashtable |
getters
|
protected PojoProperties |
properties
|
protected java.util.Hashtable |
setters
|
| Constructor Summary | |
|---|---|
PojoAdapterEx(java.lang.Class cl,
PojoDataSourceEx ds)
Creates a new instance of PojoAdapterEx |
|
| Method Summary | |
|---|---|
protected void |
addCollectionType(java.lang.String propertyName,
java.lang.String className)
Marks that the specified collection is intended to store the elements of the specified type |
protected void |
addTransientCollectionType(java.lang.String propertyName,
java.lang.String className)
Marks that the specified transient collection is intended to store elements of the specified type. |
protected void |
addTransientProperty(java.lang.String propertyName,
java.lang.String className)
Adds the transient property of the POJO |
protected void |
customizePojoProperty(java.lang.String propertyName,
java.lang.String propGetter,
java.lang.String propSetter)
Adapt a property by replacing the getter and setter names determined by reflection |
protected void |
findAccessors()
|
protected void |
findProperties()
Finds and saves all properties of the adapted class. |
java.lang.Class |
getAdaptedClass()
Gets the type adapted by this object. |
java.lang.String[] |
getGettersBySig(java.lang.Class[] parameterTypes)
|
protected java.lang.reflect.Method |
getMethod(java.lang.String method)
Gets the method described by the passed String. |
int |
getNumChildren()
Gets the number of properties |
PojoDataSourceEx |
getPojoDataSourceEx()
Gets the PojoDataSourceEx object used to construct
POJO's model. |
protected PojoProperties |
getProperties()
Gets the properties of the Class being adapted by this object. |
DataModel |
getProperty(java.lang.String propertyName,
DataModel parentNode)
Gets a model node wrapping property value of the passed object. |
java.lang.String[] |
getSetters()
|
java.lang.String[] |
getSettersBySig(java.lang.Class[] parameterTypes)
|
protected static java.lang.String |
getSignature(java.lang.reflect.Method method)
Gets the String describing the signature of the specified method. |
protected static java.lang.String |
getSignature(java.lang.String method)
Gets the method signature |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Class clazz
protected PojoDataSourceEx dataSource
protected PojoProperties properties
protected java.util.Hashtable getters
protected java.util.Hashtable setters
| Constructor Detail |
|---|
public PojoAdapterEx(java.lang.Class cl,
PojoDataSourceEx ds)
PojoAdapterEx
cl - the class to be adaptedds - the data source object.| Method Detail |
|---|
public java.lang.Class getAdaptedClass()
protected void findProperties()
protected void findAccessors()
public java.lang.String[] getGettersBySig(java.lang.Class[] parameterTypes)
public java.lang.String[] getSettersBySig(java.lang.Class[] parameterTypes)
public java.lang.String[] getSetters()
protected java.lang.reflect.Method getMethod(java.lang.String method)
String - describing the method
protected void addCollectionType(java.lang.String propertyName,
java.lang.String className)
propertyName - the name of the property representing the collectionclassName - the type of the collection elements
protected void addTransientCollectionType(java.lang.String propertyName,
java.lang.String className)
className - the type of the collection elements.
protected void addTransientProperty(java.lang.String propertyName,
java.lang.String className)
propertyName - the name of the transient propertyclassName - the name of the class whose instance will be "stored" by
this property
protected void customizePojoProperty(java.lang.String propertyName,
java.lang.String propGetter,
java.lang.String propSetter)
propName - the property being customizedpropGetter - the getter methodpropSetter - the setter methodprotected static java.lang.String getSignature(java.lang.String method)
method - the name of the method + signature
protected static java.lang.String getSignature(java.lang.reflect.Method method)
method - the method whose signature is to be
obtained
public DataModel getProperty(java.lang.String propertyName,
DataModel parentNode)
obj - the object whose property is to be retrievedpropertyName - the name of the propertyparentNode - the parent model node for the returned object
objprotected PojoProperties getProperties()
public PojoDataSourceEx getPojoDataSourceEx()
PojoDataSourceEx object used to construct
POJO's model.
PojoDataSourceEx object.public int getNumChildren()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||