# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Enums
- Deprecated Methods
- Deprecated Constructors

- Deprecated Classes
  Class and Description
  org.springframework.batch.test.AbstractJobTests (from 2.1) use `JobLauncherTestUtils` instead
  org.springframework.batch.item.data.AbstractNeo4jItemReader Extend `Neo4jItemReader` instead.
  org.springframework.batch.core.configuration.support.ClassPathXmlApplicationContextFactory use `GenericApplicationContextFactory` instead
  org.springframework.batch.core.configuration.support.ClassPathXmlJobRegistry in version 2.1, please us `AutomaticJobRegistrar` instead
  org.springframework.batch.item.database.support.ListPreparedStatementSetter use `ArgumentPreparedStatementSetter` instead.
  org.springframework.batch.core.repository.dao.MapExecutionContextDao as of v4.3 in favor of using the `JdbcExecutionContextDao` with an in-memory database. Scheduled for removal in v5.0.
  org.springframework.batch.core.repository.dao.MapJobExecutionDao as of v4.3 in favor of using the `JdbcJobExecutionDao` with an in-memory database. Scheduled for removal in v5.0.
  org.springframework.batch.core.explore.support.MapJobExplorerFactoryBean as of v4.3 in favor of using the `JobExplorerFactoryBean` with an in-memory database. Scheduled for removal in v5.0.
  org.springframework.batch.core.repository.dao.MapJobInstanceDao as of v4.3 in favor of using the `JdbcJobInstanceDao` with an in-memory database. Scheduled for removal in v5.0.
  org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean as of v4.3 in favor or using the `JobRepositoryFactoryBean` with an in-memory database. Scheduled for removal in v5.0.
  org.springframework.batch.core.repository.dao.MapStepExecutionDao as of v4.3 in favor of using the `JdbcStepExecutionDao` with an in-memory database. Scheduled for removal in v5.0.
  org.springframework.batch.integration.chunk.RemoteChunkingMasterStepBuilder Use `RemoteChunkingManagerStepBuilder` instead.
  org.springframework.batch.integration.chunk.RemoteChunkingMasterStepBuilderFactory Use `RemoteChunkingManagerStepBuilderFactory` instead.
  org.springframework.batch.integration.partition.RemotePartitioningMasterStepBuilder Use `RemotePartitioningManagerStepBuilder` instead.
  org.springframework.batch.integration.partition.RemotePartitioningMasterStepBuilderFactory Use `RemotePartitioningManagerStepBuilderFactory` instead
  org.springframework.batch.core.launch.support.ScheduledJobParametersFactory as of v4.3 in favor of `DefaultJobParametersConverter` and scheduled for removal in v5.0.
  org.springframework.batch.item.xml.StaxUtils in favor of `StaxUtils`
  org.springframework.batch.core.repository.dao.XStreamExecutionContextStringSerializer Due to the incompatibilities between current Jettison versions and XStream versions, this serializer is deprecated in favor of `Jackson2ExecutionContextStringSerializer`

- Deprecated Enums
  Enum and Description
  org.springframework.batch.item.file.transform.Alignment Use `FormatterLineAggregator.setFormat(java.lang.String)` for alignment (See examples in `FormatterLineAggregatorTests`)

- Deprecated Methods
  Method and Description
  org.springframework.batch.item.database.JdbcCursorItemReader.cleanupOnClose() This method is deprecated in favor of `JdbcCursorItemReader.cleanupOnClose(java.sql.Connection)` and will be removed in a future release
  org.springframework.batch.item.database.AbstractCursorItemReader.cleanupOnClose() This method is deprecated in favor of `AbstractCursorItemReader.cleanupOnClose(java.sql.Connection)` and will be removed in a future release
  org.springframework.batch.item.database.StoredProcedureItemReader.cleanupOnClose() This method is deprecated in favor of `StoredProcedureItemReader.cleanupOnClose(java.sql.Connection)` and will be removed in a future release
  org.springframework.batch.item.database.HibernateItemWriter.doWrite(HibernateOperations, List<? extends T>) As of 2.2 in favor of using Hibernate's session management APIs directly
  org.springframework.batch.item.file.MultiResourceItemReader.getCurrentResource() In favor of using `ResourceAware` instead.
  org.springframework.batch.core.JobParameters.getDouble(String, double) Use `JobParameters.getDouble(java.lang.String, java.lang.Double)` instead. This method will be removed in a future release.
  org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean.getJobRepository() use `AbstractJobRepositoryFactoryBean.getObject()` instead
  org.springframework.batch.core.JobParameters.getLong(String, long) Use `JobParameters.getLong(java.lang.String, java.lang.Long)` instead. This method will be removed in a future release.
  org.springframework.batch.core.partition.support.SimpleStepExecutionSplitter.getStartable(StepExecution, ExecutionContext) This method is deprecated in favor of `SimpleStepExecutionSplitter.isStartable(org.springframework.batch.core.StepExecution, org.springframework.batch.item.ExecutionContext)` and will be removed in a future version.
  org.springframework.batch.integration.config.annotation.BatchIntegrationConfiguration.remoteChunkingMasterStepBuilderFactory()
  org.springframework.batch.integration.config.annotation.BatchIntegrationConfiguration.remotePartitioningMasterStepBuilderFactory()
  org.springframework.batch.item.database.support.ListPreparedStatementSetter.setParameters(List<?>) In favor of the constructor
  org.springframework.batch.item.util.FileUtils.setUpOutputFile(File, boolean, boolean) use the version with explicit append parameter instead. Here append=false is assumed.
  org.springframework.batch.core.JobExecution.stop() Use `JobOperator.stop(long)` or `CommandLineJobRunner` with the "-stop" option instead.
  org.springframework.batch.item.database.builder.HibernatePagingItemReaderBuilder.useSatelessSession(boolean) This method is deprecated in favor of `HibernatePagingItemReaderBuilder.useStatelessSession(boolean)` and will be removed in a future version.

- Deprecated Constructors
  Constructor and Description
  org.springframework.batch.core.partition.support.SimpleStepExecutionSplitter(JobRepository, Step, Partitioner) use `SimpleStepExecutionSplitter(JobRepository, boolean, String, Partitioner)` instead