org.springframework.jdbc.core.JdbcTemplate and
other JDBC-accessing DAO helpers, defining common properties such as
DataSource and exception translator.
Not intended to be used directly.
See org..
org.springframework.jdbc.core.JdbcTemplate
| Modifier and Type | Field and Description |
|---|---|
| private DataSource | |
| private volatile SQLExceptionTranslator | |
| private boolean | |
| protected final Log | logger
Logger available to subclasses. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Eagerly initialize the exception translator, if demanded, creating a default one for the specified DataSource if none set. |
| public DataSource | |
| public SQLExceptionTranslator | getExceptionTranslator()
Return the exception translator to use for this instance, creating a default if necessary. |
| public boolean | |
| protected DataSource | |
| public void | setDatabaseProductName(String
the database product name that identifies the error codes entry dbName)Specify the database product name for the |
| public void | |
| public void | setExceptionTranslator(SQLExceptionTranslator exceptionTranslator)
Set the exception translator for this instance. |
| public void | setLazyInit(boolean lazyInit)
Set whether to lazily initialize the SQLExceptionTranslator for this accessor, on first encounter of an SQLException. |
| dataSource | back to summary |
|---|---|
| private DataSource dataSource
| |
| exceptionTranslator | back to summary |
|---|---|
| private volatile SQLExceptionTranslator exceptionTranslator
| |
| lazyInit | back to summary |
|---|---|
| private boolean lazyInit | |
| logger | back to summary |
|---|---|
| protected final Log logger Logger available to subclasses. | |
| JdbcAccessor | back to summary |
|---|---|
| public JdbcAccessor() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Eagerly initialize the exception translator, if demanded, creating a default one for the specified DataSource if none set.
| |
| getDataSource | back to summary |
|---|---|
| public DataSource getDataSource() Return the DataSource used by this template.
| |
| getExceptionTranslator | back to summary |
|---|---|
| public SQLExceptionTranslator getExceptionTranslator() Return the exception translator to use for this instance, creating a default if necessary.
| |
| isLazyInit | back to summary |
|---|---|
| public boolean isLazyInit() Return whether to lazily initialize the SQLExceptionTranslator for this accessor.
| |
| obtainDataSource | back to summary |
|---|---|
| protected DataSource obtainDataSource() Obtain the DataSource for actual use.
| |
| setDatabaseProductName | back to summary |
|---|---|
| public void setDatabaseProductName(String dbName) Specify the database product name for the
| |
| setDataSource | back to summary |
|---|---|
| public void setDataSource(DataSource dataSource) Set the JDBC DataSource to obtain connections from. | |
| setExceptionTranslator | back to summary |
|---|---|
| public void setExceptionTranslator(SQLExceptionTranslator exceptionTranslator) Set the exception translator for this instance. A | |
| setLazyInit | back to summary |
|---|---|
| public void setLazyInit(boolean lazyInit) Set whether to lazily initialize the SQLExceptionTranslator for this accessor, on first encounter of an SQLException. Default is "true"; can be switched to "false" for initialization on startup. Early initialization just applies if
| |