Пример #1
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#queryList(int, java.lang.String, int, int)
  */
 public List<Issuedcommand> queryList(int con, String convalue, int page, int size) {
   String queryString = "from Issuedcommand mo where 1=1 ";
   Object[] p = null;
   if (con != 0 && convalue != null && !convalue.equals("")) {
     // 线路名称
     if (con == 1) {
       queryString += "and mo.name like ? ";
     }
     p = new Object[] {'%' + convalue + '%'};
   }
   //		queryString += " order by mo.id desc ";
   return issuedcommandDao.pageList(queryString, p, page, size);
 }
Пример #2
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#getTotalCount(int, java.lang.String)
  */
 public int getTotalCount(int con, String convalue) {
   String queryString = "select count(*) from Issuedcommand mo where 1=1 ";
   Object[] p = null;
   if (con != 0 && convalue != null && !convalue.equals("")) {
     // 线路名称
     if (con == 1) {
       queryString += "and mo.name like ? ";
     }
     p = new Object[] {'%' + convalue + '%'};
   }
   //		queryString += " order by mo.id desc ";
   return issuedcommandDao.getUniqueResult(queryString, p);
 }
Пример #3
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#loadById(int)
  */
 public Issuedcommand loadById(int id) {
   return issuedcommandDao.loadById(id);
 }
Пример #4
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#update(com.jlj.model.Issuedcommand)
  */
 public void update(Issuedcommand issuedcommand) {
   issuedcommandDao.update(issuedcommand);
 }
Пример #5
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#getIssuedcommands()
  */
 public List<Issuedcommand> getIssuedcommands() {
   return issuedcommandDao.getIssuedcommands();
 }
Пример #6
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#delete(com.jlj.model.Issuedcommand)
  */
 public void delete(Issuedcommand issuedcommand) {
   issuedcommandDao.delete(issuedcommand);
 }
Пример #7
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#deleteById(int)
  */
 public void deleteById(int id) {
   issuedcommandDao.deleteById(id);
 }
Пример #8
0
 public void deleteBySigid(int sigid) {
   String queryString = "delete from Issuedcommand mo where mo.sig.id=?";
   Object[] p = new Object[] {sigid};
   issuedcommandDao.updateIssuedcommandByhql(queryString, p);
 }
Пример #9
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#add(com.jlj.model.Issuedcommand)
  */
 public void add(Issuedcommand issuedcommand) throws Exception {
   issuedcommandDao.save(issuedcommand);
 }
Пример #10
0
 public Issuedcommand loadBySigidAndNumber(int sigid, int number) {
   String queryString = "from Issuedcommand mo where mo.sig.id=:sigid and mo.number=:number";
   String[] paramNames = new String[] {"sigid", "number"};
   Object[] values = new Object[] {sigid, number};
   return issuedcommandDao.queryByNamedParam(queryString, paramNames, values);
 }
Пример #11
0
 public void updateObjectById(String datastr, Integer id) {
   String queryString = "update Issuedcommand mo set mo.datas=:datastr where mo.id=:id ";
   String[] paramNames = new String[] {"datastr", "id"};
   Object[] values = new Object[] {datastr, id};
   issuedcommandDao.updateByHql(queryString, paramNames, values);
 }
Пример #12
0
 public Issuedcommand loadBySigid(Integer id) {
   String queryString = "from Issuedcommand mo where mo.sig.id = :id";
   String[] paramNames = new String[] {"id"};
   Object[] values = new Object[] {id};
   return issuedcommandDao.queryByNamedParam(queryString, paramNames, values);
 }
Пример #13
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#getAllIssuedcommands()
  */
 public List<Issuedcommand> getAllIssuedcommands() {
   return issuedcommandDao.queryList("from Issuedcommand ");
 }
Пример #14
0
 /* (non-Javadoc)
  * @see com.jlj.service.imp.IIssuedcommandService#queryIssuedcommandByIpAddress(java.lang.String)
  */
 public Issuedcommand queryIssuedcommandByIpAddress(String ipAddress) {
   String queryString = "from Issuedcommand mo where mo.ip = :ipAddress";
   String[] paramNames = new String[] {"ipAddress"};
   Object[] values = new Object[] {ipAddress};
   return issuedcommandDao.queryByNamedParam(queryString, paramNames, values);
 }