@Override public boolean referencesDuration() { // Maps cannot be created with duration as keys return getValuesType().referencesDuration(); }
@Override public boolean referencesDuration() { return getElementsType().referencesDuration(); }
@Override public boolean referencesDuration() { return fieldTypes().stream().anyMatch(f -> f.referencesDuration()); }
@Override public boolean referencesDuration() { return allTypes().stream().anyMatch(f -> f.referencesDuration()); }
@Override public boolean referencesDuration() { return getElementsType().referencesDuration(); }
@Override public boolean referencesDuration() { return allTypes().stream().anyMatch(f -> f.referencesDuration()); }
@Override public boolean referencesDuration() { // Maps cannot be created with duration as keys return getValuesType().referencesDuration(); }
@Override public boolean referencesDuration() { return fieldTypes().stream().anyMatch(f -> f.referencesDuration()); }
@Override public boolean referencesDuration() { // Maps cannot be created with duration as keys return getValuesType().referencesDuration(); }
@Override public boolean referencesDuration() { return fieldTypes().stream().anyMatch(f -> f.referencesDuration()); }
@Override public boolean referencesDuration() { return allTypes().stream().anyMatch(f -> f.referencesDuration()); }
@Override public boolean referencesDuration() { return getElementsType().referencesDuration(); }
@Override public boolean referencesDuration() { // Maps cannot be created with duration as keys return getValuesType().referencesDuration(); }
@Override public boolean referencesDuration() { return allTypes().stream().anyMatch(f -> f.referencesDuration()); }
@Override public boolean referencesDuration() { return getElementsType().referencesDuration(); }
@Override public boolean referencesDuration() { return fieldTypes().stream().anyMatch(f -> f.referencesDuration()); }
private void validateOperationOnDurations(AbstractType<?> type) { if (type.referencesDuration() && operator.isSlice()) { checkFalse(type.isCollection(), "Slice conditions are not supported on collections containing durations"); checkFalse(type.isTuple(), "Slice conditions are not supported on tuples containing durations"); checkFalse(type.isUDT(), "Slice conditions are not supported on UDTs containing durations"); throw invalidRequest("Slice conditions are not supported on durations", operator); } } }
private void validateOperationOnDurations(AbstractType<?> type) { if (type.referencesDuration() && operator.isSlice()) { checkFalse(type.isCollection(), "Slice conditions are not supported on collections containing durations"); checkFalse(type.isTuple(), "Slice conditions are not supported on tuples containing durations"); checkFalse(type.isUDT(), "Slice conditions are not supported on UDTs containing durations"); throw invalidRequest("Slice conditions are not supported on durations", operator); } } }
private void validateOperationOnDurations(AbstractType<?> type) { if (type.referencesDuration() && operator.isSlice()) { checkFalse(type.isCollection(), "Slice conditions are not supported on collections containing durations"); checkFalse(type.isTuple(), "Slice conditions are not supported on tuples containing durations"); checkFalse(type.isUDT(), "Slice conditions are not supported on UDTs containing durations"); throw invalidRequest("Slice conditions are not supported on durations", operator); } } }
@Override protected Restriction newSliceRestriction(CFMetaData cfm, VariableSpecifications boundNames, Bound bound, boolean inclusive) throws InvalidRequestException { ColumnDefinition columnDef = entity.prepare(cfm); if (columnDef.type.referencesDuration()) { checkFalse(columnDef.type.isCollection(), "Slice restrictions are not supported on collections containing durations"); checkFalse(columnDef.type.isTuple(), "Slice restrictions are not supported on tuples containing durations"); checkFalse(columnDef.type.isUDT(), "Slice restrictions are not supported on UDTs containing durations"); throw invalidRequest("Slice restrictions are not supported on duration columns"); } Term term = toTerm(toReceivers(columnDef), value, cfm.ksName, boundNames); return new SingleColumnRestriction.SliceRestriction(columnDef, bound, inclusive, term); }