Skip to content

Commit dd4cb0b

Browse files
authored
Merge pull request #981 from hazendaz/master
[docs] Remove legacy inheritDoc as @OVERRIDES does same thing
2 parents c0d7cc1 + be82761 commit dd4cb0b

15 files changed

+12
-229
lines changed

src/main/java/org/mybatis/spring/MyBatisExceptionTranslator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2023 the original author or authors.
2+
* Copyright 2010-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -74,9 +74,6 @@ public MyBatisExceptionTranslator(Supplier<SQLExceptionTranslator> exceptionTran
7474
}
7575
}
7676

77-
/**
78-
* {@inheritDoc}
79-
*/
8077
@Override
8178
public DataAccessException translateExceptionIfPossible(RuntimeException e) {
8279
if (e instanceof PersistenceException) {

src/main/java/org/mybatis/spring/SqlSessionFactoryBean.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2023 the original author or authors.
2+
* Copyright 2010-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -564,9 +564,6 @@ private <T> T[] appendArrays(T[] oldArrays, T[] newArrays, IntFunction<T[]> gene
564564
}
565565
}
566566

567-
/**
568-
* {@inheritDoc}
569-
*/
570567
@Override
571568
public void afterPropertiesSet() throws Exception {
572569
notNull(dataSource, "Property 'dataSource' is required");
@@ -711,9 +708,6 @@ protected SqlSessionFactory buildSqlSessionFactory() throws Exception {
711708
return this.sqlSessionFactoryBuilder.build(targetConfiguration);
712709
}
713710

714-
/**
715-
* {@inheritDoc}
716-
*/
717711
@Override
718712
public SqlSessionFactory getObject() throws Exception {
719713
if (this.sqlSessionFactory == null) {
@@ -723,25 +717,16 @@ public SqlSessionFactory getObject() throws Exception {
723717
return this.sqlSessionFactory;
724718
}
725719

726-
/**
727-
* {@inheritDoc}
728-
*/
729720
@Override
730721
public Class<? extends SqlSessionFactory> getObjectType() {
731722
return this.sqlSessionFactory == null ? SqlSessionFactory.class : this.sqlSessionFactory.getClass();
732723
}
733724

734-
/**
735-
* {@inheritDoc}
736-
*/
737725
@Override
738726
public boolean isSingleton() {
739727
return true;
740728
}
741729

742-
/**
743-
* {@inheritDoc}
744-
*/
745730
@Override
746731
public void onApplicationEvent(ContextRefreshedEvent event) {
747732
if (failFast) {

src/main/java/org/mybatis/spring/SqlSessionTemplate.java

Lines changed: 1 addition & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2022 the original author or authors.
2+
* Copyright 2010-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -144,243 +144,151 @@ public PersistenceExceptionTranslator getPersistenceExceptionTranslator() {
144144
return this.exceptionTranslator;
145145
}
146146

147-
/**
148-
* {@inheritDoc}
149-
*/
150147
@Override
151148
public <T> T selectOne(String statement) {
152149
return this.sqlSessionProxy.selectOne(statement);
153150
}
154151

155-
/**
156-
* {@inheritDoc}
157-
*/
158152
@Override
159153
public <T> T selectOne(String statement, Object parameter) {
160154
return this.sqlSessionProxy.selectOne(statement, parameter);
161155
}
162156

163-
/**
164-
* {@inheritDoc}
165-
*/
166157
@Override
167158
public <K, V> Map<K, V> selectMap(String statement, String mapKey) {
168159
return this.sqlSessionProxy.selectMap(statement, mapKey);
169160
}
170161

171-
/**
172-
* {@inheritDoc}
173-
*/
174162
@Override
175163
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey) {
176164
return this.sqlSessionProxy.selectMap(statement, parameter, mapKey);
177165
}
178166

179-
/**
180-
* {@inheritDoc}
181-
*/
182167
@Override
183168
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, RowBounds rowBounds) {
184169
return this.sqlSessionProxy.selectMap(statement, parameter, mapKey, rowBounds);
185170
}
186171

187-
/**
188-
* {@inheritDoc}
189-
*/
190172
@Override
191173
public <T> Cursor<T> selectCursor(String statement) {
192174
return this.sqlSessionProxy.selectCursor(statement);
193175
}
194176

195-
/**
196-
* {@inheritDoc}
197-
*/
198177
@Override
199178
public <T> Cursor<T> selectCursor(String statement, Object parameter) {
200179
return this.sqlSessionProxy.selectCursor(statement, parameter);
201180
}
202181

203-
/**
204-
* {@inheritDoc}
205-
*/
206182
@Override
207183
public <T> Cursor<T> selectCursor(String statement, Object parameter, RowBounds rowBounds) {
208184
return this.sqlSessionProxy.selectCursor(statement, parameter, rowBounds);
209185
}
210186

211-
/**
212-
* {@inheritDoc}
213-
*/
214187
@Override
215188
public <E> List<E> selectList(String statement) {
216189
return this.sqlSessionProxy.selectList(statement);
217190
}
218191

219-
/**
220-
* {@inheritDoc}
221-
*/
222192
@Override
223193
public <E> List<E> selectList(String statement, Object parameter) {
224194
return this.sqlSessionProxy.selectList(statement, parameter);
225195
}
226196

227-
/**
228-
* {@inheritDoc}
229-
*/
230197
@Override
231198
public <E> List<E> selectList(String statement, Object parameter, RowBounds rowBounds) {
232199
return this.sqlSessionProxy.selectList(statement, parameter, rowBounds);
233200
}
234201

235-
/**
236-
* {@inheritDoc}
237-
*/
238202
@Override
239203
public void select(String statement, ResultHandler handler) {
240204
this.sqlSessionProxy.select(statement, handler);
241205
}
242206

243-
/**
244-
* {@inheritDoc}
245-
*/
246207
@Override
247208
public void select(String statement, Object parameter, ResultHandler handler) {
248209
this.sqlSessionProxy.select(statement, parameter, handler);
249210
}
250211

251-
/**
252-
* {@inheritDoc}
253-
*/
254212
@Override
255213
public void select(String statement, Object parameter, RowBounds rowBounds, ResultHandler handler) {
256214
this.sqlSessionProxy.select(statement, parameter, rowBounds, handler);
257215
}
258216

259-
/**
260-
* {@inheritDoc}
261-
*/
262217
@Override
263218
public int insert(String statement) {
264219
return this.sqlSessionProxy.insert(statement);
265220
}
266221

267-
/**
268-
* {@inheritDoc}
269-
*/
270222
@Override
271223
public int insert(String statement, Object parameter) {
272224
return this.sqlSessionProxy.insert(statement, parameter);
273225
}
274226

275-
/**
276-
* {@inheritDoc}
277-
*/
278227
@Override
279228
public int update(String statement) {
280229
return this.sqlSessionProxy.update(statement);
281230
}
282231

283-
/**
284-
* {@inheritDoc}
285-
*/
286232
@Override
287233
public int update(String statement, Object parameter) {
288234
return this.sqlSessionProxy.update(statement, parameter);
289235
}
290236

291-
/**
292-
* {@inheritDoc}
293-
*/
294237
@Override
295238
public int delete(String statement) {
296239
return this.sqlSessionProxy.delete(statement);
297240
}
298241

299-
/**
300-
* {@inheritDoc}
301-
*/
302242
@Override
303243
public int delete(String statement, Object parameter) {
304244
return this.sqlSessionProxy.delete(statement, parameter);
305245
}
306246

307-
/**
308-
* {@inheritDoc}
309-
*/
310247
@Override
311248
public <T> T getMapper(Class<T> type) {
312249
return getConfiguration().getMapper(type, this);
313250
}
314251

315-
/**
316-
* {@inheritDoc}
317-
*/
318252
@Override
319253
public void commit() {
320254
throw new UnsupportedOperationException("Manual commit is not allowed over a Spring managed SqlSession");
321255
}
322256

323-
/**
324-
* {@inheritDoc}
325-
*/
326257
@Override
327258
public void commit(boolean force) {
328259
throw new UnsupportedOperationException("Manual commit is not allowed over a Spring managed SqlSession");
329260
}
330261

331-
/**
332-
* {@inheritDoc}
333-
*/
334262
@Override
335263
public void rollback() {
336264
throw new UnsupportedOperationException("Manual rollback is not allowed over a Spring managed SqlSession");
337265
}
338266

339-
/**
340-
* {@inheritDoc}
341-
*/
342267
@Override
343268
public void rollback(boolean force) {
344269
throw new UnsupportedOperationException("Manual rollback is not allowed over a Spring managed SqlSession");
345270
}
346271

347-
/**
348-
* {@inheritDoc}
349-
*/
350272
@Override
351273
public void close() {
352274
throw new UnsupportedOperationException("Manual close is not allowed over a Spring managed SqlSession");
353275
}
354276

355-
/**
356-
* {@inheritDoc}
357-
*/
358277
@Override
359278
public void clearCache() {
360279
this.sqlSessionProxy.clearCache();
361280
}
362281

363-
/**
364-
* {@inheritDoc}
365-
*/
366282
@Override
367283
public Configuration getConfiguration() {
368284
return this.sqlSessionFactory.getConfiguration();
369285
}
370286

371-
/**
372-
* {@inheritDoc}
373-
*/
374287
@Override
375288
public Connection getConnection() {
376289
return this.sqlSessionProxy.getConnection();
377290
}
378291

379-
/**
380-
* {@inheritDoc}
381-
*
382-
* @since 1.0.2
383-
*/
384292
@Override
385293
public List<BatchResult> flushStatements() {
386294
return this.sqlSessionProxy.flushStatements();

src/main/java/org/mybatis/spring/SqlSessionUtils.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2023 the original author or authors.
2+
* Copyright 2010-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -241,18 +241,12 @@ public SqlSessionSynchronization(SqlSessionHolder holder, SqlSessionFactory sess
241241
this.sessionFactory = sessionFactory;
242242
}
243243

244-
/**
245-
* {@inheritDoc}
246-
*/
247244
@Override
248245
public int getOrder() {
249246
// order right before any Connection synchronization
250247
return DataSourceUtils.CONNECTION_SYNCHRONIZATION_ORDER - 1;
251248
}
252249

253-
/**
254-
* {@inheritDoc}
255-
*/
256250
@Override
257251
public void suspend() {
258252
if (this.holderActive) {
@@ -261,9 +255,6 @@ public void suspend() {
261255
}
262256
}
263257

264-
/**
265-
* {@inheritDoc}
266-
*/
267258
@Override
268259
public void resume() {
269260
if (this.holderActive) {
@@ -272,9 +263,6 @@ public void resume() {
272263
}
273264
}
274265

275-
/**
276-
* {@inheritDoc}
277-
*/
278266
@Override
279267
public void beforeCommit(boolean readOnly) {
280268
// Connection commit or rollback will be handled by ConnectionSynchronization or
@@ -300,9 +288,6 @@ public void beforeCommit(boolean readOnly) {
300288
}
301289
}
302290

303-
/**
304-
* {@inheritDoc}
305-
*/
306291
@Override
307292
public void beforeCompletion() {
308293
// Issue #18 Close SqlSession and deregister it now
@@ -317,9 +302,6 @@ public void beforeCompletion() {
317302
}
318303
}
319304

320-
/**
321-
* {@inheritDoc}
322-
*/
323305
@Override
324306
public void afterCompletion(int status) {
325307
if (this.holderActive) {

0 commit comments

Comments
 (0)