com.softwareag.tamino.db.api.response.logging
Class TNonXMLObjectIteratorTimeLoggingImpl

java.lang.Object
  extended by com.softwareag.tamino.db.api.response.TNonXMLObjectIteratorImpl
      extended by com.softwareag.tamino.db.api.response.logging.TNonXMLObjectIteratorTimeLoggingImpl
All Implemented Interfaces:
TNonXMLObjectIterator

public class TNonXMLObjectIteratorTimeLoggingImpl
extends TNonXMLObjectIteratorImpl

TNonXMLObjectIteratorTimeLoggingImpl is an extension of TNonXMLObjectIteratorImpl that support time logging for the methods of the TNonXMLObjectIterator interface.

Version:
$Revision: 1.3 $
Author:
Oliver.Kleber@softwareag.com

Constructor Summary
TNonXMLObjectIteratorTimeLoggingImpl()
          Initializes the default (empty) TNonXMLObjectIteratorTimeLoggingImpl.
TNonXMLObjectIteratorTimeLoggingImpl(TXMLObjectIterator xmlObjectIterator, TAbstractAccessor abstractAccessor)
          Initializes the TNonXMLObjectIteratorTimeLoggingImpl with the given TXMLObjectIterator and the given TInvocation instance.
 
Method Summary
 boolean canMoveBy(int offset)
          Indicates if this iterator can be moved by the given offset.
 void close()
          Invalidate this iterator.
 boolean hasNext()
          Indicates if iterator has a next TNonXMLObject instance.
 boolean hasPrevious()
          Indicates if this iterator has a previous TNonXMLObject instance.
 void moveBy(int offset)
          Moves the iterator by the given offset.
 TNonXMLObject next()
          Returns the next TNonXMLObject in the underlying sequence.
 TNonXMLObject previous()
          Returns the previous TXMLObject in the list.
 void reset()
          Resets the iterator to its initial state as it has been constructed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TNonXMLObjectIteratorTimeLoggingImpl

public TNonXMLObjectIteratorTimeLoggingImpl()
Initializes the default (empty) TNonXMLObjectIteratorTimeLoggingImpl.


TNonXMLObjectIteratorTimeLoggingImpl

public TNonXMLObjectIteratorTimeLoggingImpl(TXMLObjectIterator xmlObjectIterator,
                                            TAbstractAccessor abstractAccessor)
Initializes the TNonXMLObjectIteratorTimeLoggingImpl with the given TXMLObjectIterator and the given TInvocation instance.

Parameters:
xmlObjectIterator - referrs as an iterator to the Non-XML objects XML object representation.
invocation - is needed here to invoke for each TXMLObject its concrete TNonXMLObject representation.
Method Detail

hasNext

public boolean hasNext()
Indicates if iterator has a next TNonXMLObject instance.

Specified by:
hasNext in interface TNonXMLObjectIterator
Overrides:
hasNext in class TNonXMLObjectIteratorImpl
Returns:
true if next element is given, false otherwise.

next

public TNonXMLObject next()
                   throws TNoSuchNonXMLObjectException,
                          TIteratorException
Returns the next TNonXMLObject in the underlying sequence. This method may be called repeatedly to iterate through the list, or intermixed with calls to previous to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)

Specified by:
next in interface TNonXMLObjectIterator
Overrides:
next in class TNonXMLObjectIteratorImpl
Returns:
The next TNonXMLObject.
Throws:
TNoSuchNonXMLObjectException - if iteration has no more TNonXMLObject instances.
TIteratorException - if iteration failed because of an underlying Tamino problem.

hasPrevious

public boolean hasPrevious()
Indicates if this iterator has a previous TNonXMLObject instance.

Specified by:
hasPrevious in interface TNonXMLObjectIterator
Overrides:
hasPrevious in class TNonXMLObjectIteratorImpl
Returns:
true if previous TXMLObject is given, false otherwise.

previous

public TNonXMLObject previous()
                       throws TNoSuchNonXMLObjectException,
                              TIteratorException
Returns the previous TXMLObject in the list. This method may be called repeatedly to iterate through the list of given TXMLObject instances.

Specified by:
previous in interface TNonXMLObjectIterator
Overrides:
previous in class TNonXMLObjectIteratorImpl
Returns:
The previous TXMLObject.
Throws:
java.util.NoSuchElementException - if iteration has no more elements.
TIteratorException - if iteration failed because of an underlying Tamino problem.
TNoSuchNonXMLObjectException - if the iteration has no previous TNonXMLObject instance.

canMoveBy

public boolean canMoveBy(int offset)
                  throws TIteratorException
Indicates if this iterator can be moved by the given offset.

Specified by:
canMoveBy in interface TNonXMLObjectIterator
Overrides:
canMoveBy in class TNonXMLObjectIteratorImpl
Parameters:
offset - the positive or negative amount to move the iterator
Returns:
true if move is possible, false otherwise.
Throws:
TIteratorException - if iteration failed because of an underlying Tamino problem.

moveBy

public void moveBy(int offset)
            throws TNoSuchNonXMLObjectException,
                   TIteratorException
Moves the iterator by the given offset.

Specified by:
moveBy in interface TNonXMLObjectIterator
Overrides:
moveBy in class TNonXMLObjectIteratorImpl
Parameters:
offset - the positive or negative amount to move the iterator
Throws:
TNoSuchNonXMLObjectException - if the new position is out of bounds.
TIteratorException - if iteration failed because of an underlying Tamino problem.

reset

public void reset()
           throws TIteratorException
Resets the iterator to its initial state as it has been constructed.

Specified by:
reset in interface TNonXMLObjectIterator
Overrides:
reset in class TNonXMLObjectIteratorImpl
Throws:
TIteratorException - if iteration failed because of an underlying Tamino problem.

close

public void close()
           throws TIteratorException
Invalidate this iterator. Closing the iterator releases any resources which a iterator may hold. After closing a iterator it is no longer usable.

Specified by:
close in interface TNonXMLObjectIterator
Overrides:
close in class TNonXMLObjectIteratorImpl
Throws:
TIteratorException - if iteration failed because of an underlying Tamino problem.


Copyright (c) 2013 Software AG. All Rights Reserved.