com.sibvisions.rad.persist.jdbc
Class DBAccess.ParameterizedStatement

java.lang.Object
  extended by com.sibvisions.rad.persist.jdbc.DBAccess.ParameterizedStatement
Enclosing class:
DBAccess

public static class DBAccess.ParameterizedStatement
extends java.lang.Object

The DBAccess.ParameterizedStatement is a simple, mutable container for a statement and its values.

Note that this is implementation, class and mechanism is subject to change in a future version. For its stability can and will not be guaranteed in any way.


Constructor Summary
DBAccess.ParameterizedStatement(java.lang.String pStatement, java.util.List<java.lang.String> pNames, java.util.List<java.lang.Object> pValues, java.util.Map<java.lang.String,CompareCondition> pNameToCondition)
          Creates a new instance of DBAccess.ParameterizedStatement.
 
Method Summary
 java.util.List<java.lang.String> getNames()
          Gets the names.
 java.util.Map<java.lang.String,CompareCondition> getNameToCondition()
          Gets the name to condition.
 java.lang.String getStatement()
          Gets the statement.
 java.util.List<java.lang.Object> getValues()
          Gets the values.
 java.lang.Object[] getValuesAsArray()
          Gets the getValues() as array.
 void setStatement(java.lang.String pStatement)
          Sets the statement.
 void setValues(java.util.List<java.lang.Object> pValues)
          Sets the values of the parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBAccess.ParameterizedStatement

public DBAccess.ParameterizedStatement(java.lang.String pStatement,
                                       java.util.List<java.lang.String> pNames,
                                       java.util.List<java.lang.Object> pValues,
                                       java.util.Map<java.lang.String,CompareCondition> pNameToCondition)
Creates a new instance of DBAccess.ParameterizedStatement.

Parameters:
pStatement - the statement.
pNames - the List of names.
pValues - the values.
pNameToCondition - the Map of names to CompareConditions.
Method Detail

getNames

public java.util.List<java.lang.String> getNames()
Gets the names.

Returns:
the names.

getNameToCondition

public java.util.Map<java.lang.String,CompareCondition> getNameToCondition()
Gets the name to condition.

Returns:
the name to condition.

getStatement

public java.lang.String getStatement()
Gets the statement.

Returns:
the statement.

getValues

public java.util.List<java.lang.Object> getValues()
Gets the values.

Returns:
the values.

getValuesAsArray

public java.lang.Object[] getValuesAsArray()
Gets the getValues() as array.

Note that this method "bakes" the array, meaning that it is craeted only once on the first call.

Returns:
the getValues() as array.

setStatement

public void setStatement(java.lang.String pStatement)
Sets the statement.

Parameters:
pStatement - the statement.

setValues

public void setValues(java.util.List<java.lang.Object> pValues)
Sets the values of the parameters.

Parameters:
pValues - the values of the parameters.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.