com.elogico.xbound.jdbc.impl
Class StatementSource

java.lang.Object
  extended by com.elogico.xbound.jdbc.impl.StatementSource
All Implemented Interfaces:
Source

public class StatementSource
extends java.lang.Object
implements Source

Acts as an holder for a statement Source

Version:
$Revision: 1.2 $
Author:
Marco Sarti

Field Summary
static java.lang.String HANDLER
          The handler that treats this Source.
 
Constructor Summary
StatementSource(java.lang.String statement)
          Create a new StatementSource with a statement string with no parameters.
StatementSource(java.lang.String statement, java.util.List parameters)
          Create a new StatementSource with a statement string and a List of parameters.
StatementSource(java.lang.String statement, java.lang.String[] parmNames, java.util.Map parmMap)
          Create a new StatementSource with a Map of parameters and a list of parameter names (in the required order).
 
Method Summary
 java.lang.String getStatement()
          Get the statement string.
 java.util.Iterator iterator()
          Get an iterator of parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HANDLER

public static final java.lang.String HANDLER
The handler that treats this Source.

See Also:
Constant Field Values
Constructor Detail

StatementSource

public StatementSource(java.lang.String statement,
                       java.util.List parameters)
Create a new StatementSource with a statement string and a List of parameters.

Parameters:
statement - the statement string
parameters - ordered list of parameters

StatementSource

public StatementSource(java.lang.String statement)
Create a new StatementSource with a statement string with no parameters.

Parameters:
statement - the statement string

StatementSource

public StatementSource(java.lang.String statement,
                       java.lang.String[] parmNames,
                       java.util.Map parmMap)
                throws NameNotBoundException
Create a new StatementSource with a Map of parameters and a list of parameter names (in the required order).

Parameters:
statement - the statement string
parmNames - ordered list of parameter names
parmMap - map of parameters
Throws:
NameNotBoundException - if an error occours
Method Detail

getStatement

public java.lang.String getStatement()
Get the statement string.

Returns:
Returns the statement.

iterator

public java.util.Iterator iterator()
Get an iterator of parameters.

Returns:
parameter iterator