ソースを参照

jfinal 5.1.9 release ^_^

James 1 年間 前
コミット
2e350d4d06

+ 8 - 8
src/main/java/com/jfinal/plugin/activerecord/Db.java

@@ -34,7 +34,7 @@ import com.jfinal.kit.SyncWriteMap;
 public class Db {
 
 	private static DbPro MAIN = null;
-	private static final Map<String, DbPro> cache = new SyncWriteMap<String, DbPro>(32, 0.25F);
+	private static final Map<String, DbPro> cache = new SyncWriteMap<>(32, 0.25F);
 
 	/**
 	 * for DbKit.addConfig(configName)
@@ -76,7 +76,7 @@ public class Db {
 	}
 
 	/**
-	 * @see #query(String, String, Object...)
+	 * sql paras 查询,从 JDBC 原样取值且不封装到 Record 对象
 	 */
 	public static <T> List<T> query(String sql, Object... paras) {
 		return MAIN.query(sql, paras);
@@ -286,14 +286,14 @@ public class Db {
 	}
 
 	/**
-	 * @see #find(String, String, Object...)
+	 * sql paras 查询,数据封装到 Record 对象
 	 */
 	public static List<Record> find(String sql, Object... paras) {
 		return MAIN.find(sql, paras);
 	}
 
 	/**
-	 * @see #find(String, String, Object...)
+	 * @see #find(String, Object...)
 	 * @param sql the sql statement
 	 */
 	public static List<Record> find(String sql) {
@@ -455,7 +455,7 @@ public class Db {
 	}
 
 	/**
-	 * @see #paginate(String, int, int, String, String, Object...)
+	 * 分页
 	 */
 	public static Page<Record> paginate(int pageNumber, int pageSize, String select, String sqlExceptSelect) {
 		return MAIN.paginate(pageNumber, pageSize, select, sqlExceptSelect);
@@ -483,7 +483,7 @@ public class Db {
 	 * @param tableName the table name of the table
 	 * @param primaryKey the primary key of the table, composite primary key is separated by comma character: ","
 	 * @param record the record will be saved
-	 * @param true if save succeed otherwise false
+	 * @return true if save succeed otherwise false
 	 */
 	public static boolean save(String tableName, String primaryKey, Record record) {
 		return MAIN.save(tableName, primaryKey, record);
@@ -509,7 +509,7 @@ public class Db {
 	 * @param tableName the table name of the Record save to
 	 * @param primaryKey the primary key of the table, composite primary key is separated by comma character: ","
 	 * @param record the Record object
-	 * @param true if update succeed otherwise false
+	 * @return true if update succeed otherwise false
 	 */
 	public static boolean update(String tableName, String primaryKey, Record record) {
 		return MAIN.update(tableName, primaryKey, record);
@@ -528,7 +528,7 @@ public class Db {
 	}
 
 	/**
-	 * @see #execute(String, ICallback)
+	 * @see #execute(Config, ICallback)
 	 */
 	public static Object execute(ICallback callback) {
 		return MAIN.execute(callback);

+ 5 - 5
src/main/java/com/jfinal/plugin/activerecord/DbPro.java

@@ -93,7 +93,7 @@ public class DbPro {
 	}
 
 	/**
-	 * @see #query(String, String, Object...)
+	 * sql paras 查询,从 JDBC 原样取值且不封装到 Record 对象
 	 */
 	public <T> List<T> query(String sql, Object... paras) {
 		Connection conn = null;
@@ -389,7 +389,7 @@ public class DbPro {
 	}
 
 	/**
-	 * @see #find(String, String, Object...)
+	 * sql paras 查询,数据封装到 Record 对象
 	 */
 	public List<Record> find(String sql, Object... paras) {
 		Connection conn = null;
@@ -404,7 +404,7 @@ public class DbPro {
 	}
 
 	/**
-	 * @see #find(String, String, Object...)
+	 * @see #find(String, Object...)
 	 * @param sql the sql statement
 	 */
 	public List<Record> find(String sql) {
@@ -586,7 +586,7 @@ public class DbPro {
 	}
 
 	/**
-	 * @see #paginate(String, int, int, String, String, Object...)
+	 * 分页
 	 */
 	public Page<Record> paginate(int pageNumber, int pageSize, String select, String sqlExceptSelect) {
 		return doPaginate(pageNumber, pageSize, null, select, sqlExceptSelect, NULL_PARA_ARRAY);
@@ -793,7 +793,7 @@ public class DbPro {
 	}
 
 	/**
-	 * @see #execute(String, ICallback)
+	 * @see #execute(Config, ICallback)
 	 */
 	public Object execute(ICallback callback) {
 		return execute(config, callback);