Class AbstractJdbcBatchMetadataDao
- java.lang.Object
- org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
JdbcExecutionContextDao
,JdbcJobExecutionDao
,JdbcJobInstanceDao
,JdbcStepExecutionDao
,JobRepositoryTestUtils
public abstract class AbstractJdbcBatchMetadataDao extends java.lang.Object implements org.springframework.beans.factory.InitializingBean
Encapsulates common functionality needed by JDBC batch metadata DAOs - provides jdbcTemplate for subclasses and handles table prefixes.- Author:
- Robert Kasanicky
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_EXIT_MESSAGE_LENGTH
static java.lang.String
DEFAULT_TABLE_PREFIX
Default value for the table prefix property.
Constructor Summary
Constructors Constructor Description AbstractJdbcBatchMetadataDao()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
int
getClobTypeToUse()
protected org.springframework.jdbc.core.JdbcOperations
getJdbcTemplate()
protected java.lang.String
getQuery(java.lang.String base)
protected java.lang.String
getTablePrefix()
void
setClobTypeToUse(int clobTypeToUse)
void
setJdbcTemplate(org.springframework.jdbc.core.JdbcOperations jdbcTemplate)
void
setTablePrefix(java.lang.String tablePrefix)
Public setter for the table prefix property.
Field Detail
DEFAULT_TABLE_PREFIX
public static final java.lang.String DEFAULT_TABLE_PREFIX
Default value for the table prefix property.- See Also:
- Constant Field Values
DEFAULT_EXIT_MESSAGE_LENGTH
public static final int DEFAULT_EXIT_MESSAGE_LENGTH
- See Also:
- Constant Field Values
Method Detail
getQuery
protected java.lang.String getQuery(java.lang.String base)
getTablePrefix
protected java.lang.String getTablePrefix()
setTablePrefix
public void setTablePrefix(java.lang.String tablePrefix)
Public setter for the table prefix property. This will be prefixed to all the table names before queries are executed. Defaults toDEFAULT_TABLE_PREFIX
.- Parameters:
tablePrefix
- the tablePrefix to set
setJdbcTemplate
public void setJdbcTemplate(org.springframework.jdbc.core.JdbcOperations jdbcTemplate)
getJdbcTemplate
protected org.springframework.jdbc.core.JdbcOperations getJdbcTemplate()
getClobTypeToUse
public int getClobTypeToUse()
setClobTypeToUse
public void setClobTypeToUse(int clobTypeToUse)
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception