Esempio n. 1
0
 /**
  * 带多个参数的查找动作
  *
  * @param query HQL查找语句
  * @param paramValue 参数的值数组
  * @param s
  * @return
  * @throws E5Exception
  */
 public static List find(String sql, Object[] paramValue, Session s) throws E5Exception {
   try {
     BaseDAO dao = new BaseDAO();
     return dao.find(sql, paramValue, s);
   } catch (HibernateException e) {
     throw new E5Exception(e);
   }
 }
Esempio n. 2
0
 /**
  * 不带参数的查找动作
  *
  * @param sql
  * @param paramValue
  * @param paramType
  * @return
  * @throws E5Exception
  */
 public static List find(String sql) throws E5Exception {
   try {
     BaseDAO dao = new BaseDAO();
     return dao.find(sql);
   } catch (HibernateException e) {
     throw new E5Exception(e);
   }
 }
Esempio n. 3
0
 /**
  * 带多个参数的查找动作
  *
  * <p>从Hibernate2.0升级到Hibernate3.0时本方法被迫改动
  *
  * @param query HQL查找语句
  * @param paramName HQL语句中的参数名数组
  * @param paramValue 参数的值数组
  * @param paramType 参数的类型数组
  * @return
  * @throws E5Exception
  */
 public static List find(String sql, String[] paramName, Object[] paramValue, Type[] paramType)
     throws E5Exception {
   try {
     BaseDAO dao = new BaseDAO();
     return dao.find(sql, paramName, paramValue, paramType);
   } catch (HibernateException e) {
     throw new E5Exception(e);
   }
 }