|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.j256.ormlite.jdbc.JdbcDatabaseAccess
public class JdbcDatabaseAccess
Implementation of DatabaseAccess interface in JDBC land.
| Field Summary |
|---|
| Fields inherited from interface com.j256.ormlite.support.DatabaseAccess |
|---|
MORE_THAN_ONE |
| Constructor Summary | |
|---|---|
JdbcDatabaseAccess(DataSource dataSource)
Construct a jdbc template with an associated data source. |
|
| Method Summary | ||
|---|---|---|
PreparedStmt |
prepareStatement(String sql)
Generate a prepared statement from a SQL statement. |
|
long |
queryForLong(String statement)
Perform a query whose result should be a single long-integer value. |
|
|
queryForOne(String statement,
Object[] args,
int[] argFieldTypeVals,
GenericRowMapper<T> rowMapper)
Perform a SQL query with the associated SQL statement, arguments, and types and returns a single result. |
|
int |
update(String statement,
Object[] args,
int[] argFieldTypeVals)
Perform a SQL update with the associated SQL statement, arguments, and types. |
|
int |
update(String statement,
Object[] args,
int[] argFieldTypeVals,
GeneratedKeyHolder keyHolder)
Perform a SQL update while returning generated keys with the associated SQL statement, arguments, and types. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcDatabaseAccess(DataSource dataSource)
| Method Detail |
|---|
public int update(String statement,
Object[] args,
int[] argFieldTypeVals)
throws SQLException
DatabaseAccess
update in interface DatabaseAccessSQLException
public int update(String statement,
Object[] args,
int[] argFieldTypeVals,
GeneratedKeyHolder keyHolder)
throws SQLException
DatabaseAccess
update in interface DatabaseAccessSQLException
public <T> Object queryForOne(String statement,
Object[] args,
int[] argFieldTypeVals,
GenericRowMapper<T> rowMapper)
throws SQLException
DatabaseAccess
queryForOne in interface DatabaseAccessDatabaseAccess.MORE_THAN_ONE if more than one result was found.
SQLException
public long queryForLong(String statement)
throws SQLException
DatabaseAccess
queryForLong in interface DatabaseAccessSQLException
public PreparedStmt prepareStatement(String sql)
throws SQLException
DatabaseAccess
prepareStatement in interface DatabaseAccessSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||