com.seag.qm
Class QueryParameter

java.lang.Object
  |
  +--com.seag.qm.QueryParameter
Direct Known Subclasses:
CharQueryParameter, DateQueryParameter, DecimalQueryParameter, IntegerQueryParameter, NullQueryParameter, SmallintQueryParameter, TimeQueryParameter, TimestampQueryParameter, VarcharQueryParameter

public abstract class QueryParameter
extends java.lang.Object


Field Summary
protected  java.lang.Object param
           
 
Constructor Summary
QueryParameter()
          Creats new QueryParameter
QueryParameter(java.lang.Object p)
          Creats new QueryParameter
 
Method Summary
abstract  java.lang.String getParameterType()
          Stringrepresentation of the specific Parameter (e.g.
 java.lang.Object getValue()
          Gets the value of the Parameter
abstract  void setParameter(java.sql.PreparedStatement stmt, int pos)
          Must be implemented by the derived Object
 void setValue(java.lang.Object p)
          Method is called by the ExecuteQuery Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

param

protected java.lang.Object param
Constructor Detail

QueryParameter

public QueryParameter()
Creats new QueryParameter

QueryParameter

public QueryParameter(java.lang.Object p)
Creats new QueryParameter
Parameters:
p - value of the parameter
Method Detail

setParameter

public abstract void setParameter(java.sql.PreparedStatement stmt,
                                  int pos)
                           throws java.sql.SQLException
Must be implemented by the derived Object
Parameters:
stmt - PreparedStatement created by the ExecuteQuery
pos - Position of the Parameter within the Query
Throws:
java.sql.SQLException - if method fails

getParameterType

public abstract java.lang.String getParameterType()
Stringrepresentation of the specific Parameter (e.g. "Integer", "String"...)
Returns:
String

setValue

public void setValue(java.lang.Object p)
Method is called by the ExecuteQuery Object
Parameters:
p - Parametervalue

getValue

public java.lang.Object getValue()
Gets the value of the Parameter
Returns:
Object Parametervalue