|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springmodules.orm.orbroker.BrokerAccessor
public abstract class BrokerAccessor
Base class for BrokerTemplate.
BrokerTemplate| Field Summary | |
|---|---|
protected Log |
logger
|
| Constructor Summary | |
|---|---|
BrokerAccessor()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Eagerly initialize the exception translator, creating a default one for the specified Broker if none set. |
protected DataAccessException |
convertBrokerException(BrokerException e)
|
Broker |
getBroker()
|
javax.sql.DataSource |
getDataSource()
|
SQLExceptionTranslator |
getExceptionTranslator()
Return the exception translator for this instance. |
boolean |
isLazyInit()
Return whether to lazily initialize the SQLExceptionTranslator for this accessor. |
protected Executable |
newExecutable(Broker broker,
java.sql.Connection connection)
|
protected void |
releaseExecutable(Broker broker,
Executable executable)
|
void |
setBroker(Broker broker)
|
void |
setDatabaseProductName(java.lang.String dbName)
Specify the database product name for the DataSource that this accessor uses. |
void |
setExceptionTranslator(SQLExceptionTranslator exceptionTranslator)
Set the exception translator for this instance. |
void |
setLazyInit(boolean lazyInit)
Set whether to lazily initialize the SQLExceptionTranslator for this accessor, on first encounter of a SQLException. |
protected DataAccessException |
translateJdbcException(java.sql.SQLException cause)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Log logger
| Constructor Detail |
|---|
public BrokerAccessor()
| Method Detail |
|---|
public javax.sql.DataSource getDataSource()
public void setDatabaseProductName(java.lang.String dbName)
dbName - the database product name that identifies the error codes entryorg.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator#setDatabaseProductName,
DatabaseMetaData.getDatabaseProductName()public void setExceptionTranslator(SQLExceptionTranslator exceptionTranslator)
If no custom translator is provided, a default SQLErrorCodeSQLExceptionTranslator is used which examines the SQLException's vendor-specific error code.
exceptionTranslator - exception translatororg.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator,
org.springframework.jdbc.support.SQLStateSQLExceptionTranslatorpublic SQLExceptionTranslator getExceptionTranslator()
Creates a default SQLErrorCodeSQLExceptionTranslator for the specified DataSource if none set.
public void setLazyInit(boolean lazyInit)
Early initialization only applies if afterPropertiesSet is called.
getExceptionTranslator(),
afterPropertiesSet()public boolean isLazyInit()
public void setBroker(Broker broker)
public Broker getBroker()
public void afterPropertiesSet()
protected DataAccessException convertBrokerException(BrokerException e)
protected DataAccessException translateJdbcException(java.sql.SQLException cause)
protected Executable newExecutable(Broker broker,
java.sql.Connection connection)
throws DataAccessException
DataAccessException
protected void releaseExecutable(Broker broker,
Executable executable)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||