com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements
Class IterateContext

java.lang.Object
  extended bycom.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.IterateContext
All Implemented Interfaces:
java.util.Iterator

public class IterateContext
extends java.lang.Object
implements java.util.Iterator

Author:
Brandon Goodin

Constructor Summary
IterateContext(java.lang.Object collection, SqlTag tag)
           
 
Method Summary
 int getIndex()
           
 java.lang.String getProperty()
           
 SqlTag getTag()
           
 boolean hasNext()
           
 boolean isAllowNext()
           
 boolean isFinal()
           
 boolean isFirst()
           
 boolean isLast()
           
 java.lang.Object next()
           
 void remove()
           
 void setAllowNext(boolean performIterate)
           
 void setFinal(boolean aFinal)
          This attribute is used to mark whether an iterate tag is in it's final iteration.
 void setProperty(java.lang.String property)
          This property specifies whether to increment the iterate in the doEndFragment.
 void setTag(SqlTag tag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterateContext

public IterateContext(java.lang.Object collection,
                      SqlTag tag)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

getIndex

public int getIndex()

isFirst

public boolean isFirst()

isLast

public boolean isLast()

getProperty

public java.lang.String getProperty()
Returns:
Returns the property.

setProperty

public void setProperty(java.lang.String property)
This property specifies whether to increment the iterate in the doEndFragment. The ConditionalTagHandler has the ability to increment the IterateContext, so it is neccessary to avoid incrementing in both the ConditionalTag and the IterateTag.

Parameters:
property - The property to set.

isAllowNext

public boolean isAllowNext()
Returns:
Returns the allowNext.

setAllowNext

public void setAllowNext(boolean performIterate)
Parameters:
performIterate - The allowNext to set.

getTag

public SqlTag getTag()
Returns:
Returns the tag.

setTag

public void setTag(SqlTag tag)
Parameters:
tag - The tag to set.

isFinal

public boolean isFinal()
Returns:

setFinal

public void setFinal(boolean aFinal)
This attribute is used to mark whether an iterate tag is in it's final iteration. Since the ConditionalTagHandler can increment the iterate the final iterate in the doEndFragment of the IterateTagHandler needs to know it is in it's final iterate.

Parameters:
aFinal -