/** * Creates a new property key with default settings against the provided {@link PropertyKeyMaker} and value. * * @param factory PropertyKeyMaker through which the property key is created * @param value the value of the property. The default implementation does not use this parameter. * @return A new property key * @throws IllegalArgumentException if the name is already in use or if other configured values are invalid. */ default PropertyKey makePropertyKey(PropertyKeyMaker factory, Object value) { return makePropertyKey(factory); }
@Override public PropertyKey getOrCreatePropertyKey(String name) { RelationType et = getRelationType(name); if (et == null) { return config.getAutoSchemaMaker().makePropertyKey(makePropertyKey(name)); } else if (et.isPropertyKey()) { return (PropertyKey) et; } else throw new IllegalArgumentException("The type of given name is not a key: " + name); }
@Override public PropertyKey getOrCreatePropertyKey(String name, Object value) { RelationType et = getRelationType(name); if (et == null) { return config.getAutoSchemaMaker().makePropertyKey(makePropertyKey(name), value); } else if (et.isPropertyKey()) { return (PropertyKey) et; } else throw new IllegalArgumentException("The type of given name is not a key: " + name); }