Example #1
0
 static ColumnMetadata build(TableMetadata tm, Row row) {
   try {
     String name = row.getString(COLUMN_NAME);
     AbstractType<?> t = TypeParser.parse(row.getString(VALIDATOR));
     ColumnMetadata cm = new ColumnMetadata(tm, name, Codec.rawTypeToDataType(t), row);
     tm.add(cm);
     return cm;
   } catch (RequestValidationException e) {
     // The server will have validated the type
     throw new RuntimeException(e);
   }
 }
Example #2
0
 public AbstractType<?> getValidator() throws ConfigurationException, SyntaxException {
   return TypeParser.parse(
       (comparators.get(getPropertyString(KW_DEFAULTVALIDATION, "text")) != null)
           ? comparators.get(getPropertyString(KW_DEFAULTVALIDATION, "text"))
           : getPropertyString(KW_DEFAULTVALIDATION, "text"));
 }
Example #3
0
 public AbstractType<?> getComparator() throws ConfigurationException, SyntaxException {
   return TypeParser.parse(
       (comparators.get(getPropertyString(KW_COMPARATOR, "text")) != null)
           ? comparators.get(getPropertyString(KW_COMPARATOR, "text"))
           : getPropertyString(KW_COMPARATOR, "text"));
 }