use of org.structr.core.property.GenericProperty in project structr by structr.
the class JarConfigurationProvider method getPropertyKeyForJSONName.
@Override
public PropertyKey getPropertyKeyForJSONName(Class type, String jsonName, boolean createIfNotFound) {
if (jsonName == null) {
return null;
}
Map<String, PropertyKey> classJSNamePropertyMap = getClassJSNamePropertyMapForType(type);
PropertyKey key = classJSNamePropertyMap.get(jsonName);
if (key == null) {
// first try: uuid
if (GraphObject.id.dbName().equals(jsonName)) {
return GraphObject.id;
}
if (createIfNotFound) {
key = new GenericProperty(jsonName);
}
}
return key;
}
Aggregations