Class 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 Detail

      • BatchDataSourceInitializer

        public BatchDataSourceInitializer()
    • Method Detail

      • destroy

        public void destroy()

        destroy.

        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception

        afterPropertiesSet.

        Specified by:
        afterPropertiesSet in interface org.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 of Resource objects.
      • setDestroyScripts

        public void setDestroyScripts​(org.springframework.core.io.Resource[] destroyScripts)

        Setter for the field destroyScripts.

        Parameters:
        destroyScripts - an array of Resource objects.
      • setDataSource

        public void setDataSource​(DataSource dataSource)

        Setter for the field dataSource.

        Parameters:
        dataSource - a DataSource object.
      • setIgnoreFailedDrop

        public void setIgnoreFailedDrop​(boolean ignoreFailedDrop)

        Setter for the field ignoreFailedDrop.

        Parameters:
        ignoreFailedDrop - a boolean.