Package org.teiid.metadata
Interface MetadataRepository<F,C>
-
- All Known Implementing Classes:
ChainingMetadataRepository
,DDLFileMetadataRepository
,DDLMetadataRepository
,DefaultMetadataRepository
,DirectQueryMetadataRepository
,IndexMetadataRepository
,MaterializationMetadataRepository
,MultiSourceMetadataRepository
,NativeMetadataRepository
,UDFMetadataRepository
public interface MetadataRepository<F,C>
A hook for externalizing view, procedure, and other metadata. One of the two load methods should be overriden.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
loadMetadata(MetadataFactory factory, ExecutionFactory<F,C> executionFactory, F connectionFactory)
Loads the schema information for the vdb for the given schemaName.default void
loadMetadata(MetadataFactory factory, ExecutionFactory<F,C> executionFactory, F connectionFactory, String text)
Loads the schema information for the vdb for the given schemaName.default void
setColumnStats(String vdbName, String vdbVersion, Column column, ColumnStats columnStats)
Set theColumnStats
for a given columndefault void
setInsteadOfTriggerDefinition(String vdbName, String vdbVersion, Table table, Table.TriggerEvent triggerOperation, String triggerDefinition)
Call back function, when "alter trigger" is calleddefault void
setInsteadOfTriggerEnabled(String vdbName, String vdbVersion, Table table, Table.TriggerEvent triggerOperation, boolean enabled)
Callback function, when "alter trigger" is called to enable or disable a triggerdefault void
setProcedureDefinition(String vdbName, String vdbVersion, Procedure procedure, String procedureDefinition)
Call back function, when "alter procedure" is called to set the procedure definitiondefault void
setProperty(String vdbName, String vdbVersion, AbstractMetadataRecord record, String name, String value)
Set an extension metadata property for a given record.default void
setTableStats(String vdbName, String vdbVersion, Table table, TableStats tableStats)
Set theTableStats
for the given tabledefault void
setViewDefinition(String vdbName, String vdbVersion, Table table, String viewDefinition)
Call back function, when "alter view" definition is called
-
-
-
Method Detail
-
loadMetadata
default void loadMetadata(MetadataFactory factory, ExecutionFactory<F,C> executionFactory, F connectionFactory, String text) throws TranslatorException
Loads the schema information for the vdb for the given schemaName. Loads table, procedures, functions, indexes etc.- Parameters:
factory
-executionFactory
- may be null if loading a virtual sourceconnectionFactory
- may be null if source is not availabletext
- the text used to configure the load- Throws:
TranslatorException
- to indicate a recoverable error, otherwise a RuntimeException
-
loadMetadata
default void loadMetadata(MetadataFactory factory, ExecutionFactory<F,C> executionFactory, F connectionFactory) throws TranslatorException
Loads the schema information for the vdb for the given schemaName. Loads table, procedures, functions, indexes etc.- Parameters:
factory
-executionFactory
- may be null if loading a virtual sourceconnectionFactory
- may be null if source is not available- Throws:
TranslatorException
- to indicate a recoverable error, otherwise a RuntimeException
-
setViewDefinition
default void setViewDefinition(String vdbName, String vdbVersion, Table table, String viewDefinition)
Call back function, when "alter view" definition is called- Parameters:
vdbName
-vdbVersion
-table
-viewDefinition
-
-
setInsteadOfTriggerDefinition
default void setInsteadOfTriggerDefinition(String vdbName, String vdbVersion, Table table, Table.TriggerEvent triggerOperation, String triggerDefinition)
Call back function, when "alter trigger" is called- Parameters:
vdbName
-vdbVersion
-table
-triggerOperation
-triggerDefinition
-
-
setInsteadOfTriggerEnabled
default void setInsteadOfTriggerEnabled(String vdbName, String vdbVersion, Table table, Table.TriggerEvent triggerOperation, boolean enabled)
Callback function, when "alter trigger" is called to enable or disable a trigger- Parameters:
vdbName
-vdbVersion
-table
-triggerOperation
-enabled
-
-
setProcedureDefinition
default void setProcedureDefinition(String vdbName, String vdbVersion, Procedure procedure, String procedureDefinition)
Call back function, when "alter procedure" is called to set the procedure definition- Parameters:
vdbName
-vdbVersion
-procedure
-procedureDefinition
-
-
setTableStats
default void setTableStats(String vdbName, String vdbVersion, Table table, TableStats tableStats)
Set theTableStats
for the given table- Parameters:
vdbName
-vdbVersion
-table
-tableStats
-
-
setColumnStats
default void setColumnStats(String vdbName, String vdbVersion, Column column, ColumnStats columnStats)
Set theColumnStats
for a given column- Parameters:
vdbName
-vdbVersion
-column
-columnStats
-
-
setProperty
default void setProperty(String vdbName, String vdbVersion, AbstractMetadataRecord record, String name, String value)
Set an extension metadata property for a given record.- Parameters:
vdbName
-vdbVersion
-record
-name
-value
-
-
-