Skip to content

Commit 25525ff

Browse files
committed
Fix code style/formatting
1 parent 8807794 commit 25525ff

File tree

2 files changed

+121
-133
lines changed

2 files changed

+121
-133
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/JdbcJobRepositoryFactoryBean.java

Lines changed: 114 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -46,105 +46,105 @@
4646
*/
4747
public class JdbcJobRepositoryFactoryBean extends JobRepositoryFactoryBean {
4848

49-
/**
50-
* @param type a value from the {@link java.sql.Types} class to indicate the type to
51-
* use for a CLOB
52-
*/
53-
public void setClobType(int type) {
54-
super.setClobType(type);
55-
}
56-
57-
/**
58-
* A custom implementation of the {@link ExecutionContextSerializer}. The default, if
59-
* not injected, is the {@link DefaultExecutionContextSerializer}.
60-
* @param serializer used to serialize/deserialize
61-
* {@link org.springframework.batch.item.ExecutionContext}
62-
* @see ExecutionContextSerializer
63-
*/
64-
public void setSerializer(ExecutionContextSerializer serializer) {
65-
super.setSerializer(serializer);
66-
}
67-
68-
/**
69-
* Public setter for the length of long string columns in database. Do not set this if
70-
* you haven't modified the schema. Note this value will be used for the exit message
71-
* in both {@link JdbcJobExecutionDao} and {@link JdbcStepExecutionDao} and also the
72-
* short version of the execution context in {@link JdbcExecutionContextDao} . If you
73-
* want to use separate values for exit message and short context, then use
74-
* {@link #setMaxVarCharLengthForExitMessage(int)} and
75-
* {@link #setMaxVarCharLengthForShortContext(int)}. For databases with multi-byte
76-
* character sets this number can be smaller (by up to a factor of 2 for 2-byte
77-
* characters) than the declaration of the column length in the DDL for the tables.
78-
* @param maxVarCharLength the exitMessageLength to set
79-
*/
80-
public void setMaxVarCharLength(int maxVarCharLength) {
81-
super.setMaxVarCharLength(maxVarCharLength);
82-
}
83-
84-
/**
85-
* Public setter for the length of short context string column in database. Do not set
86-
* this if you haven't modified the schema. For databases with multi-byte character
87-
* sets this number can be smaller (by up to a factor of 2 for 2-byte characters) than
88-
* the declaration of the column length in the DDL for the tables. Defaults to
89-
* {@link AbstractJdbcBatchMetadataDao#DEFAULT_SHORT_CONTEXT_LENGTH}
90-
* @param maxVarCharLengthForShortContext the short context length to set
91-
* @since 5.1
92-
*/
93-
public void setMaxVarCharLengthForShortContext(int maxVarCharLengthForShortContext) {
94-
super.setMaxVarCharLengthForShortContext(maxVarCharLengthForShortContext);
95-
}
96-
97-
/**
98-
* Public setter for the length of the exit message in both
99-
* {@link JdbcJobExecutionDao} and {@link JdbcStepExecutionDao}. Do not set this if
100-
* you haven't modified the schema. For databases with multi-byte character sets this
101-
* number can be smaller (by up to a factor of 2 for 2-byte characters) than the
102-
* declaration of the column length in the DDL for the tables. Defaults to
103-
* {@link AbstractJdbcBatchMetadataDao#DEFAULT_EXIT_MESSAGE_LENGTH}.
104-
* @param maxVarCharLengthForExitMessage the exitMessageLength to set
105-
* @since 5.1
106-
*/
107-
public void setMaxVarCharLengthForExitMessage(int maxVarCharLengthForExitMessage) {
108-
super.setMaxVarCharLengthForExitMessage(maxVarCharLengthForExitMessage);
109-
}
110-
111-
/**
112-
* Public setter for the {@link DataSource}.
113-
* @param dataSource a {@link DataSource}
114-
*/
115-
public void setDataSource(DataSource dataSource) {
116-
super.setDataSource(dataSource);
117-
}
118-
119-
/**
120-
* Public setter for the {@link JdbcOperations}. If this property is not set
121-
* explicitly, a new {@link JdbcTemplate} will be created for the configured
122-
* DataSource by default.
123-
* @param jdbcOperations a {@link JdbcOperations}
124-
*/
125-
public void setJdbcOperations(JdbcOperations jdbcOperations) {
126-
super.setJdbcOperations(jdbcOperations);
127-
}
128-
129-
/**
130-
* Sets the database type.
131-
* @param dbType as specified by {@link DefaultDataFieldMaxValueIncrementerFactory}
132-
*/
133-
public void setDatabaseType(String dbType) {
134-
super.setDatabaseType(dbType);
135-
}
136-
137-
/**
138-
* Sets the table prefix for all the batch meta-data tables.
139-
* @param tablePrefix prefix prepended to batch meta-data tables
140-
*/
141-
public void setTablePrefix(String tablePrefix) {
142-
super.setTablePrefix(tablePrefix);
143-
}
144-
145-
public void setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory) {
146-
super.setIncrementerFactory(incrementerFactory);
147-
}
49+
/**
50+
* @param type a value from the {@link java.sql.Types} class to indicate the type to
51+
* use for a CLOB
52+
*/
53+
public void setClobType(int type) {
54+
super.setClobType(type);
55+
}
56+
57+
/**
58+
* A custom implementation of the {@link ExecutionContextSerializer}. The default, if
59+
* not injected, is the {@link DefaultExecutionContextSerializer}.
60+
* @param serializer used to serialize/deserialize
61+
* {@link org.springframework.batch.item.ExecutionContext}
62+
* @see ExecutionContextSerializer
63+
*/
64+
public void setSerializer(ExecutionContextSerializer serializer) {
65+
super.setSerializer(serializer);
66+
}
67+
68+
/**
69+
* Public setter for the length of long string columns in database. Do not set this if
70+
* you haven't modified the schema. Note this value will be used for the exit message
71+
* in both {@link JdbcJobExecutionDao} and {@link JdbcStepExecutionDao} and also the
72+
* short version of the execution context in {@link JdbcExecutionContextDao} . If you
73+
* want to use separate values for exit message and short context, then use
74+
* {@link #setMaxVarCharLengthForExitMessage(int)} and
75+
* {@link #setMaxVarCharLengthForShortContext(int)}. For databases with multi-byte
76+
* character sets this number can be smaller (by up to a factor of 2 for 2-byte
77+
* characters) than the declaration of the column length in the DDL for the tables.
78+
* @param maxVarCharLength the exitMessageLength to set
79+
*/
80+
public void setMaxVarCharLength(int maxVarCharLength) {
81+
super.setMaxVarCharLength(maxVarCharLength);
82+
}
83+
84+
/**
85+
* Public setter for the length of short context string column in database. Do not set
86+
* this if you haven't modified the schema. For databases with multi-byte character
87+
* sets this number can be smaller (by up to a factor of 2 for 2-byte characters) than
88+
* the declaration of the column length in the DDL for the tables. Defaults to
89+
* {@link AbstractJdbcBatchMetadataDao#DEFAULT_SHORT_CONTEXT_LENGTH}
90+
* @param maxVarCharLengthForShortContext the short context length to set
91+
* @since 5.1
92+
*/
93+
public void setMaxVarCharLengthForShortContext(int maxVarCharLengthForShortContext) {
94+
super.setMaxVarCharLengthForShortContext(maxVarCharLengthForShortContext);
95+
}
96+
97+
/**
98+
* Public setter for the length of the exit message in both
99+
* {@link JdbcJobExecutionDao} and {@link JdbcStepExecutionDao}. Do not set this if
100+
* you haven't modified the schema. For databases with multi-byte character sets this
101+
* number can be smaller (by up to a factor of 2 for 2-byte characters) than the
102+
* declaration of the column length in the DDL for the tables. Defaults to
103+
* {@link AbstractJdbcBatchMetadataDao#DEFAULT_EXIT_MESSAGE_LENGTH}.
104+
* @param maxVarCharLengthForExitMessage the exitMessageLength to set
105+
* @since 5.1
106+
*/
107+
public void setMaxVarCharLengthForExitMessage(int maxVarCharLengthForExitMessage) {
108+
super.setMaxVarCharLengthForExitMessage(maxVarCharLengthForExitMessage);
109+
}
110+
111+
/**
112+
* Public setter for the {@link DataSource}.
113+
* @param dataSource a {@link DataSource}
114+
*/
115+
public void setDataSource(DataSource dataSource) {
116+
super.setDataSource(dataSource);
117+
}
118+
119+
/**
120+
* Public setter for the {@link JdbcOperations}. If this property is not set
121+
* explicitly, a new {@link JdbcTemplate} will be created for the configured
122+
* DataSource by default.
123+
* @param jdbcOperations a {@link JdbcOperations}
124+
*/
125+
public void setJdbcOperations(JdbcOperations jdbcOperations) {
126+
super.setJdbcOperations(jdbcOperations);
127+
}
128+
129+
/**
130+
* Sets the database type.
131+
* @param dbType as specified by {@link DefaultDataFieldMaxValueIncrementerFactory}
132+
*/
133+
public void setDatabaseType(String dbType) {
134+
super.setDatabaseType(dbType);
135+
}
136+
137+
/**
138+
* Sets the table prefix for all the batch meta-data tables.
139+
* @param tablePrefix prefix prepended to batch meta-data tables
140+
*/
141+
public void setTablePrefix(String tablePrefix) {
142+
super.setTablePrefix(tablePrefix);
143+
}
144+
145+
public void setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory) {
146+
super.setIncrementerFactory(incrementerFactory);
147+
}
148148

149149
/**
150150
* Set the {@link Charset} to use when serializing/deserializing the execution
@@ -157,18 +157,19 @@ public void setCharset(@NonNull Charset charset) {
157157
super.setCharset(charset);
158158
}
159159

160-
/**
161-
* Set the conversion service to use in the job repository. This service is used to
162-
* convert job parameters from String literal to typed values and vice versa.
163-
* @param conversionService the conversion service to use
164-
* @since 5.0
165-
*/
166-
public void setConversionService(@NonNull ConfigurableConversionService conversionService) {
167-
super.setConversionService(conversionService);
168-
}
169-
170-
@Override
171-
public void afterPropertiesSet() throws Exception {
172-
super.afterPropertiesSet();
173-
}
160+
/**
161+
* Set the conversion service to use in the job repository. This service is used to
162+
* convert job parameters from String literal to typed values and vice versa.
163+
* @param conversionService the conversion service to use
164+
* @since 5.0
165+
*/
166+
public void setConversionService(@NonNull ConfigurableConversionService conversionService) {
167+
super.setConversionService(conversionService);
168+
}
169+
170+
@Override
171+
public void afterPropertiesSet() throws Exception {
172+
super.afterPropertiesSet();
173+
}
174+
174175
}

spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/JobRepositoryFactoryBean.java

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,8 @@
1616

1717
package org.springframework.batch.core.repository.support;
1818

19-
import java.lang.reflect.Field;
20-
import java.nio.charset.Charset;
21-
import java.nio.charset.StandardCharsets;
22-
import java.sql.Types;
23-
24-
import javax.sql.DataSource;
25-
2619
import org.apache.commons.logging.Log;
2720
import org.apache.commons.logging.LogFactory;
28-
29-
import org.springframework.batch.core.DefaultJobKeyGenerator;
30-
import org.springframework.batch.core.JobKeyGenerator;
3121
import org.springframework.batch.core.converter.DateToStringConverter;
3222
import org.springframework.batch.core.converter.LocalDateTimeToStringConverter;
3323
import org.springframework.batch.core.converter.LocalDateToStringConverter;
@@ -37,16 +27,7 @@
3727
import org.springframework.batch.core.converter.StringToLocalDateTimeConverter;
3828
import org.springframework.batch.core.converter.StringToLocalTimeConverter;
3929
import org.springframework.batch.core.repository.ExecutionContextSerializer;
40-
import org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao;
41-
import org.springframework.batch.core.repository.dao.DefaultExecutionContextSerializer;
42-
import org.springframework.batch.core.repository.dao.ExecutionContextDao;
43-
import org.springframework.batch.core.repository.dao.JdbcExecutionContextDao;
44-
import org.springframework.batch.core.repository.dao.JdbcJobExecutionDao;
45-
import org.springframework.batch.core.repository.dao.JdbcJobInstanceDao;
46-
import org.springframework.batch.core.repository.dao.JdbcStepExecutionDao;
47-
import org.springframework.batch.core.repository.dao.JobExecutionDao;
48-
import org.springframework.batch.core.repository.dao.JobInstanceDao;
49-
import org.springframework.batch.core.repository.dao.StepExecutionDao;
30+
import org.springframework.batch.core.repository.dao.*;
5031
import org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory;
5132
import org.springframework.batch.item.database.support.DefaultDataFieldMaxValueIncrementerFactory;
5233
import org.springframework.batch.support.DatabaseType;
@@ -60,6 +41,12 @@
6041
import org.springframework.util.Assert;
6142
import org.springframework.util.StringUtils;
6243

44+
import javax.sql.DataSource;
45+
import java.lang.reflect.Field;
46+
import java.nio.charset.Charset;
47+
import java.nio.charset.StandardCharsets;
48+
import java.sql.Types;
49+
6350
import static org.springframework.batch.support.DatabaseType.SYBASE;
6451

6552
/**

0 commit comments

Comments
 (0)