本文整理了Java中javax.persistence.criteria.Subquery.having()
方法的一些代码示例,展示了Subquery.having()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Subquery.having()
方法的具体详情如下:
包路径:javax.persistence.criteria.Subquery
类名称:Subquery
方法名:having
[英]Specify a restriction over the groups of the subquery. Replaces the previous having restriction(s), if any. This method only overrides the return type of the corresponding AbstractQuery
method.
[中]指定对子查询的组的限制。替换之前的限制(如果有)。此方法仅覆盖相应AbstractQuery
方法的返回类型。
代码示例来源:origin: SAP/olingo-jpa-processor-v4
protected void handleAggregation(final Subquery<?> subQuery, final From<?, ?> subRoot,
final List<JPAOnConditionItem> conditionItems) throws ODataApplicationException {
final List<Expression<?>> groupByLIst = new ArrayList<>();
if (filterComplier != null && this.aggregationType != null) {
for (final JPAOnConditionItem onItem : conditionItems) {
Path<?> subPath = subRoot;
for (final JPAElement jpaPathElement : onItem.getRightPath().getPath())
subPath = subPath.get(jpaPathElement.getInternalName());
groupByLIst.add(subPath);
}
subQuery.groupBy(groupByLIst);
try {
subQuery.having(this.filterComplier.compile());
} catch (ExpressionVisitException e) {
throw new ODataJPAQueryException(e, HttpStatusCode.INTERNAL_SERVER_ERROR);
}
}
}
代码示例来源:origin: picketlink/picketlink
subQueryOwnerAttributesByValue.groupBy(selection).having(cb.equal(cb.count(selection), valuesLength));
代码示例来源:origin: picketlink/picketlink
subQueryOwnerAttributesByValue.groupBy(selection).having(cb.equal(cb.count(selection), valuesLength));
代码示例来源:origin: org.picketlink/picketlink-idm-impl
subquery.groupBy(subquery.getSelection()).having(
criteria.getBuilder().equal(criteria.getBuilder().count(subquery.getSelection()), parameterValues.length));
内容来源于网络,如有侵权,请联系作者删除!