Skip to content

Commit 59efdb4

Browse files
committed
Improve IMapFactory and TableInfo
1 parent e3838d7 commit 59efdb4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/com/jfinal/plugin/activerecord/IMapFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import java.util.Map;
44

5+
@SuppressWarnings("rawtypes")
56
public interface IMapFactory {
6-
Map<String, Object> getAttrsMap();
7-
Map<String, Object> getColumnsMap();
7+
Map getAttrsMap();
8+
Map getColumnsMap();
89
}

src/com/jfinal/plugin/activerecord/Record.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
public class Record implements Serializable {
2929

3030
private static final long serialVersionUID = -3254070837297655225L;
31+
@SuppressWarnings("unchecked")
3132
private Map<String, Object> columns = DbKit.mapFactory.getColumnsMap(); // new HashMap<String, Object>();
3233

3334
/**

src/com/jfinal/plugin/activerecord/TableInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.jfinal.plugin.activerecord;
1818

19-
import java.util.HashMap;
2019
import java.util.Map;
2120
import com.jfinal.util.StringKit;
2221

@@ -27,7 +26,8 @@ public class TableInfo {
2726

2827
private String tableName;
2928
private String primaryKey;
30-
private Map<String, Class<?>> columnTypeMap = new HashMap<String, Class<?>>();
29+
@SuppressWarnings("unchecked")
30+
private Map<String, Class<?>> columnTypeMap = DbKit.mapFactory.getAttrsMap(); // new HashMap<String, Class<?>>();
3131

3232
public String getTableName() {
3333
return tableName;

0 commit comments

Comments
 (0)