Package org.hibernate

Examples of org.hibernate.Query.executeUpdate()


   */
  static int incTrackBackCount(Session ssn, int log_id, int incCount){
    Query q = ssn.getNamedQuery("INC_DIARY_TB_COUNT");
    q.setInteger(0, incCount);
    q.setInteger(1, log_id);
    return q.executeUpdate();
  }

  /* (non-Javadoc)
   * @see com.liusoft.dlog4j.search.SearchDataProvider#fetchAfter(java.util.Date)
   */
 
View Full Code Here


          id = Integer.parseInt(s_id);
        }catch(Exception e){}
        q.setInteger(i+1, id);
      }
      q.setInteger(i+1, -1);
      int er = q.executeUpdate();
      commit();
      return er;
    }catch(HibernateException e){
      rollback();
      throw e;
View Full Code Here

          id = Integer.parseInt(s_id);
        }catch(Exception e){}
        q.setInteger(i+1, id);
      }
      q.setInteger(i+1, -1);
      int er = q.executeUpdate();
      commit();
      return er;
    }catch(HibernateException e){
      rollback();
      throw e;
View Full Code Here

          id = Integer.parseInt(s_id);
        }catch(Exception e){}
        q.setInteger(i+1, id);
      }
      q.setInteger(i+1, -1);
      int er = q.executeUpdate();
      commit();
      return er;
    }catch(HibernateException e){
      rollback();
      throw e;
View Full Code Here

      q.setInteger("online_status", UserBean.STATUS_OFFLINE);
      if(manual_logout)
        q.setInteger("keep_day", 0);
      q.setInteger("user_id", userid);
      q.setTimestamp("last_time", lastLogin);
      int er = q.executeUpdate();
      commit();
      return er;
    }catch(HibernateException e){
      rollback();
      throw e;
View Full Code Here

    Session ssn = getSession();
    Query q = ssn.createQuery(hql);
    for(int i=0;args!=null&&i<args.length;i++){
      q.setParameter(i, args[i]);
    }
    return q.executeUpdate();
  }
 
  protected static int executeUpdate(String hql, int parm1){
    return executeUpdate(hql, new Object[]{new Integer(parm1)});
  }
View Full Code Here

      beginTransaction();
      Query q = ssn.createQuery(hql);
      for(int i=0;args!=null&&i<args.length;i++){
        q.setParameter(i, args[i]);
      }
      int er = q.executeUpdate();
      commit();
      return er;
    }catch(HibernateException e){
      rollback();
      throw e;
View Full Code Here

    Session ssn = getSession();
    Query q = ssn.getNamedQuery(hql);
    for(int i=0;args!=null&&i<args.length;i++){
      q.setParameter(i, args[i]);
    }
    return q.executeUpdate();
  }

  protected static int executeNamedUpdate(String hql, int parm1){
    return executeNamedUpdate(hql, new Object[]{new Integer(parm1)});
  }
View Full Code Here

      beginTransaction();
      Query q = ssn.getNamedQuery(hql);
      for(int i=0;args!=null&&i<args.length;i++){
        q.setParameter(i, args[i]);
      }
      int er = q.executeUpdate();
      commit();
      return er;
    }catch(HibernateException e){
      rollback();
      throw e;
View Full Code Here

      update_q.setInteger(0, uvCount);
      update_q.setInteger(1, statDate);
      update_q.setInteger(2, source);
      if(siteid>0)
        update_q.setInteger(3, siteid);
      if(update_q.executeUpdate()<1){
        SiteStatBean ssb = new SiteStatBean();
        ssb.setSiteId(siteid);
        ssb.setUvCount(uvCount);
        ssb.setUpdateTime(new Date());
        ssb.setSource(source);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.