org.springframework.batch.core.repository.support
Class AbstractJobRepositoryFactoryBean

java.lang.Object
  extended by org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean
All Implemented Interfaces:
FactoryBean, InitializingBean
Direct Known Subclasses:
JobRepositoryFactoryBean, MapJobRepositoryFactoryBean

public abstract class AbstractJobRepositoryFactoryBean
extends Object
implements FactoryBean, InitializingBean

A FactoryBean that automates the creation of a SimpleJobRepository. Declares abstract methods for providing DAO object implementations.

Author:
Ben Hale, Lucas Ward, Robert Kasanicky
See Also:
JobRepositoryFactoryBean, MapJobRepositoryFactoryBean

Constructor Summary
AbstractJobRepositoryFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected abstract  JobExecutionDao createJobExecutionDao()
           
protected abstract  JobInstanceDao createJobInstanceDao()
           
protected abstract  StepExecutionDao createStepExecutionDao()
           
 Object getObject()
           
 Class getObjectType()
          The type of object to be returned from getObject().
protected  void initializeProxy()
           
 boolean isSingleton()
           
 void setIsolationLevelForCreate(String isolationLevelForCreate)
          Public setter for the isolation level to be used for the transaction when job execution entities are initially created.
 void setTransactionManager(PlatformTransactionManager transactionManager)
          Public setter for the PlatformTransactionManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJobRepositoryFactoryBean

public AbstractJobRepositoryFactoryBean()
Method Detail

createJobInstanceDao

protected abstract JobInstanceDao createJobInstanceDao()
                                                throws Exception
Returns:
fully configured JobInstanceDao implementation.
Throws:
Exception

createJobExecutionDao

protected abstract JobExecutionDao createJobExecutionDao()
                                                  throws Exception
Returns:
fully configured JobExecutionDao implementation.
Throws:
Exception

createStepExecutionDao

protected abstract StepExecutionDao createStepExecutionDao()
                                                    throws Exception
Returns:
fully configured StepExecutionDao implementation.
Throws:
Exception

getObject

public Object getObject()
                 throws Exception
Specified by:
getObject in interface FactoryBean
Throws:
Exception

getObjectType

public Class getObjectType()
The type of object to be returned from getObject().

Specified by:
getObjectType in interface FactoryBean
Returns:
JobRepository.class
See Also:
FactoryBean.getObjectType()

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

initializeProxy

protected void initializeProxy()
                        throws Exception
Throws:
Exception

setTransactionManager

public void setTransactionManager(PlatformTransactionManager transactionManager)
Public setter for the PlatformTransactionManager.

Parameters:
transactionManager - the transactionManager to set

setIsolationLevelForCreate

public void setIsolationLevelForCreate(String isolationLevelForCreate)
Public setter for the isolation level to be used for the transaction when job execution entities are initially created. The default is ISOLATION_SERIALIZABLE, which prevents accidental concurrent execution of the same job (ISOLATION_REPEATABLE_READ would work as well).

Parameters:
isolationLevelForCreate - the isolation level name to set
See Also:
SimpleJobRepository.createJobExecution(org.springframework.batch.core.Job, org.springframework.batch.core.JobParameters)


Copyright © 2009 SpringSource. All Rights Reserved.