org.formaria.editor.data.pojo
Class PersistentPojoModelEx

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.PojoModelEx
              extended by org.formaria.editor.data.pojo.PersistentPojoModelEx
All Implemented Interfaces:
ModelVis, TreeNodeCaption

public class PersistentPojoModelEx
extends PojoModelEx


Field Summary
static int NUM_FIXED_ATTRIBUTES
           
static int TX_REQUIRED_ATTRIBUTE
           
 
Fields inherited from class org.formaria.editor.data.pojo.PojoModelEx
GETTER_ATTRIBUTE, hasParameters, invocationErrorNotifier, invocationOk, isTransient, NUM_FIXED_ATTRIBUTE, pojoMethodArgs, propertyName, SETTER_ATTRIBUTE, TRANSIENT_ATTRIBUTE
 
Fields inherited from class org.formaria.editor.data.pojo.PojoModelVis
adapter, ATTRIB_COMBO, ATTRIB_FREETEXT, ATTRIB_NEDITABLE, dataSource, getterSig, hashcode, ID_ATTRIBUTE, idAttrib, pojo, pojoClass, pojoCollection, pojoGetter, pojoSetter, setterSig, VALUE_ATTRIBUTE, valueAttrib
 
Fields inherited from class org.formaria.aria.data.DataModel
parentModel, tagName
 
Constructor Summary
PersistentPojoModelEx(DataModel pm, java.lang.Class pc, java.lang.String pn, PersistentPojoDataSourceEx ds)
           
PersistentPojoModelEx(DataModel pm, java.lang.reflect.Method gtr, java.lang.reflect.Method str, java.lang.String pn, PersistentPojoDataSourceEx ds)
           
PersistentPojoModelEx(DataModel pm, java.lang.Object p, PersistentPojoDataSourceEx ds)
           
 
Method Summary
 java.lang.String[] getAttribAvailableValues(int i)
           
 java.lang.String getAttribName(int i)
          Retrieve the name of the attribute at the specified index
 boolean getAttribRuntime(int i)
          Indicates whether the attribute will be available in the run-time mode.
 int getAttribType(int i)
           
 java.lang.Object getAttribValue(int i)
          Retrieve the value of the attribute at the specified index and return it.
 java.lang.String getAttribValueAsString(int i)
          Returns the value of the attribute at the specified index.
 int getNumAttributes()
          Gets the number of attributes
 boolean isAttribEditable(int i)
           
 void obtainPropertyValue()
          Updates the value of the underlying property
protected  boolean requiresTransaction(java.lang.String propertyName)
           
 void setAttribValue(int i, java.lang.Object value)
          Sets the attribute value
protected  void setTransaction(java.lang.String propertyName, boolean state)
           
 
Methods inherited from class org.formaria.editor.data.pojo.PojoModelEx
get, get, getBindingAttributes, getBindingPath, getId, getInvocationErrorNotifier, getNumChildren, getParameterTypes, getParameterValues, getPojo, getPojoClass, getPropertyName, hasParameters, isCollection, isCollectionElement, isTransient, notifyObservers, parametersSet, setTransient
 
Methods inherited from class org.formaria.editor.data.pojo.PojoModelVis
append, append, get, getAdapter, getAttribute, getAttribValueAsDouble, getAttribValueAsDouble, getAttribValueAsInt, getCaption, getProperties, getValueAsDouble, getValueAsInt, getValueAsString, hashCode, isDirty, set, set, 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

NUM_FIXED_ATTRIBUTES

public static final int NUM_FIXED_ATTRIBUTES
See Also:
Constant Field Values

TX_REQUIRED_ATTRIBUTE

public static final int TX_REQUIRED_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

PersistentPojoModelEx

public PersistentPojoModelEx(DataModel pm,
                             java.lang.reflect.Method gtr,
                             java.lang.reflect.Method str,
                             java.lang.String pn,
                             PersistentPojoDataSourceEx ds)

PersistentPojoModelEx

public PersistentPojoModelEx(DataModel pm,
                             java.lang.Object p,
                             PersistentPojoDataSourceEx ds)

PersistentPojoModelEx

public PersistentPojoModelEx(DataModel pm,
                             java.lang.Class pc,
                             java.lang.String pn,
                             PersistentPojoDataSourceEx ds)
Method Detail

getNumAttributes

public int getNumAttributes()
Description copied from class: PojoModelVis
Gets the number of attributes

Overrides:
getNumAttributes in class PojoModelEx
Returns:
the number of attributes

getAttribName

public java.lang.String getAttribName(int i)
Description copied from class: DataModel
Retrieve the name of the attribute at the specified index

Overrides:
getAttribName in class PojoModelEx
Parameters:
i - The index of the attributeNames array whose value we want
Returns:
The string value of the attributeNames array at position i

obtainPropertyValue

public void obtainPropertyValue()
Updates the value of the underlying property

Overrides:
obtainPropertyValue in class PojoModelEx

requiresTransaction

protected boolean requiresTransaction(java.lang.String propertyName)

setTransaction

protected void setTransaction(java.lang.String propertyName,
                              boolean state)

getAttribValue

public java.lang.Object getAttribValue(int i)
Description copied from class: DataModel
Retrieve the value of the attribute at the specified index and return it.

Overrides:
getAttribValue in class PojoModelEx
Parameters:
i - The index of the attributeValues array whose value we want
Returns:
The string value of the attributeValues array at position i

getAttribValueAsString

public java.lang.String getAttribValueAsString(int i)
Returns the value of the attribute at the specified index. The value is converted to a String object.

Overrides:
getAttribValueAsString in class PojoModelEx
Parameters:
i - the index of the attribute
Returns:
String value of the attribute

setAttribValue

public void setAttribValue(int i,
                           java.lang.Object value)
Description copied from class: DataModel
Sets the attribute value

Overrides:
setAttribValue in class PojoModelEx
Parameters:
i - The index of the attributeValues array whose value we want
value - the value object

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 PojoModelEx
Parameters:
i - the index of the attribute
Returns:
true if the attribute will be available in the runtime mode, false otherwise

getAttribType

public int getAttribType(int i)
Overrides:
getAttribType in class PojoModelEx

getAttribAvailableValues

public java.lang.String[] getAttribAvailableValues(int i)
Overrides:
getAttribAvailableValues in class PojoModelEx

isAttribEditable

public boolean isAttribEditable(int i)
Overrides:
isAttribEditable in class PojoModelEx