Ejemplo n.º 1
0
 public boolean deleteTerm(Long id) {
   QueryRunner runner = DBUtilsHelper.getRunner();
   ;
   try {
     runner.update(DETELE_TERM_SQL, id);
   } catch (SQLException e) {
     logger.error(e + "");
   }
   return true;
 }
Ejemplo n.º 2
0
 public boolean updateTerm(Term term) {
   QueryRunner runner = DBUtilsHelper.getRunner();
   ;
   try {
     runner.update(UPDATE_TERM_SQL, term.getName(), term.getId());
   } catch (SQLException e) {
     logger.error(e + "");
   }
   return true;
 }
Ejemplo n.º 3
0
 public Term getTerm(long id) {
   QueryRunner runner = DBUtilsHelper.getRunner();
   ;
   ResultSetHandler<Term> resultSetHandler = new BeanHandler<Term>(Term.class);
   try {
     return runner.query(GET_TERM_SQL, resultSetHandler, id);
   } catch (SQLException e) {
     logger.error(e + "");
   }
   return null;
 }
Ejemplo n.º 4
0
 public Term getTerm(String name) {
   QueryRunner runner = DBUtilsHelper.getRunner();
   ;
   ResultSetHandler<Term> resultSetHandler = new BeanHandler<Term>(Term.class);
   try {
     return runner.query(SQL_GET_TERM_BY_NAME, resultSetHandler, name);
   } catch (SQLException e) {
     logger.error(e + "");
   }
   return null;
 }
Ejemplo n.º 5
0
 public List<Term> getTerms() {
   QueryRunner runner = DBUtilsHelper.getRunner();
   ;
   ResultSetHandler<List<Term>> resultSetHandler = new BeanListHandler<Term>(Term.class);
   try {
     return runner.query(GET_ALL_TERM_SQL, resultSetHandler);
   } catch (SQLException e) {
     logger.error(e + "");
   }
   return null;
 }