com.acsinet_solutions.cetia4.controller.support
Class ParameterIterator

java.lang.Object
  extended by com.acsinet_solutions.cetia4.controller.support.ParameterIterator

public final class ParameterIterator
extends java.lang.Object

A parameter iterator instance. This is a java.sql.ResultSet style iterator, instead of a java.util.Iterator one. A perl 5 regular expression is passed to the constructor of this object to decide which parameters are of interest for this iterator ( only paraemters that match the regexp will be considered ). The regular expression must contain at least one matching section ( in parentheses ). In that matching section, a result will be provided of the types that are passed as arguments of the constructors.

Author:
Santiago Arriaga - santiago.arriaga@acsinet-solutions.com

Constructor Summary
ParameterIterator(ParameterAccessor accessor, Perl5Regexp regexp, ConversionType... keyTypes)
          Single key constructor.
ParameterIterator(ParameterAccessor accessor, java.lang.String re, ConversionType... keyTypes)
          Single key constructor.
 
Method Summary
 java.lang.Object getCurrentKey(int i)
          Get the given indexed key.
 java.lang.String getCurrentParam()
          Get the current param name.
 boolean next()
          Iterate to the next value and return true if found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterIterator

public ParameterIterator(ParameterAccessor accessor,
                         Perl5Regexp regexp,
                         ConversionType... keyTypes)
Single key constructor. The number of section in the regular expression must be the same as the keyTypes length.


ParameterIterator

public ParameterIterator(ParameterAccessor accessor,
                         java.lang.String re,
                         ConversionType... keyTypes)
Single key constructor. The number of section in the regular expression must be the same as the keyTypes length.

Method Detail

next

public final boolean next()
Iterate to the next value and return true if found.


getCurrentParam

public final java.lang.String getCurrentParam()
Get the current param name.


getCurrentKey

public final java.lang.Object getCurrentKey(int i)
Get the given indexed key. The index must be valid according to the number of parameters set in the search string.