Ejemplo n.º 1
0
  public static boolean isValidTablePropertyKey(String key) {
    if (validTableProperties == null) {
      synchronized (Property.class) {
        if (validTableProperties == null) {
          HashSet<String> tmp = new HashSet<String>();
          for (Property p : Property.values())
            if (!p.getType().equals(PropertyType.PREFIX)
                && p.getKey().startsWith(Property.TABLE_PREFIX.getKey())) tmp.add(p.getKey());
          validTableProperties = tmp;
        }
      }
    }

    return validTableProperties.contains(key)
        || key.startsWith(Property.TABLE_CONSTRAINT_PREFIX.getKey())
        || key.startsWith(Property.TABLE_ITERATOR_PREFIX.getKey())
        || key.startsWith(Property.TABLE_LOCALITY_GROUP_PREFIX.getKey());
  }
Ejemplo n.º 2
0
 public static Property getPropertyByKey(String key) {
   for (Property prop : Property.values()) if (prop.getKey().equals(key)) return prop;
   return null;
 }