net.spy.db
Interface DBSPLike

All Known Implementing Classes:
DBCP, DBSP, DBSQL

public interface DBSPLike

Interface describing the basic DBSP features. This is used primarily as a superinterface for any abstract spts.


Method Summary
 void close()
          Get rid of this object.
 java.sql.ResultSet executeQuery()
          Execute a query.
 int executeUpdate()
          Execute an update.
 long getCacheTime()
          Get the cache time configured for this call.
 int getQueryTimeout()
          Get the query timeout.
 void setCacheTime(long time)
          Set the cache time for this cachable query.
 void setQueryTimeout(int timeout)
          Set the timeout for this query.
 

Method Detail

executeQuery

java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Execute a query.

Returns:
the Results from the query
Throws:
java.sql.SQLException - if there's a problem executing the query

executeUpdate

int executeUpdate()
                  throws java.sql.SQLException
Execute an update.

Returns:
the number of rows affected by this update
Throws:
java.sql.SQLException - if there's a problem executing the query

setCacheTime

void setCacheTime(long time)
Set the cache time for this cachable query.

Parameters:
time - time (in seconds) results should be valid

getCacheTime

long getCacheTime()
Get the cache time configured for this call.

Returns:
time (in seconds) results should be valid

setQueryTimeout

void setQueryTimeout(int timeout)
Set the timeout for this query.

See Also:
Statement.setQueryTimeout(int)

getQueryTimeout

int getQueryTimeout()
Get the query timeout.

See Also:
Statement.getQueryTimeout()

close

void close()
Get rid of this object.



Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.