|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.xoetrope.registry.ComponentAdapter
net.xoetrope.registry.ReflectionAdapter
net.xoetrope.optional.data.pojo.XPojoAdapter
public class XPojoAdapter
An adapter for 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.
Copyright (c) Xoetrope Ltd., 2001-2006
License: see license.txt
Field Summary | |
---|---|
protected XPojoDataSource |
dataSource
|
protected static java.lang.String[] |
GETTER_PREFIXES
|
protected static java.lang.String[] |
SETTER_PREFIXES
|
protected java.util.HashSet |
transientProperties
|
Fields inherited from class net.xoetrope.registry.ComponentAdapter |
---|
className, clazz, getters, setters, UI |
Constructor Summary | |
---|---|
XPojoAdapter(java.lang.Class clazz,
XPojoDataSource ds)
Creates a new instance of XPojoAdapter |
Method Summary | |
---|---|
protected void |
customizeProperty(java.lang.String propertyName,
java.lang.String getter,
java.lang.String setter)
Adapt a property by replacing the getter and setter names determined by reflection |
protected java.lang.reflect.Method |
findFirstMethod(java.lang.String propertyName,
java.lang.Class[] argTypes,
java.lang.String[] prefixes)
Gets the first method that matches any of the specified method names, method argument types matches the types of passed arguments and. |
protected java.lang.reflect.Method |
getGetter(java.lang.String propertyName,
java.lang.Object[] argVals)
Retrieves the getter method for the given property |
java.lang.String |
getId(java.lang.Object pojo)
Gets the value of the ID attribute |
protected java.lang.reflect.Method |
getSetter(java.lang.String propertyName,
java.lang.Object value)
Retrieves the setter method for the given property. |
protected boolean |
isTransient(java.lang.String propertyName)
Determines whether specified property is transient |
protected void |
setTransient(java.lang.String propertyName)
Marks that the specified property is transient. |
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 |
---|
protected static java.lang.String[] GETTER_PREFIXES
protected static java.lang.String[] SETTER_PREFIXES
protected XPojoDataSource dataSource
protected java.util.HashSet transientProperties
Constructor Detail |
---|
public XPojoAdapter(java.lang.Class clazz, XPojoDataSource ds)
Method Detail |
---|
public java.lang.String getId(java.lang.Object pojo)
protected void setTransient(java.lang.String propertyName)
protected boolean isTransient(java.lang.String propertyName)
propertyName
- the name of the property which
is to be queried
protected void customizeProperty(java.lang.String propertyName, java.lang.String getter, java.lang.String setter)
propertyName
- the prooerty being customizedgetter
- the property gettersetter
- the property setterprotected java.lang.reflect.Method getGetter(java.lang.String propertyName, java.lang.Object[] argVals)
propertyName
- the name of the propertyargVals
- property argument values being used to determine
the method signature
protected java.lang.reflect.Method getSetter(java.lang.String propertyName, java.lang.Object value)
propertyName
- the name of the propertyvalue
- the value that is going to be passed to the setterthe
- matching setter method if there is one, null otherwiseprotected java.lang.reflect.Method findFirstMethod(java.lang.String propertyName, java.lang.Class[] argTypes, java.lang.String[] prefixes)
propertyName
- the name of the property from which the method name is constructedargValues
- values of the method argumentsprefixes
- table containin prefixes which the name of the
wanted method may have.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |