@Override protected Restriction newINRestriction(CFMetaData cfm, VariableSpecifications boundNames) throws InvalidRequestException { ColumnDefinition columnDef = entity.prepare(cfm); List<? extends ColumnSpecification> receivers = toReceivers(columnDef); List<Term> terms = toTerms(receivers, inValues, cfm.ksName, boundNames); if (terms == null) { Term term = toTerm(receivers, value, cfm.ksName, boundNames); return new SingleColumnRestriction.InRestrictionWithMarker(columnDef, (Lists.Marker) term); } // An IN restrictions with only one element is the same than an EQ restriction if (terms.size() == 1) return new SingleColumnRestriction.EQRestriction(columnDef, terms.get(0)); return new SingleColumnRestriction.InRestrictionWithValues(columnDef, terms); }
@Override protected Restriction newINRestriction(CFMetaData cfm, VariableSpecifications boundNames) throws InvalidRequestException { ColumnDefinition columnDef = entity.prepare(cfm); List<? extends ColumnSpecification> receivers = toReceivers(columnDef); List<Term> terms = toTerms(receivers, inValues, cfm.ksName, boundNames); if (terms == null) { Term term = toTerm(receivers, value, cfm.ksName, boundNames); return new SingleColumnRestriction.InRestrictionWithMarker(columnDef, (Lists.Marker) term); } // An IN restrictions with only one element is the same than an EQ restriction if (terms.size() == 1) return new SingleColumnRestriction.EQRestriction(columnDef, terms.get(0)); return new SingleColumnRestriction.InRestrictionWithValues(columnDef, terms); }
@Override protected Restriction newINRestriction(CFMetaData cfm, VariableSpecifications boundNames) throws InvalidRequestException { ColumnDefinition columnDef = entity.prepare(cfm); List<? extends ColumnSpecification> receivers = toReceivers(columnDef); List<Term> terms = toTerms(receivers, inValues, cfm.ksName, boundNames); if (terms == null) { Term term = toTerm(receivers, value, cfm.ksName, boundNames); return new SingleColumnRestriction.InRestrictionWithMarker(columnDef, (Lists.Marker) term); } // An IN restrictions with only one element is the same than an EQ restriction if (terms.size() == 1) return new SingleColumnRestriction.EQRestriction(columnDef, terms.get(0)); return new SingleColumnRestriction.InRestrictionWithValues(columnDef, terms); }