コード例 #1
0
    @Override
    public QueryCriteria visit(InQueryCriteria criteria, Void arg) {
      Set<AttributeReference> combinedAttRefs =
          combineAttributeReferences(criteria.getAttributeReference());
      if (combinedAttRefs.size() == 1) {
        return criteria;
      }

      DisjunctionBuilder disjunctionBuilder = new DisjunctionBuilder();
      for (AttributeReference combinedAttRef : combinedAttRefs) {
        disjunctionBuilder.add(new InQueryCriteria(combinedAttRef, criteria.getValue()));
      }

      return disjunctionBuilder.build();
    }
コード例 #2
0
 @Override
 public QueryCriteria visit(InQueryCriteria criteria, List<AttributeReference.Key> arg) {
   return new InQueryCriteria(new AttributeReference(arg), criteria.getValue());
 }