|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.store.jdbc.support.JdbcTemplate
public class JdbcTemplate
Helper class that isused to encapsulate resource and transaction handling related to DataSource,
Statement, and ResultSet. DataSourceUtils is used to open/cose relevant
resources.
DataSourceUtils| Nested Class Summary | |
|---|---|
static interface |
JdbcTemplate.CallableStatementCallback
A callback used to work with CallableStatement. |
static interface |
JdbcTemplate.ExecuteSelectCallback
A callback used to retrieve data from a ResultSet. |
static interface |
JdbcTemplate.PrepateStatementAwareCallback
A callback interface used to initialize a Jdbc PreparedStatement. |
| Constructor Summary | |
|---|---|
JdbcTemplate(DataSource dataSource,
JdbcDirectorySettings settings)
Creates a new JdbcTemplate. |
|
| Method Summary | |
|---|---|
int[] |
executeBatch(String[] sqls)
A template method to execute a set of sqls in batch. |
int[] |
executeBatch(String sql,
JdbcTemplate.PrepateStatementAwareCallback callback)
A template method to execute that can execute the same sql several times using different values set to it (in the fillPrepareStatement) callback). |
Object |
executeCallable(String sql,
JdbcTemplate.CallableStatementCallback callback)
A template method to execute a simple sql callable statement. |
Object |
executeSelect(String sql,
JdbcTemplate.ExecuteSelectCallback callback)
A template method to execute a simple sql select statement. |
void |
executeUpdate(String sql)
A template method to execute a simpel sql update (with no need for data initialization). |
void |
executeUpdate(String sql,
JdbcTemplate.PrepateStatementAwareCallback callback)
A template method to execute a simple sql update. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcTemplate(DataSource dataSource,
JdbcDirectorySettings settings)
JdbcTemplate.
| Method Detail |
|---|
public Object executeSelect(String sql,
JdbcTemplate.ExecuteSelectCallback callback)
throws JdbcStoreException
Connection, PreparedStatement, and ResultSet
are managed by the template.
JdbcStoreException
public Object executeCallable(String sql,
JdbcTemplate.CallableStatementCallback callback)
throws JdbcStoreException
Connection, and CallableStatement
are managed by the template.
JdbcStoreException
public void executeUpdate(String sql,
JdbcTemplate.PrepateStatementAwareCallback callback)
throws JdbcStoreException
Connection, and PreparedStatement
are managed by the template. A PreparedStatement can be used
to set values to the given sql.
JdbcStoreException
public void executeUpdate(String sql)
throws JdbcStoreException
JdbcStoreException
public int[] executeBatch(String[] sqls)
throws JdbcStoreException
JdbcStoreException
public int[] executeBatch(String sql,
JdbcTemplate.PrepateStatementAwareCallback callback)
throws JdbcStoreException
fillPrepareStatement) callback).
JdbcStoreException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||