use of org.apache.cassandra.db.marshal.AbstractType in project brisk by riptano.
the class CassandraStorage method getValidatorMap.
private Map<ByteBuffer, AbstractType> getValidatorMap(CfDef cfDef) throws IOException {
Map<ByteBuffer, AbstractType> validators = new HashMap<ByteBuffer, AbstractType>();
for (ColumnDef cd : cfDef.column_metadata) {
if (cd.getValidation_class() != null && !cd.getValidation_class().isEmpty()) {
AbstractType validator = null;
try {
validator = TypeParser.parse(cd.getValidation_class());
validators.put(cd.name, validator);
} catch (ConfigurationException e) {
throw new IOException(e);
}
}
}
return validators;
}
Aggregations