Interface SchemaModifier
public interface SchemaModifier
Modifies the feature types inferred from database analysis.
- Since:
- 1.1
- Version:
- 1.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OptionKey
<SchemaModifier> The option for declaring a schema modifier atSQLStore
creation time. -
Method Summary
Modifier and TypeMethodDescriptiondefault DefaultFeatureType
editFeatureType
(TableReference table, FeatureTypeBuilder feature) Invoked after analysis of a table for allowing modifications of the inferred feature type.default boolean
isCyclicAssociationAllowed
(TableReference dependency) Returnstrue
if the given dependency is allowed to have an association to its dependent feature.
-
Field Details
-
OPTION
The option for declaring a schema modifier atSQLStore
creation time.
-
-
Method Details
-
editFeatureType
default DefaultFeatureType editFeatureType(TableReference table, FeatureTypeBuilder feature) throws DataStoreException Invoked after analysis of a table for allowing modifications of the inferred feature type. The given builder is initialized with all properties inferred from the table definition. Implementation of this method can add properties (e.g. operations) but should not remove or rename properties. It is okay to add or remove characteristics on properties.The default implementation returns
feature.build()
without making any change.- Parameters:
table
- the catalog (if present), schema (if present) and table name.feature
- a feature type builder initialized with all properties inferred by the analysis of a table. This builder can be modified in-place.- Returns:
- the feature type to use for the specified table.
- Throws:
DataStoreException
- if an error occurred while modifying the feature type.
-
isCyclicAssociationAllowed
Returnstrue
if the given dependency is allowed to have an association to its dependent feature. A value oftrue
creates a cyclic dependency, whichSQLStore
can manage but may surprise users. The default value isfalse
.- Parameters:
dependency
- the dependency table.- Returns:
- whether the dependency is allowed to have an association to its parent.
-