Skip to content

Commit 45613f8

Browse files
committed
简单调整代码样式。
1 parent 5665914 commit 45613f8

File tree

8 files changed

+41
-35
lines changed

8 files changed

+41
-35
lines changed

src/main/java/tk/mybatis/mapper/common/RowBoundsMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929

3030
/**
3131
* 通用Mapper接口,带RowBounds参数的查询
32-
*
32+
* <p/>
3333
* 配合分页插件PageHelper可以实现物理分页
34-
*
34+
* <p/>
3535
* PageHelper - http://git.oschina.net/free/Mybatis_PageHelper
3636
*
3737
* @param <T> 不能为空

src/main/java/tk/mybatis/mapper/common/base/insert/InsertSelectiveMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
/**
3131
* 通用Mapper接口,插入
32-
*
32+
*
3333
* @param <T> 不能为空
3434
* @author liuzh
3535
*/

src/main/java/tk/mybatis/mapper/common/sqlserver/InsertSelectiveMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
/**
3232
* 通用Mapper接口,插入
33-
*
33+
*
3434
* @param <T> 不能为空
3535
* @author liuzh
3636
*/

src/main/java/tk/mybatis/mapper/generator/MapperCommentGenerator.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public void addRootComment(XmlElement rootElement) {
6363
return;
6464
}
6565

66-
public void addConfigurationProperties(Properties properties) {}
66+
public void addConfigurationProperties(Properties properties) {
67+
}
6768

6869
/**
6970
* 删除标记
@@ -87,9 +88,11 @@ protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete)
8788
* @param innerClass
8889
* @param introspectedTable
8990
*/
90-
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {}
91+
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {
92+
}
9193

92-
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {}
94+
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {
95+
}
9396

9497
/**
9598
* 给字段添加数据库备注
@@ -121,8 +124,8 @@ public void addFieldComment(Field field, IntrospectedTable introspectedTable, In
121124
String column = introspectedColumn.getActualColumnName();
122125
if (StringUtility.stringContainsSpace(column) || introspectedTable.getTableConfiguration().isAllColumnDelimitingEnabled()) {
123126
column = introspectedColumn.getContext().getBeginningDelimiter()
124-
+ column
125-
+ introspectedColumn.getContext().getEndingDelimiter();
127+
+ column
128+
+ introspectedColumn.getContext().getEndingDelimiter();
126129
}
127130
if (!column.equals(introspectedColumn.getJavaProperty())) {
128131
//@Column
@@ -145,13 +148,15 @@ public void addFieldComment(Field field, IntrospectedTable introspectedTable, In
145148
* @param field
146149
* @param introspectedTable
147150
*/
148-
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {}
151+
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
152+
}
149153

150154
/**
151155
* @param method
152156
* @param introspectedTable
153157
*/
154-
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {}
158+
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {
159+
}
155160

156161
/**
157162
* getter方法注释
@@ -215,5 +220,6 @@ public void addSetterComment(Method method, IntrospectedTable introspectedTable,
215220
* @param introspectedTable
216221
* @param markAsDoNotDelete
217222
*/
218-
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete) {}
223+
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete) {
224+
}
219225
}

src/main/java/tk/mybatis/mapper/mapperhelper/MapperHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public boolean isExtendCommonMapper(Class<?> mapperInterface) {
232232

233233
/**
234234
* 重新设置SqlSource
235-
*
235+
* <p/>
236236
* 执行该方法前必须使用isMapperMethod判断,否则msIdCache会空
237237
*
238238
* @param ms

src/main/java/tk/mybatis/mapper/mapperhelper/MapperTemplate.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@ public Class<?> getEntityClass(MappedStatement ms) {
290290
/**
291291
* 根据对象生成主键映射
292292
*
293-
* @deprecated 4.x版本会移除该方法
294293
* @param ms
295294
* @return
295+
* @deprecated 4.x版本会移除该方法
296296
*/
297297
@Deprecated
298298
protected List<ParameterMapping> getPrimaryKeyParameterMappings(MappedStatement ms) {
@@ -339,9 +339,9 @@ protected String tableName(Class<?> entityClass) {
339339
/**
340340
* 获取表名 - 支持动态表名
341341
*
342-
* @deprecated 4.x版本会移除该方法
343342
* @param entityClass
344343
* @return
344+
* @deprecated 4.x版本会移除该方法
345345
*/
346346
@Deprecated
347347
protected SqlNode getDynamicTableNameNode(Class<?> entityClass) {
@@ -358,10 +358,10 @@ protected SqlNode getDynamicTableNameNode(Class<?> entityClass) {
358358
/**
359359
* 获取表名 - 支持动态表名,该方法用于多个入参时,通过parameterName指定入参中实体类的@Param的注解值
360360
*
361-
* @deprecated 4.x版本会移除该方法
362361
* @param entityClass
363362
* @param parameterName
364363
* @return
364+
* @deprecated 4.x版本会移除该方法
365365
*/
366366
@Deprecated
367367
protected SqlNode getDynamicTableNameNode(Class<?> entityClass, String parameterName) {
@@ -379,10 +379,10 @@ protected SqlNode getDynamicTableNameNode(Class<?> entityClass, String parameter
379379
* 返回if条件的sqlNode
380380
* <p>一般类型:<code>&lt;if test="property!=null"&gt;columnNode&lt;/if&gt;</code></p>
381381
*
382-
* @deprecated 4.x版本会移除该方法
383382
* @param column
384383
* @param columnNode
385384
* @return
385+
* @deprecated 4.x版本会移除该方法
386386
*/
387387
@Deprecated
388388
protected SqlNode getIfNotNull(EntityColumn column, SqlNode columnNode) {
@@ -393,11 +393,11 @@ protected SqlNode getIfNotNull(EntityColumn column, SqlNode columnNode) {
393393
* 返回if条件的sqlNode
394394
* <p>一般类型:<code>&lt;if test="property!=null"&gt;columnNode&lt;/if&gt;</code></p>
395395
*
396-
* @deprecated 4.x版本会移除该方法
397396
* @param column
398397
* @param columnNode
399398
* @param empty 是否包含!=''条件
400399
* @return
400+
* @deprecated 4.x版本会移除该方法
401401
*/
402402
@Deprecated
403403
protected SqlNode getIfNotNull(EntityColumn column, SqlNode columnNode, boolean empty) {
@@ -412,9 +412,9 @@ protected SqlNode getIfNotNull(EntityColumn column, SqlNode columnNode, boolean
412412
* 返回if条件的sqlNode
413413
* <p>一般类型:<code>&lt;if test="property==null"&gt;columnNode&lt;/if&gt;</code></p>
414414
*
415-
* @deprecated 4.x版本会移除该方法
416415
* @param column
417416
* @return
417+
* @deprecated 4.x版本会移除该方法
418418
*/
419419
@Deprecated
420420
protected SqlNode getIfIsNull(EntityColumn column, SqlNode columnNode) {
@@ -425,9 +425,9 @@ protected SqlNode getIfIsNull(EntityColumn column, SqlNode columnNode) {
425425
* 返回if条件的sqlNode
426426
* <p>一般类型:<code>&lt;if test="property!=null"&gt;columnNode&lt;/if&gt;</code></p>
427427
*
428-
* @deprecated 4.x版本会移除该方法
429428
* @param column
430429
* @return
430+
* @deprecated 4.x版本会移除该方法
431431
*/
432432
@Deprecated
433433
protected SqlNode getIfCacheNotNull(EntityColumn column, SqlNode columnNode) {
@@ -438,9 +438,9 @@ protected SqlNode getIfCacheNotNull(EntityColumn column, SqlNode columnNode) {
438438
* 返回if条件的sqlNode
439439
* <p>一般类型:<code>&lt;if test="property_cache!=null"&gt;columnNode&lt;/if&gt;</code></p>
440440
*
441-
* @deprecated 4.x版本会移除该方法
442441
* @param column
443442
* @return
443+
* @deprecated 4.x版本会移除该方法
444444
*/
445445
@Deprecated
446446
protected SqlNode getIfCacheIsNull(EntityColumn column, SqlNode columnNode) {
@@ -450,10 +450,10 @@ protected SqlNode getIfCacheIsNull(EntityColumn column, SqlNode columnNode) {
450450
/**
451451
* 获取 <code>[AND] column = #{property}</code>
452452
*
453-
* @deprecated 4.x版本会移除该方法
454453
* @param column
455454
* @param first
456455
* @return
456+
* @deprecated 4.x版本会移除该方法
457457
*/
458458
@Deprecated
459459
protected SqlNode getColumnEqualsProperty(EntityColumn column, boolean first) {
@@ -463,9 +463,9 @@ protected SqlNode getColumnEqualsProperty(EntityColumn column, boolean first) {
463463
/**
464464
* 获取所有列的where节点中的if判断列
465465
*
466-
* @deprecated 4.x版本会移除该方法
467466
* @param entityClass
468467
* @return
468+
* @deprecated 4.x版本会移除该方法
469469
*/
470470
@Deprecated
471471
protected SqlNode getAllIfColumnNode(Class<?> entityClass) {
@@ -484,9 +484,9 @@ protected SqlNode getAllIfColumnNode(Class<?> entityClass) {
484484
/**
485485
* 根据对象生成所有列的映射
486486
*
487-
* @deprecated 4.x版本会移除该方法
488487
* @param ms
489488
* @return
489+
* @deprecated 4.x版本会移除该方法
490490
*/
491491
@Deprecated
492492
protected List<ParameterMapping> getColumnParameterMappings(MappedStatement ms) {
@@ -613,9 +613,9 @@ public IfSqlNode ExampleValidSqlNode(Configuration configuration) {
613613
/**
614614
* Example查询中的where结构
615615
*
616-
* @deprecated 4.x版本会移除该方法
617616
* @param configuration
618617
* @return
618+
* @deprecated 4.x版本会移除该方法
619619
*/
620620
@Deprecated
621621
public WhereSqlNode exampleWhereClause(Configuration configuration) {
@@ -627,9 +627,9 @@ public WhereSqlNode exampleWhereClause(Configuration configuration) {
627627
/**
628628
* Example-Update中的where结构
629629
*
630-
* @deprecated 4.x版本会移除该方法
631630
* @param configuration
632631
* @return
632+
* @deprecated 4.x版本会移除该方法
633633
*/
634634
@Deprecated
635635
public WhereSqlNode updateByExampleWhereClause(Configuration configuration) {

src/main/java/tk/mybatis/mapper/util/OGNL.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ public abstract class OGNL {
1616
* @param parameter
1717
* @return
1818
*/
19-
public static boolean hasSelectColumns(Object parameter){
20-
if(parameter != null && parameter instanceof Example){
21-
Example example = (Example)parameter;
22-
if(example.getSelectColumns() != null && example.getSelectColumns().size() > 0){
19+
public static boolean hasSelectColumns(Object parameter) {
20+
if (parameter != null && parameter instanceof Example) {
21+
Example example = (Example) parameter;
22+
if (example.getSelectColumns() != null && example.getSelectColumns().size() > 0) {
2323
return true;
2424
}
2525
}
@@ -32,7 +32,7 @@ public static boolean hasSelectColumns(Object parameter){
3232
* @param parameter
3333
* @return
3434
*/
35-
public static boolean hasNoSelectColumns(Object parameter){
35+
public static boolean hasNoSelectColumns(Object parameter) {
3636
return !hasSelectColumns(parameter);
3737
}
3838

src/main/java/tk/mybatis/mapper/util/StringUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class StringUtil {
1616
* @param str
1717
* @return
1818
*/
19-
public static boolean isEmpty(String str){
19+
public static boolean isEmpty(String str) {
2020
return str == null || str.length() == 0;
2121
}
2222

@@ -26,7 +26,7 @@ public static boolean isEmpty(String str){
2626
* @param str
2727
* @return
2828
*/
29-
public static boolean isNotEmpty(String str){
29+
public static boolean isNotEmpty(String str) {
3030
return !isEmpty(str);
3131
}
3232

@@ -38,8 +38,8 @@ public static boolean isNotEmpty(String str){
3838
* @param style
3939
* @return
4040
*/
41-
public static String convertByStyle(String str, Style style){
42-
switch (style){
41+
public static String convertByStyle(String str, Style style) {
42+
switch (style) {
4343
case camelhump:
4444
return camelhumpToUnderline(str);
4545
case uppercase:

0 commit comments

Comments
 (0)