net.spy.db
Class CachePreparedStatementStub

java.lang.Object
  extended bynet.spy.SpyObject
      extended bynet.spy.db.CachePreparedStatementStub

public class CachePreparedStatementStub
extends SpyObject

Prepared statement for executing cached queries


Constructor Summary
CachePreparedStatementStub(SpyDB db, String query, long cacheTime)
          Create a CachePreparedStatement object for the given query (you probably don't want to do this directly).
 
Method Summary
 void close()
           
 boolean equals(Object o)
          Equal if two objects have the same hash code, same query, and same parameters.
 ResultSet executeQuery()
           
 int executeUpdate()
           
 int hashCode()
          Get an integer hash code to uniquely identify this object.
 void setBigDecimal(int a0, BigDecimal a1)
           
 void setBoolean(int a0, boolean a1)
           
 void setDate(int a0, Date a1)
           
 void setDouble(int a0, double a1)
           
 void setFloat(int a0, float a1)
           
 void setInt(int a0, int a1)
           
 void setLong(int a0, long a1)
           
 void setMaxRows(int to)
          Set the max rows for the query return.
 void setNull(int a0, int a1)
           
 void setObject(int a0, Object a1)
           
 void setQueryTimeout(int to)
          Set the query timeout.
 void setShort(int a0, short a1)
           
 void setString(int a0, String a1)
           
 void setTime(int a0, Time a1)
           
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachePreparedStatementStub

public CachePreparedStatementStub(SpyDB db,
                                  String query,
                                  long cacheTime)
Create a CachePreparedStatement object for the given query (you probably don't want to do this directly).

Method Detail

hashCode

public int hashCode()
Get an integer hash code to uniquely identify this object.


equals

public boolean equals(Object o)
Equal if two objects have the same hash code, same query, and same parameters.


executeQuery

public ResultSet executeQuery()
                       throws SQLException
Throws:
SQLException

setQueryTimeout

public void setQueryTimeout(int to)
                     throws SQLException
Set the query timeout.

Parameters:
to - the maximum number of seconds
Throws:
SQLException - if the number is not greater than or equal to 0

setMaxRows

public void setMaxRows(int to)
                throws SQLException
Set the max rows for the query return.

Parameters:
to - the maximum number of rows to return
Throws:
SQLException - if the value is not greater than or equal to 0

executeUpdate

public int executeUpdate()
                  throws SQLException
Throws:
SQLException

setBoolean

public void setBoolean(int a0,
                       boolean a1)
                throws SQLException
Throws:
SQLException

setDate

public void setDate(int a0,
                    Date a1)
             throws SQLException
Throws:
SQLException

setDouble

public void setDouble(int a0,
                      double a1)
               throws SQLException
Throws:
SQLException

setFloat

public void setFloat(int a0,
                     float a1)
              throws SQLException
Throws:
SQLException

setInt

public void setInt(int a0,
                   int a1)
            throws SQLException
Throws:
SQLException

setLong

public void setLong(int a0,
                    long a1)
             throws SQLException
Throws:
SQLException

setNull

public void setNull(int a0,
                    int a1)
             throws SQLException
Throws:
SQLException

setBigDecimal

public void setBigDecimal(int a0,
                          BigDecimal a1)
                   throws SQLException
Throws:
SQLException

setObject

public void setObject(int a0,
                      Object a1)
               throws SQLException
Throws:
SQLException

setShort

public void setShort(int a0,
                     short a1)
              throws SQLException
Throws:
SQLException

setString

public void setString(int a0,
                      String a1)
               throws SQLException
Throws:
SQLException

setTime

public void setTime(int a0,
                    Time a1)
             throws SQLException
Throws:
SQLException

close

public void close()
           throws SQLException
Throws:
SQLException