Esempio n. 1
0
 @Override
 public Long getlv2Id(String id) {
   try {
     String sql = "select max(t.rights_id) from t_rights t where t.p_rights_id = " + id;
     //	String sql = " select * from (select ttt.rights_id from t_rights ttt where
     // ttt.p_rights_id = "+id+"  order by ttt.rights_id desc) where rownum <2 ";
     return Long.parseLong(dataBaseDaoHelper.getSingleResult(sql).toString());
   } catch (Exception e) {
     return Long.parseLong(id);
   }
 }
Esempio n. 2
0
 public Long uniqueChecklv3Name(String riName) {
   String sql = "select count(*) from t_rights trr where trr.rights_name = '" + riName + "'";
   return (Long) dataBaseDaoHelper.getSingleResult(sql);
 }