javax.persistence.criteria.CriteriaQuery.getGroupRestriction()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(183)

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

CriteriaQuery.getGroupRestriction介绍

暂无

代码示例

代码示例来源:origin: com.walterjwhite.infrastructure.datastore.modules/google-guice-persist-criteria-builder

/** Use ES here, it would be more efficient. */
 public void search() {
  //    criteriaBuilder.equal()
  CriteriaQuery<Long> criteriaQuery = null;
  criteriaQuery.getParameters();
  criteriaQuery.getGroupList();
  criteriaQuery.getOrderList();
  criteriaQuery.getGroupRestriction();
  criteriaQuery.getRestriction();
  criteriaQuery.getSelection();

  final Predicate predicate = null;
 }
}

代码示例来源:origin: org.jboss.pressgang.ccms/pressgang-ccms-query

/**
 * Copy Criteria without Selection
 *
 * @param from source Criteria
 * @param to   destination Criteria
 */
public static void copyCriteriaNoSelection(CriteriaQuery<?> from, CriteriaQuery<?> to) {
  // Copy Roots
  for (Root<?> root : from.getRoots()) {
    Root<?> dest = to.from(root.getJavaType());
    dest.alias(getOrCreateAlias(root));
    copyJoins(root, dest);
  }
  if (from.getGroupList() != null) to.groupBy(from.getGroupList());
  to.distinct(from.isDistinct());
  if (from.getGroupRestriction() != null) to.having(from.getGroupRestriction());
  if (from.getRestriction() != null) to.where(from.getRestriction());
  if (from.getOrderList() != null) to.orderBy(from.getOrderList());
}

相关文章