public void validateFields(CFMetaData metadata) throws MarshalException { validateName(metadata); AbstractType<?> valueValidator = metadata.getValueValidator(name()); if (valueValidator != null) valueValidator.validateCellValue(value()); }
public Collection<Mutation> augment(ByteBuffer key, ColumnFamily update) { CFMetaData cfm = update.metadata(); String localKey = cfm.getKeyValidator().getString(key); logger.info("key={}.", localKey); for (Cell cell : update) { try { String name = cfm.comparator.getString(cell.name()); logger.info("name={}.", name); String value = cfm.getValueValidator(cell.name()).getString(cell.value()); logger.info("value={}.", value); } catch (Exception e) { logger.info("Exception={}.", e.getMessage()); } } return Collections.emptyList();
meta.getValueValidator(name.hasRemaining() ? comparator.cellFromByteBuffer(name) : meta.comparator.rowMarker(Composites.EMPTY)));
AbstractType<?> validator = cfMetaData.getValueValidator(cell.name()); serializedColumn.add(validator.getString(cell.value()));
public static void validateColumn(CFMetaData metadata, CellName name, ByteBuffer value) throws InvalidRequestException { validateColumnName(name); AbstractType<?> validator = metadata.getValueValidator(name); try { if (validator != null) validator.validate(value); } catch (MarshalException me) { throw new InvalidRequestException(String.format("Invalid column value for column (name=%s); %s", ByteBufferUtil.bytesToHex(name.toByteBuffer()), me.getMessage())); } }
try AbstractType<?> validator = metadata.getValueValidator(cn); if (validator != null) validator.validate(column.value);
AbstractType<?> valueValidator = table.metadata.getValueValidator(column.name()); if (valueValidator.isCollection()) { CollectionType validator = (CollectionType) valueValidator;
throw new InvalidRequestException("Mix of commutative and non-commutative operations is not allowed."); ByteBuffer colValue = op.a.getByteBuffer(metadata.getValueValidator(colName),variables);
ByteBuffer value = columnRelation.getValue().getByteBuffer(metadata.getValueValidator(metadata.comparator.cellFromByteBuffer(entity)), variables);
AbstractType<?> valueValidator = metadata.getValueValidator(name); try