Package org.apache.druid.catalog.model
Interface ModelProperties.PropertyDefn<T>
-
- All Known Implementing Classes:
DatasourceDefn.HiddenColumnsDefn,DatasourceDefn.SegmentGranularityFieldDefn,ModelProperties.BasePropertyDefn,ModelProperties.BooleanPropertyDefn,ModelProperties.GranularityPropertyDefn,ModelProperties.IntPropertyDefn,ModelProperties.ListPropertyDefn,ModelProperties.ObjectPropertyDefn,ModelProperties.SimplePropertyDefn,ModelProperties.StringListPropertyDefn,ModelProperties.StringPropertyDefn,ModelProperties.TypeRefPropertyDefn
- Enclosing interface:
- ModelProperties
public static interface ModelProperties.PropertyDefn<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tdecode(Object value, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)Decodes a JSON-encoded value into a corresponding Java value.Objectmerge(Object existing, Object update)Merge a property value with an update.Stringname()Name of the property as visible to catalog users.StringtypeName()The name of the type of this property to be displayed in error messages.voidvalidate(Object value, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)Validates that the object given is valid for this property.
-
-
-
Method Detail
-
name
String name()
Name of the property as visible to catalog users. All properties are top-level within thepropertiesobject within a catalog spec.
-
typeName
String typeName()
The name of the type of this property to be displayed in error messages.
-
validate
void validate(Object value, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
Validates that the object given is valid for this property. Provides the JSON mapper in case JSON decoding is required.
-
merge
Object merge(Object existing, Object update)
Merge a property value with an update. Validation of the update is typically done later, once all the updates are applied. The most typical merge is just: use the new value if provided, else the old value.
-
-