|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.tamino.db.api.response.TXMLObjectIteratorImpl
public class TXMLObjectIteratorImpl
TXMLObjectIteratorImpl is the implementation class for TXMLObjectIterator. TXMLObjectIteratorImpl sits on top of a response query content and can be used for bidirectional iteration.
Field Summary | |
---|---|
protected static int |
START_AT_BEGIN
An indicator for the iteration start at the beginning of a sequence. |
protected static int |
START_AT_END
An indicator for the iteration start at the ending of a sequence. |
Constructor Summary | |
---|---|
TXMLObjectIteratorImpl()
Initializes the default (empty) TXMLObjectIteratorImpl. |
|
TXMLObjectIteratorImpl(TResponseQueryContent responseQueryContent)
Initializes the TXMLObjectIteratorImpl with the given TResponseQueryContent. |
Method Summary | |
---|---|
boolean |
canMoveBy(int offset)
Indicates if this iterator can be moved by the given offset. |
void |
close()
Invalidate this iterator. |
int |
getCount()
Gets the query count as an int. |
protected int |
getCurrentIndex()
Return the current index. |
java.util.Locale |
getLocale()
Gets the locale. |
protected TResponseQueryContent |
getResponseQueryContent()
Gets the current response query content. |
boolean |
hasCount()
Indicates if the response of Tamino contained the query count. |
boolean |
hasNext()
Indicates if iterator has a next TXMLObject instance. |
boolean |
hasPrevious()
Indicates if this iterator has a previous TXMLObject instance. |
protected void |
initIndex(int startAt)
Internal method for initializing the index. |
void |
moveBy(int offset)
Moves the iterator by the given offset. |
TXMLObject |
next()
Returns the next TXMLObject in the underlying sequence. |
TXMLObject |
previous()
Returns the previous TXMLObject in the list. |
void |
reset()
Resets the iterator to its initial state as it has been constructed. |
protected void |
setCurrentIndex(int newIndex)
Set the current index. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
protected void |
setResponseQueryContent(java.util.Iterator iterator,
int proceedIteration)
Sets a new response query content on the iterator and moves the iterator to either the beginning or ending of the content sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int START_AT_BEGIN
protected static final int START_AT_END
Constructor Detail |
---|
public TXMLObjectIteratorImpl()
public TXMLObjectIteratorImpl(TResponseQueryContent responseQueryContent)
responseQueryContent
- denotes the query content over which can be iterated.Method Detail |
---|
public boolean hasNext()
hasNext
in interface TXMLObjectIterator
public TXMLObject next() throws TNoSuchXMLObjectException, TIteratorException
next
in interface TXMLObjectIterator
java.util.NoSuchElementException
- if iteration has no more elements.
TIteratorException
- if iteration failed because of an underlying Tamino problem.
TNoSuchXMLObjectException
- the if iteration has no next TXMLObject instance.public boolean hasPrevious()
hasPrevious
in interface TXMLObjectIterator
public TXMLObject previous() throws TNoSuchXMLObjectException, TIteratorException
previous
in interface TXMLObjectIterator
java.util.NoSuchElementException
- if iteration has no more elements.
TIteratorException
- if iteration failed because of an underlying Tamino problem.
TNoSuchXMLObjectException
- if the iteration has no previous TXMLObject instance.public boolean hasCount()
hasCount
in interface TXMLObjectIterator
public int getCount()
getCount
in interface TXMLObjectIterator
public boolean canMoveBy(int offset) throws TIteratorException
canMoveBy
in interface TXMLObjectIterator
offset
- the positive or negative amount to move the iterator
TIteratorException
- if iteration failed because of an underlying Tamino problem.public void moveBy(int offset) throws TNoSuchXMLObjectException, TIteratorException
moveBy
in interface TXMLObjectIterator
offset
- the positive or negative amount to move the iterator
TNoSuchXMLObjectException
- if the new position is out of bounds.
TIteratorException
- if iteration failed because of an underlying Tamino problem.public void reset() throws TIteratorException
reset
in interface TXMLObjectIterator
TIteratorException
- if iteration failed because of an underlying Tamino problem.protected final int getCurrentIndex()
protected final void setCurrentIndex(int newIndex)
public void close() throws TIteratorException
close
in interface TXMLObjectIterator
TIteratorException
- if iteration failed because of an underlying Tamino problem.protected void setResponseQueryContent(java.util.Iterator iterator, int proceedIteration)
iterator
- points to underyling TXMLObject instances.proceedIteration
- indicates where the iterator should proceed with iterations, either START_AT_BEGIN
or START_AT_END can be used here. The latter only makes sense once this iterator is capable for
backward iterations.public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
protected TResponseQueryContent getResponseQueryContent()
protected void initIndex(int startAt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |