|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object velosurf.sql.PooledStatement velosurf.sql.PooledPreparedStatement
public class PooledPreparedStatement
this class encapsulates a jdbc PreparedStatement.
Field Summary | |
---|---|
private java.util.List |
columnNames
|
private Entity |
entity
the resulting entity. |
private java.sql.PreparedStatement |
preparedStatement
wrapped prepared statement. |
private static java.lang.Class |
valueParserSubClass
org.apache.velocity.tools.generic.ValueParser$ValueParserSub class, if found in the classpath. |
Fields inherited from class velosurf.sql.PooledStatement |
---|
connection, resultSet |
Constructor Summary | |
---|---|
PooledPreparedStatement(ConnectionWrapper connection,
java.sql.PreparedStatement preparedStatement)
build a new PooledPreparedStatement. |
Method Summary | |
---|---|
void |
close()
close this statement. |
java.lang.Object |
evaluate(java.util.List params)
get 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(java.util.Map<java.lang.String,java.lang.Object> 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 Connection. |
long |
getLastInsertID()
get the last insert id. |
java.util.Set<java.lang.String> |
keySet()
Get keys set. |
RowIterator |
query(java.util.List params)
get the rowset. |
RowIterator |
query(java.util.List params,
Entity resultEntity)
get the rowset. |
private void |
setParams(java.util.List params)
set prepared parameter values. |
int |
update(java.util.List params)
issue the modification query of this prepared statement. |
Methods inherited from class velosurf.sql.PooledStatement |
---|
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
private java.util.List columnNames
private java.sql.PreparedStatement preparedStatement
private Entity entity
Constructor Detail |
---|
public PooledPreparedStatement(ConnectionWrapper connection, java.sql.PreparedStatement preparedStatement)
connection
- database connectionpreparedStatement
- wrapped prepared statementMethod Detail |
---|
public java.lang.Object fetch(java.util.List params) throws java.sql.SQLException
params
- parameter values
java.sql.SQLException
- thrown bu the database enginepublic 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 enginepublic java.lang.Object fetch(java.util.Map<java.lang.String,java.lang.Object> params, Entity resultEntity) throws java.sql.SQLException
params
- parameter valuesresultEntity
- resulting entity
java.sql.SQLException
- thrown by the database enginepublic RowIterator query(java.util.List params) throws java.sql.SQLException
params
- parameter values
java.sql.SQLException
- thrown by the database enginepublic RowIterator query(java.util.List params, Entity resultEntity) throws java.sql.SQLException
params
- parameter valuesresultEntity
- resulting entity
java.sql.SQLException
- thrown by the database enginepublic java.lang.Object evaluate(java.util.List params) throws java.sql.SQLException
params
- parameter values
java.sql.SQLException
- thrown bu the database enginepublic int update(java.util.List params) throws java.sql.SQLException
params
- parameter values
java.sql.SQLException
- thrown by the database enginepublic java.lang.Object get(java.lang.Object key) throws java.sql.SQLException
get
in interface RowHandler
key
- the name of the resultset column
java.sql.SQLException
- thrown by the database enginepublic java.util.Set<java.lang.String> keySet() throws java.sql.SQLException
RowHandler
keySet
in interface RowHandler
java.sql.SQLException
public long getLastInsertID() throws java.sql.SQLException
java.sql.SQLException
- thrown by the database enginepublic void close() throws java.sql.SQLException
close
in class PooledStatement
java.sql.SQLException
- thrown by the database enginepublic ConnectionWrapper getConnection()
getConnection
in class PooledStatement
private 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 |