class JobExplorerFactoryBean extends AbstractJobExplorerFactoryBean implements InitializingBean {

	private DataSource dataSource;

	private JdbcOperations jdbcOperations;

	private String tablePrefix = AbstractJdbcBatchMetadataDao.DEFAULT_TABLE_PREFIX;

	private final DataFieldMaxValueIncrementer incrementer = new AbstractDataFieldMaxValueIncrementer() {
		@Override
		protected long getNextKey() {
			throw new IllegalStateException("JobExplorer is read only.");
		}
	};

	private JobKeyGenerator jobKeyGenerator;

	private LobHandler lobHandler;

	private ExecutionContextSerializer serializer;

	private Charset charset = StandardCharsets.UTF_8;

	private ConfigurableConversionService conversionService;

	/**
	 * A custom implementation of {@link ExecutionContextSerializer}. The default, if not
	 * injected, is the {@link DefaultExecutionContextSerializer}.
	 * @param serializer The serializer used to serialize or deserialize an
	 * {@link org.springframework.batch.item.ExecutionContext}.
	 * @see ExecutionContextSerializer
	 */
	public void setSerializer(ExecutionContextSerializer serializer) {
		this.serializer = serializer;
	}

	/**
	 * Sets the data source.
	 * <p>
	 * Public setter for the {@link DataSource}.
	 * @param dataSource A {@code DataSource}.
	 */
	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}

	/**
	 * Public setter for the {@link JdbcOperations}. If this property is not explicitly
	 * set, a new {@link JdbcTemplate} is created, by default, for the configured
	 * {@link DataSource}.
	 * @param jdbcOperations a {@link JdbcOperations}
	 */
	public void setJdbcOperations(JdbcOperations jdbcOperations) {
		this.jdbcOperations = jdbcOperations;
	}

	/**
	 * Sets the table prefix for all the batch metadata tables.
	 * @param tablePrefix The table prefix for the batch metadata tables.
	 */
	public void setTablePrefix(String tablePrefix) {
		this.tablePrefix = tablePrefix;
	}

	/**
	 * * Sets the generator for creating the key used in identifying unique {link
	 * JobInstance} objects
	 * @param jobKeyGenerator a {@link JobKeyGenerator}
	 * @since 5.1
	 */
	public void setJobKeyGenerator(JobKeyGenerator jobKeyGenerator) {
		this.jobKeyGenerator = jobKeyGenerator;
	}

	/**
	 * The lob handler to use when saving {@link ExecutionContext} instances. Defaults to
	 * {@code null}, which works for most databases.
	 * @param lobHandler Large object handler for saving an
	 * {@link org.springframework.batch.item.ExecutionContext}.
	 */
	public void setLobHandler(LobHandler lobHandler) {
		this.lobHandler = lobHandler;
	}

	/**
	 * Sets the {@link Charset} to use when deserializing the execution context. Defaults
	 * to "UTF-8". Must not be {@code null}.
	 * @param charset The character set to use when deserializing the execution context.
	 * @see JdbcExecutionContextDao#setCharset(Charset)
	 * @since 5.0
	 */
	public void setCharset(@NonNull Charset charset) {
		Assert.notNull(charset, "Charset must not be null");
		this.charset = charset;
	}

	/**
	 * Set the conversion service to use in the job explorer. This service is used to
	 * convert job parameters from String literal to typed values and vice versa.
	 * @param conversionService the conversion service to use
	 * @since 5.0
	 */
	public void setConversionService(@NonNull ConfigurableConversionService conversionService) {
		Assert.notNull(conversionService, "ConversionService must not be null");
		this.conversionService = conversionService;
	}

	@Override
	public void afterPropertiesSet() throws Exception {<FILL_FUNCTION_BODY>}

	@Override
	protected ExecutionContextDao createExecutionContextDao() throws Exception {
		JdbcExecutionContextDao dao = new JdbcExecutionContextDao();
		dao.setJdbcTemplate(jdbcOperations);
		dao.setLobHandler(lobHandler);
		dao.setTablePrefix(tablePrefix);
		dao.setSerializer(serializer);
		dao.setCharset(charset);
		dao.afterPropertiesSet();
		return dao;
	}

	@Override
	protected JobInstanceDao createJobInstanceDao() throws Exception {
		JdbcJobInstanceDao dao = new JdbcJobInstanceDao();
		dao.setJdbcTemplate(jdbcOperations);
		dao.setJobInstanceIncrementer(incrementer);
		dao.setJobKeyGenerator(jobKeyGenerator);
		dao.setTablePrefix(tablePrefix);
		dao.afterPropertiesSet();
		return dao;
	}

	@Override
	protected JobExecutionDao createJobExecutionDao() throws Exception {
		JdbcJobExecutionDao dao = new JdbcJobExecutionDao();
		dao.setJdbcTemplate(jdbcOperations);
		dao.setJobExecutionIncrementer(incrementer);
		dao.setTablePrefix(tablePrefix);
		dao.setConversionService(this.conversionService);
		dao.afterPropertiesSet();
		return dao;
	}

	@Override
	protected StepExecutionDao createStepExecutionDao() throws Exception {
		JdbcStepExecutionDao dao = new JdbcStepExecutionDao();
		dao.setJdbcTemplate(jdbcOperations);
		dao.setStepExecutionIncrementer(incrementer);
		dao.setTablePrefix(tablePrefix);
		dao.afterPropertiesSet();
		return dao;
	}

}


		Assert.state(dataSource != null, "DataSource must not be null.");

		if (jdbcOperations == null) {
			jdbcOperations = new JdbcTemplate(dataSource);
		}

		if (jobKeyGenerator == null) {
			jobKeyGenerator = new DefaultJobKeyGenerator();
		}

		if (serializer == null) {
			serializer = new DefaultExecutionContextSerializer();
		}

		if (this.conversionService == null) {
			DefaultConversionService conversionService = new DefaultConversionService();
			conversionService.addConverter(new DateToStringConverter());
			conversionService.addConverter(new StringToDateConverter());
			conversionService.addConverter(new LocalDateToStringConverter());
			conversionService.addConverter(new StringToLocalDateConverter());
			conversionService.addConverter(new LocalTimeToStringConverter());
			conversionService.addConverter(new StringToLocalTimeConverter());
			conversionService.addConverter(new LocalDateTimeToStringConverter());
			conversionService.addConverter(new StringToLocalDateTimeConverter());
			this.conversionService = conversionService;
		}

		super.afterPropertiesSet();
	
<methods>public non-sealed void <init>() ,public void afterPropertiesSet() throws java.lang.Exception,public org.springframework.batch.core.explore.JobExplorer getObject() throws java.lang.Exception,public Class<org.springframework.batch.core.explore.JobExplorer> getObjectType() ,public org.springframework.transaction.PlatformTransactionManager getTransactionManager() ,public boolean isSingleton() ,public void setTransactionAttributeSource(org.springframework.transaction.interceptor.TransactionAttributeSource) ,public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager) <variables>private static final java.lang.String TRANSACTION_ISOLATION_LEVEL_PREFIX,private static final java.lang.String TRANSACTION_PROPAGATION_PREFIX,private final org.springframework.aop.framework.ProxyFactory proxyFactory,private org.springframework.transaction.interceptor.TransactionAttributeSource transactionAttributeSource,private org.springframework.transaction.PlatformTransactionManager transactionManager