Skip to content

Commit ce39bf7

Browse files
authored
Merge pull request #1165 from hazendaz/master
Resolve source side javadoc concerns
2 parents e153031 + 2df427f commit ce39bf7

24 files changed

+256
-46
lines changed

src/main/java/org/mybatis/logging/Logger.java

Lines changed: 40 additions & 1 deletion
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-2025 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.
@@ -26,30 +26,69 @@
2626
*/
2727
public class Logger {
2828

29+
/** The log. */
2930
private final Log log;
3031

32+
/**
33+
* Instantiates a new logger.
34+
*
35+
* @param log
36+
* the log
37+
*/
3138
Logger(Log log) {
3239
this.log = log;
3340
}
3441

42+
/**
43+
* Error.
44+
*
45+
* @param s
46+
* the s
47+
* @param e
48+
* the e
49+
*/
3550
public void error(Supplier<String> s, Throwable e) {
3651
log.error(s.get(), e);
3752
}
3853

54+
/**
55+
* Error.
56+
*
57+
* @param s
58+
* the s
59+
*/
3960
public void error(Supplier<String> s) {
4061
log.error(s.get());
4162
}
4263

64+
/**
65+
* Warn.
66+
*
67+
* @param s
68+
* the s
69+
*/
4370
public void warn(Supplier<String> s) {
4471
log.warn(s.get());
4572
}
4673

74+
/**
75+
* Debug.
76+
*
77+
* @param s
78+
* the s
79+
*/
4780
public void debug(Supplier<String> s) {
4881
if (log.isDebugEnabled()) {
4982
log.debug(s.get());
5083
}
5184
}
5285

86+
/**
87+
* Trace.
88+
*
89+
* @param s
90+
* the s
91+
*/
5392
public void trace(Supplier<String> s) {
5493
if (log.isTraceEnabled()) {
5594
log.trace(s.get());

src/main/java/org/mybatis/logging/LoggerFactory.java

Lines changed: 20 additions & 1 deletion
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-2025 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.
@@ -24,14 +24,33 @@
2424
*/
2525
public class LoggerFactory {
2626

27+
/**
28+
* Instantiates a new logger factory.
29+
*/
2730
private LoggerFactory() {
2831
// NOP
2932
}
3033

34+
/**
35+
* Gets the logger.
36+
*
37+
* @param aClass
38+
* the a class
39+
*
40+
* @return the logger
41+
*/
3142
public static Logger getLogger(Class<?> aClass) {
3243
return new Logger(LogFactory.getLog(aClass));
3344
}
3445

46+
/**
47+
* Gets the logger.
48+
*
49+
* @param logger
50+
* the logger
51+
*
52+
* @return the logger
53+
*/
3554
public static Logger getLogger(String logger) {
3655
return new Logger(LogFactory.getLog(logger));
3756
}

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

Lines changed: 17 additions & 1 deletion
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-2025 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.
@@ -31,11 +31,27 @@ public class MyBatisSystemException extends UncategorizedDataAccessException {
3131

3232
private static final long serialVersionUID = -5284728621670758939L;
3333

34+
/**
35+
* Instantiates a new my batis system exception.
36+
*
37+
* @param cause
38+
* the cause
39+
*
40+
* @deprecated as of 3.0.4, use {@link #MyBatisSystemException(String, Throwable)} instead
41+
*/
3442
@Deprecated(since = "3.0.4", forRemoval = true)
3543
public MyBatisSystemException(Throwable cause) {
3644
this(cause.getMessage(), cause);
3745
}
3846

47+
/**
48+
* Instantiates a new my batis system exception.
49+
*
50+
* @param msg
51+
* the msg
52+
* @param cause
53+
* the cause
54+
*/
3955
public MyBatisSystemException(String msg, Throwable cause) {
4056
super(msg, cause);
4157
}

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

Lines changed: 16 additions & 1 deletion
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-2025 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.
@@ -59,14 +59,29 @@ public SqlSessionHolder(SqlSession sqlSession, ExecutorType executorType,
5959
this.exceptionTranslator = exceptionTranslator;
6060
}
6161

62+
/**
63+
* Gets the sql session.
64+
*
65+
* @return the sql session
66+
*/
6267
public SqlSession getSqlSession() {
6368
return sqlSession;
6469
}
6570

71+
/**
72+
* Gets the executor type.
73+
*
74+
* @return the executor type
75+
*/
6676
public ExecutorType getExecutorType() {
6777
return executorType;
6878
}
6979

80+
/**
81+
* Gets the persistence exception translator.
82+
*
83+
* @return the persistence exception translator
84+
*/
7085
public PersistenceExceptionTranslator getPersistenceExceptionTranslator() {
7186
return exceptionTranslator;
7287
}

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2024 the original author or authors.
2+
* Copyright 2010-2025 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.
@@ -132,14 +132,29 @@ public SqlSessionTemplate(SqlSessionFactory sqlSessionFactory, ExecutorType exec
132132
new Class[] { SqlSession.class }, new SqlSessionInterceptor());
133133
}
134134

135+
/**
136+
* Gets the sql session factory.
137+
*
138+
* @return the sql session factory
139+
*/
135140
public SqlSessionFactory getSqlSessionFactory() {
136141
return this.sqlSessionFactory;
137142
}
138143

144+
/**
145+
* Gets the executor type.
146+
*
147+
* @return the executor type
148+
*/
139149
public ExecutorType getExecutorType() {
140150
return this.executorType;
141151
}
142152

153+
/**
154+
* Gets the persistence exception translator.
155+
*
156+
* @return the persistence exception translator
157+
*/
143158
public PersistenceExceptionTranslator getPersistenceExceptionTranslator() {
144159
return this.exceptionTranslator;
145160
}

src/main/java/org/mybatis/spring/annotation/MapperScan.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2024 the original author or authors.
2+
* Copyright 2010-2025 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.
@@ -40,7 +40,6 @@
4040
* the class that declares this annotation.
4141
* <p>
4242
* Configuration example:
43-
* </p>
4443
*
4544
* <pre class="code">
4645
* &#064;Configuration
@@ -168,7 +167,6 @@
168167
* Whether enable lazy initialization of mapper bean.
169168
* <p>
170169
* Default is {@code false}.
171-
* </p>
172170
*
173171
* @return set {@code true} to enable lazy initialization
174172
*
@@ -180,7 +178,6 @@
180178
* Specifies the default scope of scanned mappers.
181179
* <p>
182180
* Default is {@code ""} (equiv to singleton).
183-
* </p>
184181
*
185182
* @return the default scope
186183
*/

src/main/java/org/mybatis/spring/annotation/MapperScans.java

Lines changed: 7 additions & 1 deletion
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-2025 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.
@@ -41,5 +41,11 @@
4141
@Documented
4242
@Import(MapperScannerRegistrar.RepeatingRegistrar.class)
4343
public @interface MapperScans {
44+
45+
/**
46+
* Value.
47+
*
48+
* @return the mapper scan[]
49+
*/
4450
MapperScan[] value();
4551
}

src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
*
4848
* @author Eduardo Macarron
4949
*
50+
* @param <T>
51+
* the generic type
52+
*
5053
* @since 1.1.0
5154
*/
5255
public class MyBatisBatchItemWriter<T> implements ItemWriter<T>, InitializingBean {

src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@
3232
import org.springframework.beans.factory.InitializingBean;
3333

3434
/**
35+
* {@code ItemReader} that uses MyBatis Cursor to read data.
36+
*
3537
* @author Guillaume Darmont / [email protected]
38+
*
39+
* @param <T>
40+
* the generic type
3641
*/
3742
public class MyBatisCursorItemReader<T> extends AbstractItemCountingItemStreamItemReader<T>
3843
implements InitializingBean {
@@ -48,6 +53,9 @@ public class MyBatisCursorItemReader<T> extends AbstractItemCountingItemStreamIt
4853
private Cursor<T> cursor;
4954
private Iterator<T> cursorIterator;
5055

56+
/**
57+
* Instantiates a new my batis cursor item reader.
58+
*/
5159
public MyBatisCursorItemReader() {
5260
setName(getShortName(MyBatisCursorItemReader.class));
5361
}

src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,16 @@
3131
import org.springframework.batch.infrastructure.item.database.AbstractPagingItemReader;
3232

3333
/**
34-
* {@code org.springframework.batch.item.ItemReader} for reading database records using MyBatis in a paging fashion.
34+
* {@code org.springframework.batch.infrastructure.item.ItemReader} for reading database records using MyBatis in a
35+
* paging fashion.
3536
* <p>
3637
* Provided to facilitate the migration from Spring-Batch iBATIS 2 page item readers to MyBatis 3.
3738
*
3839
* @author Eduardo Macarron
3940
*
41+
* @param <T>
42+
* the generic type
43+
*
4044
* @since 1.1.0
4145
*/
4246
public class MyBatisPagingItemReader<T> extends AbstractPagingItemReader<T> {
@@ -51,6 +55,9 @@ public class MyBatisPagingItemReader<T> extends AbstractPagingItemReader<T> {
5155

5256
private Supplier<Map<String, Object>> parameterValuesSupplier;
5357

58+
/**
59+
* Instantiates a new my batis paging item reader.
60+
*/
5461
public MyBatisPagingItemReader() {
5562
setName(getShortName(MyBatisPagingItemReader.class));
5663
}

0 commit comments

Comments
 (0)