예제 #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);
   }
 }
예제 #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"));
 }
예제 #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"));
 }