Package psidev.psi.mi.jami.batch
Class BatchDataSourceInitializer
- java.lang.Object
-
- psidev.psi.mi.jami.batch.BatchDataSourceInitializer
-
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class BatchDataSourceInitializer extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
This class will initialize the batch database using external scripts containing sql commands to create the tables necessary for running Spring batch jobs.- Since:
29/05/12
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description BatchDataSourceInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
afterPropertiesSet.void
destroy()
destroy.protected void
finalize()
finalize.void
setDataSource(DataSource dataSource)
Setter for the fielddataSource
.void
setDestroyScripts(org.springframework.core.io.Resource[] destroyScripts)
Setter for the fielddestroyScripts
.void
setIgnoreFailedDrop(boolean ignoreFailedDrop)
Setter for the fieldignoreFailedDrop
.void
setInitScripts(org.springframework.core.io.Resource[] initScripts)
Setter for the fieldinitScripts
.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
finalize.
- Overrides:
finalize
in classObject
- Throws:
Throwable
- if any.- See Also:
Object.finalize()
-
destroy
public void destroy()
destroy.
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
afterPropertiesSet.
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
- if any.
-
setInitScripts
public void setInitScripts(org.springframework.core.io.Resource[] initScripts)
Setter for the field
initScripts
.- Parameters:
initScripts
- an array ofResource
objects.
-
setDestroyScripts
public void setDestroyScripts(org.springframework.core.io.Resource[] destroyScripts)
Setter for the field
destroyScripts
.- Parameters:
destroyScripts
- an array ofResource
objects.
-
setDataSource
public void setDataSource(DataSource dataSource)
Setter for the field
dataSource
.- Parameters:
dataSource
- aDataSource
object.
-
setIgnoreFailedDrop
public void setIgnoreFailedDrop(boolean ignoreFailedDrop)
Setter for the field
ignoreFailedDrop
.- Parameters:
ignoreFailedDrop
- a boolean.
-
-