use of com.blazebit.persistence.impl.SubqueryInternalBuilder in project blaze-persistence by Blazebit.
the class ToMultisetFunction method process.
@Override
public Object process(CharSequence result, List<Object> arguments) {
SubqueryExpression subqueryExpression = (SubqueryExpression) arguments.get(0);
Subquery subquery = subqueryExpression.getSubquery();
String[] fields;
if (subquery instanceof SubqueryInternalBuilder<?>) {
fields = createFields(((SubqueryInternalBuilder<?>) subquery).getSelectExpressions().size());
} else {
throw new IllegalArgumentException("Can't handle: " + subquery);
}
if (toJsonFunction == null) {
return toXmlFunction.process(result, fields);
} else {
return toJsonFunction.process(result, fields);
}
}
use of com.blazebit.persistence.impl.SubqueryInternalBuilder in project blaze-persistence by Blazebit.
the class BetweenBuilderImpl method andSubqery.
@Override
public SubqueryInitiator<T> andSubqery(String subqueryAlias, String expression) {
verifySubqueryBuilderEnded();
SubqueryBuilderListenerImpl<T> superExpressionSubqueryListener = new SuperExpressionSubqueryBuilderListener<T>(subqueryAlias, expressionFactory.createSimpleExpression(expression)) {
@Override
public void onBuilderEnded(SubqueryInternalBuilder<T> builder) {
super.onBuilderEnded(builder);
predicate = new BetweenPredicate(left, start, superExpression, negated);
listener.onBuilderEnded(BetweenBuilderImpl.this);
}
};
return startSubqueryInitiator(subqueryInitFactory.createSubqueryInitiator(result, superExpressionSubqueryListener, false, clauseType));
}
use of com.blazebit.persistence.impl.SubqueryInternalBuilder in project blaze-persistence by Blazebit.
the class BetweenBuilderImpl method andSubqery.
@Override
public SubqueryBuilder<T> andSubqery(String subqueryAlias, String expression, FullQueryBuilder<?, ?> criteriaBuilder) {
verifySubqueryBuilderEnded();
SubqueryBuilderListenerImpl<T> superExpressionSubqueryListener = new SuperExpressionSubqueryBuilderListener<T>(subqueryAlias, expressionFactory.createSimpleExpression(expression)) {
@Override
public void onBuilderEnded(SubqueryInternalBuilder<T> builder) {
super.onBuilderEnded(builder);
predicate = new BetweenPredicate(left, start, superExpression, negated);
listener.onBuilderEnded(BetweenBuilderImpl.this);
}
};
return startSubqueryBuilder(subqueryInitFactory.createSubqueryBuilder(result, superExpressionSubqueryListener, false, criteriaBuilder, clauseType));
}
Aggregations