org.hibernate.query.Query.setInteger()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(273)

本文整理了Java中org.hibernate.query.Query.setInteger方法的一些代码示例,展示了Query.setInteger的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setInteger方法的具体详情如下:
包路径:org.hibernate.query.Query
类名称:Query
方法名:setInteger

Query.setInteger介绍

[英]Bind a positional int-valued parameter.
[中]绑定位置int值参数。

代码示例

代码示例来源:origin: com.atlassian.hibernate/hibernate.adapter

@Override
@SuppressWarnings("deprecation")
public Query setInteger(final String name, final int val) {
  if (queryV2ForCompare != null) {
    queryV2ForCompare.setInteger(name, val);
  }
  query.setInteger(name, val);
  return this;
}

代码示例来源:origin: com.atlassian.hibernate/hibernate.adapter

@Override
@SuppressWarnings("deprecation")
public Query setInteger(final int position, final int val) {
  if (queryV2ForCompare != null) {
    queryV2ForCompare.setInteger(position, val);
  }
  query.setInteger(adjustParameterPosition(position), val);
  return this;
}

代码示例来源:origin: OpenClinica/OpenClinica

public List<RepeatCount> findAllByEventCrfId(int eventCrfId) {
  String query = "from " + getDomainClassName() + " rc where rc.eventCrf.eventCrfId = :eventCrfId ";
  Query q = getCurrentSession().createQuery(query);
  q.setInteger("eventCrfId", eventCrfId);
  return (List<RepeatCount>) q.list();
}

代码示例来源:origin: OpenClinica/OpenClinica

public RepeatCount findByEventCrfIdAndRepeatName(int eventCrfId, String name) {
    String query = "from " + getDomainClassName() + " rc  where rc.eventCrf.eventCrfId = :eventCrfId  and rc.groupName = :name";
    Query q = getCurrentSession().createQuery(query);
    q.setInteger("eventCrfId", eventCrfId);
    q.setString("name", name);
    return (RepeatCount) q.uniqueResult();
  }
}

代码示例来源:origin: com.quhaodian/hibernate_common

hql2 += " and (" + tree.getTreeCondition() + ")";
session.createQuery(hql1).setInteger("myPosition", myPosition)
    .executeUpdate();
session.createQuery(hql2).setInteger("myPosition", myPosition)
    .executeUpdate();
session.setFlushMode(model);

代码示例来源:origin: com.quhaodian.discover/discover-hibernate-common

hql2 += " and (" + tree.getTreeCondition() + ")";
session.createQuery(hql1).setInteger("myPosition", myPosition)
  .executeUpdate();
session.createQuery(hql2).setInteger("myPosition", myPosition)
  .executeUpdate();
session.setFlushMode(model);

代码示例来源:origin: com.haoxuer.discover/discover-common-hibernate

hql2 += " and (" + tree.getTreeCondition() + ")";
session.createQuery(hql1).setInteger("myPosition", myPosition)
  .executeUpdate();
session.createQuery(hql2).setInteger("myPosition", myPosition)
  .executeUpdate();
session.setFlushMode(model);

代码示例来源:origin: com.quhaodian/hibernate_common

hql2 += " and (" + tree.getTreeCondition() + ")";
session.createQuery(hql1).setInteger("parentRgt", currParentRgt)
    .executeUpdate();
session.createQuery(hql2).setInteger("parentRgt", currParentRgt)
    .executeUpdate();
log.debug("vacated span hql: {}, {}, parentRgt={}", hql1, hql2, currParentRgt);

代码示例来源:origin: com.haoxuer.discover/discover-common-hibernate

hql2 += " and (" + tree.getTreeCondition() + ")";
session.createQuery(hql1).setInteger("parentRgt", currParentRgt)
  .executeUpdate();
session.createQuery(hql2).setInteger("parentRgt", currParentRgt)
  .executeUpdate();
log.debug("vacated span hql: {}, {}, parentRgt={}", hql1, hql2, currParentRgt);

代码示例来源:origin: com.quhaodian.discover/discover-hibernate-common

hql2 += " and (" + tree.getTreeCondition() + ")";
session.createQuery(hql1).setInteger("parentRgt", currParentRgt)
  .executeUpdate();
session.createQuery(hql2).setInteger("parentRgt", currParentRgt)
  .executeUpdate();
log.debug("vacated span hql: {}, {}, parentRgt={}", hql1, hql2, currParentRgt);

代码示例来源:origin: Evolveum/midpoint

query.setInteger("id", (int) id);

相关文章