}
public SingleFieldEntityFilter(EntitySchema entitySchema,
EntitySerDe<?> entitySerDe, String fieldName, Object filterValue,
CompareFilter.CompareOp equalityOperator) {
FieldMapping fieldMapping = entitySchema.getColumnMappingDescriptor()
.getFieldMapping(fieldName);
if (fieldMapping.getMappingType() != MappingType.COLUMN) {
throw new DatasetException(
"SingleColumnValueFilter only compatible with COLUMN mapping types.");
}
byte[] family = fieldMapping.getFamily();
byte[] qualifier = fieldMapping.getQualifier();
byte[] comparisonBytes = entitySerDe.serializeColumnValueToBytes(fieldName,
filterValue);
this.filter = new SingleColumnValueFilter(family, qualifier,
equalityOperator, comparisonBytes);