예제 #1
0
 @Override
 public BooleanExpression exists() {
   if (queryMixin.getMetadata().getJoins().isEmpty()) {
     throw new IllegalArgumentException("No sources given");
   }
   return unique(queryMixin.getMetadata().getJoins().get(0).getTarget()).exists();
 }
예제 #2
0
 private QueryMetadata projection(Expression<?>... projection) {
   QueryMetadata metadata = queryMixin.getMetadata().clone();
   for (Expression<?> expr : projection) {
     metadata.addProjection(nullAsTemplate(expr));
   }
   return metadata;
 }
예제 #3
0
 private QueryMetadata projection(
     Expression<?> first, Expression<?> second, Expression<?>[] rest) {
   QueryMetadata metadata = queryMixin.getMetadata().clone();
   metadata.addProjection(nullAsTemplate(first));
   metadata.addProjection(nullAsTemplate(second));
   for (Expression<?> expr : rest) {
     metadata.addProjection(nullAsTemplate(expr));
   }
   return metadata;
 }