|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.optional.data.pojo.XPojoHelper
public class XPojoHelper
A helper for the pojo model nodes
Copyright (c) Xoetrope Ltd., 2001-2007
License: see license.txt
| Constructor Summary | |
|---|---|
XPojoHelper(java.lang.Object model)
Creates a new instance of XPojoHelper |
|
| Method Summary | |
|---|---|
protected static java.lang.Class |
convertType(java.lang.String typeName)
Returns Class object
whose simple name is in the given String |
protected static java.lang.Object |
convertValue(java.lang.String type,
java.lang.String value)
Converts specified value to the specified type. |
XPojoModel |
get(java.lang.String path)
Gets the pojo model at the specified path |
protected static java.lang.Class[] |
getArgumentTypes(java.lang.String propertyMethod)
Retrieves the argument types from the passed String describing property method( either getter or setter) The describing String must be in the format: method(typeName1, typeName2,...) |
protected static java.lang.Object[] |
getArgumentValues(java.lang.String element)
Retrieves argument values from the given element. |
protected static java.lang.String |
getElementIndex(java.lang.String element)
Retrieves index in the collection from the given element. |
protected static java.lang.String |
getMethodName(java.lang.String propertyMethod)
Retrieves the method name from the passed String describing property method. |
protected static java.lang.String |
getPropertyName(java.lang.String element)
Retrieves the property name from the given String which must be in the format: property(arg1,arg2)[idx]" |
XPojoModel |
getRootModel()
Gets the root of the pojo model |
static java.lang.Integer |
getSignatureKey(java.lang.Class[] types)
Returns the key for the specified argument types which will be used in the getters/setters hashtable |
boolean |
isDirty(java.lang.String path)
Indicates whether specified model node is dirty. |
static boolean |
isSimpleType(java.lang.Class type)
Determines whether given class is simple type (primitive or primitive wrapper) |
static boolean |
needsAdapter(java.lang.Class type)
Indicates whether specified class needs an adapter |
XPojoModel |
set(java.lang.String path,
java.lang.Object value)
Sets the model value for the specified child of the base node |
static void |
setCurrentProject(XProject project)
Sets the current project. |
void |
setDirty()
Marks all nodes of the pojo model tree as dirty. |
void |
setDirty(java.lang.String path)
Marks the specified model node and its properties substree as dirty. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XPojoHelper(java.lang.Object model)
model - the root of the pojo model| Method Detail |
|---|
public void setDirty(java.lang.String path)
path - the path to the model node to be markedpublic void setDirty()
public boolean isDirty(java.lang.String path)
path - the path to the model node to be queried
public XPojoModel getRootModel()
public XPojoModel get(java.lang.String path)
path - the path to the child node
public XPojoModel set(java.lang.String path,
java.lang.Object value)
path - the path to the child nodevalue - the new value
public static void setCurrentProject(XProject project)
project - thep project that owns the model being queriedpublic static boolean needsAdapter(java.lang.Class type)
type - the Class to be checked
public static boolean isSimpleType(java.lang.Class type)
type - the class to be checked
protected static java.lang.Object convertValue(java.lang.String type,
java.lang.String value)
type - the type to which the value is to be
convertedvalue - the value to be converted
protected static java.lang.Class convertType(java.lang.String typeName)
Class object
whose simple name is in the given String
typeName - the simple name of the typeprotected static java.lang.String getMethodName(java.lang.String propertyMethod)
propertyMethod - String describing property method
protected static java.lang.Class[] getArgumentTypes(java.lang.String propertyMethod)
propertyMethod - String describing property method
protected static java.lang.Object[] getArgumentValues(java.lang.String element)
element - the binding path element
protected static java.lang.String getElementIndex(java.lang.String element)
element - the binding path element
protected static java.lang.String getPropertyName(java.lang.String element)
element - the binding path element
public static java.lang.Integer getSignatureKey(java.lang.Class[] types)
argument - types signature
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||