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 boolean appliesTo(Row row) throws InvalidRequestException { UserType userType = (UserType) column.type; int fieldPosition = userType.fieldPosition(field); assert fieldPosition >= 0; ByteBuffer cellValue; if (column.type.isMultiCell()) { Cell cell = getCell(row, column, userType.cellPathForField(field)); cellValue = cell == null ? null : cell.value(); } else { Cell cell = getCell(row, column); cellValue = cell == null ? null : userType.split(getCell(row, column).value())[fieldPosition]; } AbstractType<?> valueType = userType.fieldType(fieldPosition); for (ByteBuffer value : inValues) { if (compareWithOperator(Operator.EQ, valueType, value, cellValue)) return true; } return false; } }
public boolean appliesTo(Row row) throws InvalidRequestException { UserType userType = (UserType) column.type; int fieldPosition = userType.fieldPosition(field); assert fieldPosition >= 0; ByteBuffer cellValue; if (column.type.isMultiCell()) { Cell cell = getCell(row, column, userType.cellPathForField(field)); cellValue = cell == null ? null : cell.value(); } else { Cell cell = getCell(row, column); cellValue = cell == null ? null : userType.split(getCell(row, column).value())[fieldPosition]; } AbstractType<?> valueType = userType.fieldType(fieldPosition); for (ByteBuffer value : inValues) { if (compareWithOperator(Operator.EQ, valueType, value, cellValue)) return true; } return false; } }
public boolean appliesTo(Row row) throws InvalidRequestException { UserType userType = (UserType) column.type; int fieldPosition = userType.fieldPosition(field); assert fieldPosition >= 0; ByteBuffer cellValue; if (column.type.isMultiCell()) { Cell cell = getCell(row, column, userType.cellPathForField(field)); cellValue = cell == null ? null : cell.value(); } else { Cell cell = getCell(row, column); cellValue = cell == null ? null : userType.split(getCell(row, column).value())[fieldPosition]; } AbstractType<?> valueType = userType.fieldType(fieldPosition); for (ByteBuffer value : inValues) { if (compareWithOperator(Operator.EQ, valueType, value, cellValue)) return true; } return false; } }
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); }