|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.data.DataModel
org.formaria.data.pojo.PojoModel
org.formaria.data.pojo.PojoIterator
public class PojoIterator
A set of methods to help with POJOs.
Copyright (c) Formaria Ltd., 2008
License: see license.txt
| Field Summary | |
|---|---|
protected int |
curIdx
|
protected PojoModel[] |
elements
|
| Fields inherited from class org.formaria.data.pojo.PojoModel |
|---|
adapter, collectionElements, dataSource, dirty, elIdx, getterArgTypes, getterArgValues, pojo, properties, propertyKey, propertyName |
| Fields inherited from class org.formaria.aria.data.DataModel |
|---|
parentModel, tagName |
| Constructor Summary | |
|---|---|
PojoIterator(DataModel parent,
PojoDataSource ds)
Creates a new instance of PojoIterator. |
|
| Method Summary | |
|---|---|
java.lang.Object |
current()
Returns the model node wrapping the current element in the iteration |
java.lang.Object |
first()
Returns the model node wrapping the first object from the iterated collection and resets the iteration index to 0 |
java.lang.Object |
get(java.lang.String element)
Get the value of the element located at the path in the element parameter. |
java.lang.String |
getId()
Gets the values of the ID attribute |
boolean |
hasNext()
Indicates whether the iterator has more elements |
boolean |
hasPrevious()
Indicates whether this iterator has more elements while traversing the iterated collection in the reverse direction |
java.lang.Object |
last()
Returns the model node wrapping the last element of the iterated collection |
java.lang.Object |
next()
Gets the model node wrapping the next element in the iterated collection |
java.lang.Object |
previous()
Returns the model node wrapping the previous element in the iteration. |
void |
sync()
Syncs this node with the collection stored in the parent node |
| Methods inherited from class org.formaria.aria.data.DataModel |
|---|
addModelListener, fireModelUpdated, getParent, getTagName, hasAutoId, prefixOutputPath, removeChildren, reset, resetAttributes, setNumAttributes, setParent, setTagName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PojoModel[] elements
protected int curIdx
| Constructor Detail |
|---|
public PojoIterator(DataModel parent,
PojoDataSource ds)
parent - the parent model node wich pojo
is expected to be a collectionds - the data source object| Method Detail |
|---|
public java.lang.Object get(java.lang.String element)
PojoModel
get in class PojoModelelement - The path to the DataModel required
public void sync()
sync in class PojoModelpublic java.lang.Object current()
current in interface Iteratorpublic boolean hasNext()
hasNext in interface Iteratorpublic java.lang.Object next()
next in interface Iteratorpublic java.lang.Object first()
first in interface Iteratorpublic java.lang.Object last()
last in interface Iteratorpublic boolean hasPrevious()
hasPrevious in interface Iteratorpublic java.lang.Object previous()
previous in interface Iteratorpublic java.lang.String getId()
getId in class PojoModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||