org.formaria.editor.data.pojo
Class PojoIteratorEx

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.PojoIteratorEx
All Implemented Interfaces:
ModelVis, TreeNodeCaption

public class PojoIteratorEx
extends PojoModelEx

Collection iterator 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.util.Collection collection
           
protected  java.util.Iterator iterator
           
 
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
PojoIteratorEx(PojoDataSourceEx ds, java.util.Collection c, PojoModelEx finder)
          Creates a new instance of PojoIteratorEx
 
Method Summary
 java.lang.Object first()
          Returns the first object from the underlying collection and resets the iteration index to 0.
 PojoAdapterEx getAdapter()
          Gets the current element adapter of this iteration
 java.lang.String getBindingPath()
          Gets the runtime binding path of this node
 java.lang.String getCaption()
          Gets this node's visualiser tree caption.
 java.lang.Class getPojoClass()
           
 boolean hasNext()
          Incdicates whether the iterator has more elements
 
Methods inherited from class org.formaria.editor.data.pojo.PojoModelEx
get, get, getAttribAvailableValues, getAttribName, getAttribRuntime, getAttribType, getAttribValue, getAttribValueAsString, getBindingAttributes, getId, getInvocationErrorNotifier, getNumAttributes, getNumChildren, getParameterTypes, getParameterValues, getPojo, getPropertyName, hasParameters, isAttribEditable, isCollection, isCollectionElement, isTransient, notifyObservers, obtainPropertyValue, parametersSet, setAttribValue, setTransient
 
Methods inherited from class org.formaria.editor.data.pojo.PojoModelVis
append, append, get, getAttribute, getAttribValueAsDouble, getAttribValueAsDouble, getAttribValueAsInt, 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

collection

protected java.util.Collection collection

iterator

protected java.util.Iterator iterator
Constructor Detail

PojoIteratorEx

public PojoIteratorEx(PojoDataSourceEx ds,
                      java.util.Collection c,
                      PojoModelEx finder)
Creates a new instance of PojoIteratorEx

Parameters:
ds - data source
c - Collection which iterator is wrapped by this node
Method Detail

hasNext

public boolean hasNext()
Incdicates whether the iterator has more elements

Returns:
true if the iterator has more elements, false otherwise.

getPojoClass

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

first

public java.lang.Object first()
Returns the first object from the underlying collection and resets the iteration index to 0.

Returns:
first element of the collection

getCaption

public java.lang.String getCaption()
Gets this node's visualiser tree caption.

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

getAdapter

public PojoAdapterEx getAdapter()
Gets the current element adapter of this iteration

Overrides:
getAdapter in class PojoModelVis
Returns:
the adapter

getBindingPath

public java.lang.String getBindingPath()
Gets the runtime binding path of this node

Specified by:
getBindingPath in interface ModelVis
Overrides:
getBindingPath in class PojoModelEx
Returns:
binding path