org.formaria.editor.data.pojo
Class PojoMethodArgs

java.lang.Object
  extended by org.formaria.aria.data.DataModel
      extended by org.formaria.editor.data.pojo.PojoModelVis
          extended by org.formaria.editor.data.pojo.PojoMethodArgs
All Implemented Interfaces:
ModelVis, TreeNodeCaption

public class PojoMethodArgs
extends PojoModelVis

Finder arguments model.

Copyright (c) Formaria Ltd., 2001-2007, 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.String[] genericNames
           
protected  java.lang.Class[] parameterTypes
           
protected  PojoMethodArg[] pojoArgs
           
protected  PojoModelEx pojoFinder
           
 
Fields inherited from class org.formaria.editor.data.pojo.PojoModelVis
adapter, ATTRIB_COMBO, ATTRIB_FREETEXT, ATTRIB_NEDITABLE, dataSource, getterSig, hashcode, ID_ATTRIBUTE, idAttrib, NUM_FIXED_ATTRIBUTE, pojo, pojoClass, pojoCollection, pojoGetter, pojoSetter, setterSig, VALUE_ATTRIBUTE, valueAttrib
 
Fields inherited from class org.formaria.aria.data.DataModel
parentModel, tagName
 
Constructor Summary
PojoMethodArgs(PojoModelEx pc, java.lang.reflect.Method method, PojoDataSourceEx ds)
          Creates a new instance of PojoFinderArgs
 
Method Summary
 boolean argumentValuesSet()
          Determines whether values of all the arguments hass been set
 DataModel get(int i)
          Gets the finder argument.
 java.lang.Object get(java.lang.String element)
          Gets the value of the element located at the path
 boolean getAttribRuntime(int i)
          Indicates whether the attribute will be available in the run-time mode.
 java.lang.String getCaption()
          Gets the visualiser tree caption of this node
 int getNumChildren()
          Gets the number of children
 java.lang.Class[] getParameterTypes()
          Returns the table containin parent method argument types
 java.lang.Class getPojoClass()
           
 void removeAllArgumentValues()
          Removes values of all arguments
 void set(java.lang.Object value)
          Sets the model value
protected  void setFinderArgs()
          Defines this finder arguments and restores its values in order to determine the number of children of this node.
 
Methods inherited from class org.formaria.editor.data.pojo.PojoModelVis
append, append, get, getAdapter, getAttribAvailableValues, getAttribName, getAttribType, getAttribute, getAttribValue, getAttribValueAsDouble, getAttribValueAsDouble, getAttribValueAsInt, getAttribValueAsString, getBindingAttributes, getBindingPath, getId, getNumAttributes, getProperties, getValueAsDouble, getValueAsInt, getValueAsString, hashCode, isAttribEditable, isDirty, set, setAttribValue, setAttribValue, setCaption, setDirty, setId, setPojo, setPojoClass, setPojoGetter, setPojoSetter
 
Methods inherited from class org.formaria.aria.data.DataModel
addModelListener, clear, fireModelUpdated, getParent, getTagName, hasAutoId, hasAutoId, prefixOutputPath, removeChildren, reset, resetAttributes, setNumAttributes, setNumChildren, setParent, setTagName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pojoFinder

protected PojoModelEx pojoFinder

parameterTypes

protected java.lang.Class[] parameterTypes

genericNames

protected java.lang.String[] genericNames

pojoArgs

protected PojoMethodArg[] pojoArgs
Constructor Detail

PojoMethodArgs

public PojoMethodArgs(PojoModelEx pc,
                      java.lang.reflect.Method method,
                      PojoDataSourceEx ds)
Creates a new instance of PojoFinderArgs

Parameters:
ds - PojoDataSourceEx object
pt - types of parameters
Method Detail

getPojoClass

public java.lang.Class getPojoClass()
Overrides:
getPojoClass in class PojoModelVis

getParameterTypes

public java.lang.Class[] getParameterTypes()
Returns the table containin parent method argument types

Returns:
the table containing types

getNumChildren

public int getNumChildren()
Gets the number of children

Overrides:
getNumChildren in class DataModel
Returns:
the number of children (parameters)

get

public DataModel get(int i)
Gets the finder argument.

Overrides:
get in class PojoModelVis
Parameters:
i - position of finder's argument in the list of arguments
Returns:
DataModel object representing finder's argument.

setFinderArgs

protected void setFinderArgs()
Defines this finder arguments and restores its values in order to determine the number of children of this node.


removeAllArgumentValues

public void removeAllArgumentValues()
Removes values of all arguments


argumentValuesSet

public boolean argumentValuesSet()
Determines whether values of all the arguments hass been set

Returns:
true if the values has been set, false otherwise

get

public java.lang.Object get(java.lang.String element)
Gets the value of the element located at the path

Overrides:
get in class DataModel
Parameters:
element - the path to the PojoModel required
Returns:
the value of the PojoModel

getCaption

public java.lang.String getCaption()
Gets the visualiser tree caption of this node

Specified by:
getCaption in interface TreeNodeCaption
Overrides:
getCaption in class PojoModelVis
Returns:
the caption

set

public void set(java.lang.Object value)
Description copied from class: DataModel
Sets the model value

Overrides:
set in class PojoModelVis
Parameters:
value - the new value

getAttribRuntime

public boolean getAttribRuntime(int i)
Description copied from class: PojoModelVis
Indicates whether the attribute will be available in the run-time mode.

Overrides:
getAttribRuntime in class PojoModelVis
Parameters:
i - the index of the attribute
Returns:
true if the attribute will be available in the runtime mode, false otherwise