Skip to content

Commit 2df427f

Browse files
committed
[javadocs] Fill in missing javadocs
All source javadocs generally needed but skipping missing constructor requirements at this time.
1 parent 92014e8 commit 2df427f

15 files changed

+231
-11
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/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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
*
3939
* @author Eduardo Macarron
4040
*
41+
* @param <T>
42+
* the generic type
43+
*
4144
* @since 1.1.0
4245
*/
4346
public class MyBatisPagingItemReader<T> extends AbstractPagingItemReader<T> {
@@ -52,6 +55,9 @@ public class MyBatisPagingItemReader<T> extends AbstractPagingItemReader<T> {
5255

5356
private Supplier<Map<String, Object>> parameterValuesSupplier;
5457

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

src/main/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilder.java

Lines changed: 4 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.
@@ -27,6 +27,9 @@
2727
*
2828
* @author Kazuki Shimizu
2929
*
30+
* @param <T>
31+
* the generic type
32+
*
3033
* @since 2.0.0
3134
*
3235
* @see MyBatisBatchItemWriter

0 commit comments

Comments
 (0)