Package org.apache.druid.catalog.model
Class ObjectDefn
java.lang.Object
org.apache.druid.catalog.model.ObjectDefn
- Direct Known Subclasses:
TableDefn
Metadata definition of the metadata objects stored in the catalog. (Yes,
that means that this is meta-meta-data.) Objects consist of a map of
property values (and perhaps other items defined in subclasses.) Each
property is defined by a column metadata object. Objects allow extended
properties which have no definition: the meaning of such properties is
defined elsewhere.
-
Constructor Summary
ConstructorsConstructorDescriptionObjectDefn(String name, String typeValue, List<ModelProperties.PropertyDefn<?>> fields) -
Method Summary
Modifier and TypeMethodDescriptionMerge the properties for an object using a set of updates in a map.name()protected static Map<String,ModelProperties.PropertyDefn<?>> toPropertyMap(List<ModelProperties.PropertyDefn<?>> props) The type value is the value of the"type"field written into the object's Java or JSON representation.voidValidate the property values using the property definitions defined in this class.
-
Constructor Details
-
ObjectDefn
-
-
Method Details
-
toPropertyMap
protected static Map<String,ModelProperties.PropertyDefn<?>> toPropertyMap(List<ModelProperties.PropertyDefn<?>> props) -
name
-
typeValue
The type value is the value of the"type"field written into the object's Java or JSON representation. It is akin to the type used by Jackson. -
properties
-
property
-
mergeProperties
Merge the properties for an object using a set of updates in a map. If the update value isnull, then remove the property in the revised set. If the property is known, use the column definition to merge the values. Else, the update replaces any existing value.This method does not validate the properties, except as needed to do a merge. A separate validation step is done on the final, merged object.
-
validate
public void validate(Map<String, Object> spec, com.fasterxml.jackson.databind.ObjectMapper jsonMapper) Validate the property values using the property definitions defined in this class. The list may contain "custom" properties which are accepted as-is.
-