1717 * under the License.
1818 *
1919 * @Title: AbstractSession.java
20- * @Package sql.dhibernate.support
20+ * @Package openthinks.libs. sql.dhibernate.support
2121 * @Description: TODO
2222 * @author minjdai
2323 * @date 2013-12-2
@@ -75,12 +75,13 @@ protected void setAutoClose(Boolean autoClose) {
7575 }
7676
7777 /**
78- * @return
78+ * provider the {@link BaseDao}
79+ * @return BaseDao
7980 */
8081 public abstract BaseDao getBaseDao ();
8182
8283 /**
83- * @return the autoClose
84+ * @return Boolean if is autoClose
8485 */
8586 @ Override
8687 public Boolean isAutoClose () {
@@ -94,8 +95,7 @@ public <T> T load(Class<T> clz, Serializable id) {
9495 Checker .require (persistName ).notNull ();
9596 String persistIdName = ReflectEngine .getEntityID (clz );
9697 Checker .require (persistIdName ).notNull ();
97- String sql = "SELECT * FROM " + persistName + " WHERE " + persistIdName
98- + " = ?" ;
98+ String sql = "SELECT * FROM " + persistName + " WHERE " + persistIdName + " = ?" ;
9999 return get (clz , sql , new String [] { id .toString () });
100100 }
101101
@@ -165,8 +165,7 @@ public <T> T get(Class<T> clz, String sql, String[] params) {
165165 try {
166166 String columnName = rsmd .getColumnName (i );
167167 Object columnValue = rs .getObject (columnName );
168- ReflectEngine .propertyReflect (entity , columnName ,
169- columnValue );
168+ ReflectEngine .propertyReflect (entity , columnName , columnValue );
170169 } catch (Exception e ) {
171170 getBaseDao ().getLogger ().warn (e .getMessage ());
172171 continue ;
@@ -200,8 +199,7 @@ public <T extends Entity> T get(Entity entity, String sql, String[] params) {
200199 try {
201200 String columnName = rsmd .getColumnName (i );
202201 Object columnValue = rs .getObject (columnName );
203- ReflectEngine .propertyReflect (entity , columnName ,
204- columnValue );
202+ ReflectEngine .propertyReflect (entity , columnName , columnValue );
205203 // entity.set(columnName, columnValue);
206204 } catch (Exception e ) {
207205 getBaseDao ().getLogger ().warn (e .getMessage ());
@@ -229,15 +227,13 @@ public <T> List<T> list(Class<T> clz) {
229227 */
230228 @ Override
231229 public <T > T get (Class <T > clz , Condition condition ) {
232- return condition == null ? null : get (clz ,
233- Condition .getFullSql (condition ));
230+ return condition == null ? null : get (clz , Condition .getFullSql (condition ));
234231 }
235232
236233 @ SuppressWarnings ("unchecked" )
237234 @ Override
238235 public <T extends Entity > T get (Entity entity , Condition condition ) {
239- return (T ) (condition == null ? null : get (entity ,
240- Condition .getFullSql (condition )));
236+ return (T ) (condition == null ? null : get (entity , Condition .getFullSql (condition )));
241237 }
242238
243239 /**
0 commit comments