public boolean appliesTo(Row row) throws InvalidRequestException { UserType userType = (UserType) column.type; ByteBuffer rowValue; if (userType.isMultiCell()) { Iterator<Cell> iter = getCells(row, column); rowValue = iter.hasNext() ? userType.serializeForNativeProtocol(iter, protocolVersion) : null; } else { Cell cell = getCell(row, column); rowValue = cell == null ? null : cell.value(); } if (value == null) { if (operator == Operator.EQ) return rowValue == null; else if (operator == Operator.NEQ) return rowValue != null; else throw new InvalidRequestException(String.format("Invalid comparison with null for operator \"%s\"", operator)); } return compareWithOperator(operator, userType, value, rowValue); } }
public boolean appliesTo(Row row) throws InvalidRequestException { UserType userType = (UserType) column.type; ByteBuffer rowValue; if (userType.isMultiCell()) { Iterator<Cell> iter = getCells(row, column); rowValue = iter.hasNext() ? userType.serializeForNativeProtocol(iter, protocolVersion) : null; } else { Cell cell = getCell(row, column); rowValue = cell == null ? null : cell.value(); } if (value == null) { if (operator == Operator.EQ) return rowValue == null; else if (operator == Operator.NEQ) return rowValue != null; else throw new InvalidRequestException(String.format("Invalid comparison with null for operator \"%s\"", operator)); } return compareWithOperator(operator, userType, value, rowValue); } }
public boolean appliesTo(Row row) throws InvalidRequestException { UserType userType = (UserType) column.type; ByteBuffer rowValue; if (userType.isMultiCell()) { Iterator<Cell> iter = getCells(row, column); rowValue = iter.hasNext() ? userType.serializeForNativeProtocol(iter, protocolVersion) : null; } else { Cell cell = getCell(row, column); rowValue = cell == null ? null : cell.value(); } if (value == null) { if (operator == Operator.EQ) return rowValue == null; else if (operator == Operator.NEQ) return rowValue != null; else throw new InvalidRequestException(String.format("Invalid comparison with null for operator \"%s\"", operator)); } return compareWithOperator(operator, userType, value, rowValue); } }
public ColumnCondition.Bound bind(QueryOptions options) throws InvalidRequestException { boolean isInCondition = operator == Operator.IN; if (column.type instanceof CollectionType) { if (collectionElement != null) return isInCondition ? new ElementAccessInBound(this, options) : new ElementAccessBound(this, options); else return isInCondition ? new CollectionInBound(this, options) : new CollectionBound(this, options); } else if (column.type.isUDT()) { if (field != null) return isInCondition ? new UDTFieldAccessInBound(this, options) : new UDTFieldAccessBound(this, options); else return isInCondition ? new UDTInBound(this, options) : new UDTBound(this, options); } return isInCondition ? new SimpleInBound(this, options) : new SimpleBound(this, options); }
public ColumnCondition.Bound bind(QueryOptions options) throws InvalidRequestException { boolean isInCondition = operator == Operator.IN; if (column.type instanceof CollectionType) { if (collectionElement != null) return isInCondition ? new ElementAccessInBound(this, options) : new ElementAccessBound(this, options); else return isInCondition ? new CollectionInBound(this, options) : new CollectionBound(this, options); } else if (column.type.isUDT()) { if (field != null) return isInCondition ? new UDTFieldAccessInBound(this, options) : new UDTFieldAccessBound(this, options); else return isInCondition ? new UDTInBound(this, options) : new UDTBound(this, options); } return isInCondition ? new SimpleInBound(this, options) : new SimpleBound(this, options); }
public ColumnCondition.Bound bind(QueryOptions options) throws InvalidRequestException { boolean isInCondition = operator == Operator.IN; if (column.type instanceof CollectionType) { if (collectionElement != null) return isInCondition ? new ElementAccessInBound(this, options) : new ElementAccessBound(this, options); else return isInCondition ? new CollectionInBound(this, options) : new CollectionBound(this, options); } else if (column.type.isUDT()) { if (field != null) return isInCondition ? new UDTFieldAccessInBound(this, options) : new UDTFieldAccessBound(this, options); else return isInCondition ? new UDTInBound(this, options) : new UDTBound(this, options); } return isInCondition ? new SimpleInBound(this, options) : new SimpleBound(this, options); }