OOP SimpleDaoHelper Version 1.2

com.bentofw.dao
Class QueryData

java.lang.Object
  extended by com.bentofw.dao.QueryData

public class QueryData
extends java.lang.Object

To set the values within the PreparedStatement object, please add the intended values to this object.

As the parameter of its constructor, this object takes the String object for the arbitrary SQL statement. And you can call a series of addXX( ) methods on this object. The parameters of these addXX( ) methods will be inserted into the PreparedStatement object automatically by SimpleDaoHelper.

Author:
Jun Inamori
See Also:
SimpleDaoHelper

Field Summary
static int BIG_DECIMAL
           
static int BINARY
           
static int BOOLEAN
           
static int BYTE
           
static int DOUBLE
           
static int FLOAT
           
static int INT
           
static int LONG
           
static int SHORT
           
static int SQL_DATE
           
static int SQL_TIME
           
static int SQL_TIME_STAMP
           
static int STRING
           
 
Constructor Summary
QueryData(java.lang.String st)
          The constructor.
 
Method Summary
 void addBigDecimal(java.math.BigDecimal query)
          By this method, you can specify the BigDecimal object which will be inserted into the PreparedStatement object.
 void addBinary(byte[] query)
          By this method, you can specify the byte[ ] object which will be inserted into the PreparedStatement object.
 void addBoolean(boolean query)
          By this method, you can specify the boolean value which will be inserted into the PreparedStatement object.
 void addByte(byte query)
          By this method, you can specify the byte value which will be inserted into the PreparedStatement object.
 void addDouble(double query)
          By this method, you can specify the double value which will be inserted into the PreparedStatement object.
 void addFloat(float query)
          By this method, you can specify the float value which will be inserted into the PreparedStatement object.
 void addInt(int query)
          By this method, you can specify the int value which will be inserted into the PreparedStatement object.
 void addLong(long query)
          By this method, you can specify the long value which will be inserted into the PreparedStatement object.
 void addNull(int sqlType)
          By this method, you can specify the null object which will be inserted into the PreparedStatement object.
 void addShort(short query)
          By this method, you can specify the short value which will be inserted into the PreparedStatement object.
 void addSqlDate(java.sql.Date query)
          By this method, you can specify the java.sql.Date object which will be inserted into the PreparedStatement object.
 void addSqlTime(java.sql.Time query)
          By this method, you can specify the java.sql.Time object which will be inserted into the PreparedStatement object.
 void addSqlTimestamp(java.sql.Timestamp query)
          By this method, you can specify the java.sql.Timestamp object which will be inserted into the PreparedStatement object.
 void addString(java.lang.String query)
          By this method, you can specify the String object which will be inserted into the PreparedStatement object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING

public static final int STRING
See Also:
Constant Field Values

INT

public static final int INT
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values

BINARY

public static final int BINARY
See Also:
Constant Field Values

BOOLEAN

public static final int BOOLEAN
See Also:
Constant Field Values

BYTE

public static final int BYTE
See Also:
Constant Field Values

SHORT

public static final int SHORT
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

BIG_DECIMAL

public static final int BIG_DECIMAL
See Also:
Constant Field Values

SQL_DATE

public static final int SQL_DATE
See Also:
Constant Field Values

SQL_TIME

public static final int SQL_TIME
See Also:
Constant Field Values

SQL_TIME_STAMP

public static final int SQL_TIME_STAMP
See Also:
Constant Field Values
Constructor Detail

QueryData

public QueryData(java.lang.String st)
The constructor. Please specify the arbitrary SQL statement as its parameter.

By a series of addXX( ) methods, you can specify a arbitrary number of values. Then, these values will be inserted into the PreparedStatement object by SimpleDaoHelper.

Parameters:
st - The arbitrary SQL statement.
See Also:

Method Detail

addString

public void addString(java.lang.String query)
By this method, you can specify the String object which will be inserted into the PreparedStatement object.

Parameters:
query - The String object to be inserted into the PreparedStatement object.

addInt

public void addInt(int query)
By this method, you can specify the int value which will be inserted into the PreparedStatement object.

Parameters:
query - The int value to be inserted into the PreparedStatement object.

addLong

public void addLong(long query)
By this method, you can specify the long value which will be inserted into the PreparedStatement object.

Parameters:
query - The long value to be inserted into the PreparedStatement object.

addBinary

public void addBinary(byte[] query)
By this method, you can specify the byte[ ] object which will be inserted into the PreparedStatement object.

Parameters:
query - The byte[ ] object to be inserted into the PreparedStatement object.

addNull

public void addNull(int sqlType)
By this method, you can specify the null object which will be inserted into the PreparedStatement object.

You must specify the parameters SQL type

Parameters:
sqlType - The SQL type code defined in java.sql.Types

addBoolean

public void addBoolean(boolean query)
By this method, you can specify the boolean value which will be inserted into the PreparedStatement object.

Parameters:
query - The boolean value to be inserted into the PreparedStatement object.

addByte

public void addByte(byte query)
By this method, you can specify the byte value which will be inserted into the PreparedStatement object.

Parameters:
query - The byte value to be inserted into the PreparedStatement object.

addShort

public void addShort(short query)
By this method, you can specify the short value which will be inserted into the PreparedStatement object.

Parameters:
query - The short value to be inserted into the PreparedStatement object.

addFloat

public void addFloat(float query)
By this method, you can specify the float value which will be inserted into the PreparedStatement object.

Parameters:
query - The float value to be inserted into the PreparedStatement object.

addDouble

public void addDouble(double query)
By this method, you can specify the double value which will be inserted into the PreparedStatement object.

Parameters:
query - The double value to be inserted into the PreparedStatement object.

addBigDecimal

public void addBigDecimal(java.math.BigDecimal query)
By this method, you can specify the BigDecimal object which will be inserted into the PreparedStatement object.

Parameters:
query - The BigDecimal object to be inserted into the PreparedStatement object.

addSqlDate

public void addSqlDate(java.sql.Date query)
By this method, you can specify the java.sql.Date object which will be inserted into the PreparedStatement object.

Parameters:
query - The java.sql.Date object to be inserted into the PreparedStatement object.

addSqlTime

public void addSqlTime(java.sql.Time query)
By this method, you can specify the java.sql.Time object which will be inserted into the PreparedStatement object.

Parameters:
query - The java.sql.Time object to be inserted into the PreparedStatement object.

addSqlTimestamp

public void addSqlTimestamp(java.sql.Timestamp query)
By this method, you can specify the java.sql.Timestamp object which will be inserted into the PreparedStatement object.

Parameters:
query - The java.sql.Timestamp object to be inserted into the PreparedStatement object.

OOP SimpleDaoHelper Version 1.2

ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.