|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvelosurf.sql.Pooled
velosurf.sql.PooledPreparedStatement
public class PooledPreparedStatement
this class encapsulates a jdbc PreparedStatement
| Field Summary | |
|---|---|
protected java.util.List |
columnNames
column names |
protected ConnectionWrapper |
connection
the connection |
protected Entity |
entity
the resulting entity |
protected java.sql.PreparedStatement |
preparedStatement
wrapped prepared statement |
protected java.sql.ResultSet |
resultSet
the result set |
private static java.lang.Class |
valueParserSubClass
|
| Fields inherited from class velosurf.sql.Pooled |
|---|
inUse, tagTime, useOver, valid |
| Constructor Summary | |
|---|---|
PooledPreparedStatement(ConnectionWrapper connection,
java.sql.PreparedStatement preparedStatement)
builds a new PooledPreparedStatement |
|
| Method Summary | |
|---|---|
void |
close()
close this statement |
java.lang.Object |
evaluate(java.util.List params)
gets a scalar result from this statement |
java.lang.Object |
fetch(java.util.List params)
get a unique object by id |
java.lang.Object |
fetch(java.util.List params,
Entity resultEntity)
get a unique object by id and specify the Entity this object is an Instance of |
java.lang.Object |
fetch(ReadOnlyMap params,
Entity resultEntity)
get a unique object by id and specify the Entity this object is an Instance of |
java.lang.Object |
get(java.lang.Object key)
get the object value of the specified resultset column |
ConnectionWrapper |
getConnection()
get statement's Connection |
long |
getLastInsertID()
get the last insert id - implemented only for mysql for now... |
java.util.Set |
keySet()
|
RowIterator |
query(java.util.List params)
gets the rowset |
RowIterator |
query(java.util.List params,
Entity resultEntity)
gets the rowset |
protected void |
setParams(java.util.List params)
set prepared parameter values |
int |
update(java.util.List params)
issues the modification query of this prepared statement |
| Methods inherited from class velosurf.sql.Pooled |
|---|
getTagTime, isInUse, isValid, notifyInUse, notifyOver, resetTagTime, setInvalid |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.lang.Class valueParserSubClass
protected ConnectionWrapper connection
protected java.sql.ResultSet resultSet
protected java.util.List columnNames
protected java.sql.PreparedStatement preparedStatement
protected Entity entity
| Constructor Detail |
|---|
public PooledPreparedStatement(ConnectionWrapper connection,
java.sql.PreparedStatement preparedStatement)
connection - database connectionpreparedStatement - wrapped prepared statement| Method Detail |
|---|
public java.lang.Object fetch(java.util.List params)
throws java.sql.SQLException
params - parameter values
java.sql.SQLException - thrown bu the database engine
public java.lang.Object fetch(java.util.List params,
Entity resultEntity)
throws java.sql.SQLException
params - parameter valuesresultEntity - resulting entity
java.sql.SQLException - thrown by the database engine
public java.lang.Object fetch(ReadOnlyMap params,
Entity resultEntity)
throws java.sql.SQLException
params - parameter valuesresultEntity - resulting entity
java.sql.SQLException - thrown by the database engine
public RowIterator query(java.util.List params)
throws java.sql.SQLException
params - parameter values
java.sql.SQLException - thrown by the database engine
public RowIterator query(java.util.List params,
Entity resultEntity)
throws java.sql.SQLException
params - parameter valuesresultEntity - resulting entity
java.sql.SQLException - thrown by the database engine
public java.lang.Object evaluate(java.util.List params)
throws java.sql.SQLException
params - parameter values
java.sql.SQLException - thrown bu the database engine
public int update(java.util.List params)
throws java.sql.SQLException
params - parameter values
java.sql.SQLException - thrown by the database engine
public java.lang.Object get(java.lang.Object key)
throws java.sql.SQLException
get in interface ReadOnlyMapkey - the name of the resultset column
java.sql.SQLException - thrown by the database engine
public java.util.Set keySet()
throws java.sql.SQLException
keySet in interface ReadOnlyMapjava.sql.SQLException
public long getLastInsertID()
throws java.sql.SQLException
java.sql.SQLException - thrown by the database engine
public void close()
throws java.sql.SQLException
close in class Pooledjava.sql.SQLException - thrown by the database enginepublic ConnectionWrapper getConnection()
getConnection in class Pooled
protected void setParams(java.util.List params)
throws java.sql.SQLException
params - parameter values
java.sql.SQLException - thrown by the database engine
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||