org.springframework.cloud.dataflow.server.batch

## Class SimpleJobServiceFactoryBean

- java.lang.Object
- - org.springframework.cloud.dataflow.server.batch.SimpleJobServiceFactoryBean

- All Implemented Interfaces:
    org.springframework.beans.factory.FactoryBean<JobService>, org.springframework.beans.factory.InitializingBean

      public class SimpleJobServiceFactoryBean
      extends Object
      implements org.springframework.beans.factory.FactoryBean<JobService>, org.springframework.beans.factory.InitializingBean

  A factory for a `JobService` that makes the configuration of its various ingredients as convenient as possible.
  Author:
    Dave Syer

- - ### Field Summary

    - ### Fields inherited from interface org.springframework.beans.factory.FactoryBean

      `OBJECT_TYPE_ATTRIBUTE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleJobServiceFactoryBean()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterPropertiesSet()`
    `protected org.springframework.batch.core.repository.dao.ExecutionContextDao` | `createExecutionContextDao()`
    `protected SearchableJobExecutionDao` | `createJobExecutionDao()`
    `protected SearchableJobInstanceDao` | `createJobInstanceDao()`
    `protected SearchableStepExecutionDao` | `createStepExecutionDao()`
    `JobService` | `getObject()` Create a `SimpleJobService` from the configuration provided.
    `Class<? extends JobService>` | `getObjectType()` Tells the containing bean factory what kind of object is the product of `getObject()`.
    `boolean` | `isSingleton()` Allows optimisation in the containing bean factory.
    `void` | `setDatabaseType(String dbType)` Sets the database type.
    `void` | `setDataSource(DataSource dataSource)` Public setter for the `DataSource`.
    `void` | `setIncrementerFactory(org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory incrementerFactory)` A factory for incrementers (used to build primary keys for meta data).
    `void` | `setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)`
    `void` | `setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)` The launcher used to run jobs.
    `void` | `setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)` The repository used to store and update jobs and step executions.
    `void` | `setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)` A special handler for large objects.
    `void` | `setMaxVarCharLength(int maxVarCharLength)` Public setter for the length of long string columns in database.
    `void` | `setSerializer(org.springframework.batch.core.repository.ExecutionContextSerializer serializer)` A custom implementation of the `ExecutionContextSerializer`.
    `void` | `setTablePrefix(String tablePrefix)` Sets the table prefix for all the batch meta-data tables.
    `void` | `setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleJobServiceFactoryBean

          public SimpleJobServiceFactoryBean()

  - ### Method Detail

    - #### setTransactionManager

          public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)

    - #### setLobHandler

          public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)

      A special handler for large objects. The default is usually fine, except for some (usually older) versions of Oracle. The default is determined from the data base type.
      Parameters:
        `lobHandler` - the `LobHandler` to set
      See Also:
        `LobHandler`

    - #### setMaxVarCharLength

          public void setMaxVarCharLength(int maxVarCharLength)

      Public setter for the length of long string columns in database. Do not set this if you haven't modified the schema. Note this value will be used for the exit message in both `JdbcJobExecutionDao` and `JdbcStepExecutionDao` and also the short version of the execution context in `JdbcExecutionContextDao` . For databases with multi-byte character sets this number can be smaller (by up to a factor of 2 for 2-byte characters) than the declaration of the column length in the DDL for the tables.
      Parameters:
        `maxVarCharLength` - the exitMessageLength to set

    - #### setDataSource

          public void setDataSource(DataSource dataSource)

      Public setter for the `DataSource`.
      Parameters:
        `dataSource` - a `DataSource`

    - #### setDatabaseType

          public void setDatabaseType(String dbType)

      Sets the database type.
      Parameters:
        `dbType` - as specified by `DefaultDataFieldMaxValueIncrementerFactory`

    - #### setTablePrefix

          public void setTablePrefix(String tablePrefix)

      Sets the table prefix for all the batch meta-data tables.
      Parameters:
        `tablePrefix` - Prefix for batch meta-data tables

    - #### setIncrementerFactory

          public void setIncrementerFactory(org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory incrementerFactory)

      A factory for incrementers (used to build primary keys for meta data). Defaults to `DefaultDataFieldMaxValueIncrementerFactory`.
      Parameters:
        `incrementerFactory` - the incrementer factory to set

    - #### setJobExplorer

          public void setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)

    - #### setJobRepository

          public void setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)

      The repository used to store and update jobs and step executions.
      Parameters:
        `jobRepository` - the `JobRepository` to set

    - #### setJobLauncher

          public void setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)

      The launcher used to run jobs.
      Parameters:
        `jobLauncher` - a `JobLauncher`

    - #### setSerializer

          public void setSerializer(org.springframework.batch.core.repository.ExecutionContextSerializer serializer)

      A custom implementation of the `ExecutionContextSerializer`.
      Parameters:
        `serializer` - the serializer to set
      See Also:
        `ExecutionContextSerializer`

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws Exception

      Specified by:
        `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
      Throws:
        `Exception`

    - #### createJobInstanceDao

          protected SearchableJobInstanceDao createJobInstanceDao()
                                                           throws Exception

      Throws:
        `Exception`

    - #### createJobExecutionDao

          protected SearchableJobExecutionDao createJobExecutionDao()
                                                             throws Exception

      Throws:
        `Exception`

    - #### createStepExecutionDao

          protected SearchableStepExecutionDao createStepExecutionDao()
                                                               throws Exception

      Throws:
        `Exception`

    - #### createExecutionContextDao

          protected org.springframework.batch.core.repository.dao.ExecutionContextDao createExecutionContextDao()
                                                                                                         throws Exception

      Throws:
        `Exception`

    - #### getObject

          public JobService getObject()
                               throws Exception

      Create a `SimpleJobService` from the configuration provided.
      Specified by:
        `getObject` in interface `org.springframework.beans.factory.FactoryBean<JobService>`
      Throws:
        `Exception`
      See Also:
        `FactoryBean.getObject()`

    - #### getObjectType

          public Class<? extends JobService> getObjectType()

      Tells the containing bean factory what kind of object is the product of `getObject()`.
      Specified by:
        `getObjectType` in interface `org.springframework.beans.factory.FactoryBean<JobService>`
      Returns:
        SimpleJobService
      See Also:
        `FactoryBean.getObjectType()`

    - #### isSingleton

          public boolean isSingleton()

      Allows optimisation in the containing bean factory.
      Specified by:
        `isSingleton` in interface `org.springframework.beans.factory.FactoryBean<JobService>`
      Returns:
        true
      See Also:
        `FactoryBean.isSingleton()`

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.