public abstract class BaseMetadata extends Object implements Metadata
Modifier and Type | Field and Description |
---|---|
static Set<String> |
TYPES_SUPPORT_REFRESH |
ALL_REFS, ALL_TYPES, BASE_CLASS_PATH, DB_DELIMITER, DEFAULT_METHOD, DEFAULT_TYPE, ID_FIELD, METADATA_DELIMITER, SYNONYMS_DATASET_TYPE, TABLE_PRIV, TABLE_PRIVS, TABLES_DATASET_TYPE, TYPE_ALIAS, TYPE_ALIASES, TYPE_ASSEMBLIES, TYPE_ASSEMBLY, TYPE_CATALOG, TYPE_CLASS, TYPE_COLUMN, TYPE_COLUMNS, TYPE_CONSTRAINTS, TYPE_DATA_SET, TYPE_DB_LINK, TYPE_DB_LINKS, TYPE_DBFUNCT, TYPE_DBFUNCTIONS, TYPE_DBINFO, TYPE_DBPROP, TYPE_DBPROPS, TYPE_DIRECTORIES, TYPE_DIRECTORY, TYPE_EK, TYPE_EK_COLUMN, TYPE_EK_COLUMNS, TYPE_EKS, TYPE_EXEC_METHOD, TYPE_EXEC_METHODS, TYPE_FILE, TYPE_FK, TYPE_FK_COLUMN, TYPE_FK_COLUMNS, TYPE_FKS, TYPE_FUNCT, TYPE_FUNCT_PARAMETERS, TYPE_FUNCTS, TYPE_GLOBAL_TEMPORARIES, TYPE_INDEX, TYPE_INDEX_COLUMN, TYPE_INDEX_COLUMNS, TYPE_INDEXES, TYPE_JAVA_CLASSES, TYPE_LOCAL_TEMPORARIES, TYPE_NICKNAME, TYPE_PACKAGE, TYPE_PACKAGE_BODY, TYPE_PACKAGES, TYPE_PARAMETER, TYPE_PARAMETERS, TYPE_PK, TYPE_PK_COLUMN, TYPE_PK_COLUMNS, TYPE_PKS, TYPE_PROC, TYPE_PROC_PARAMETERS, TYPE_PROCS, TYPE_PROCS_FUNCS, TYPE_QUEUE, TYPE_QUEUE_TABLE, TYPE_QUEUE_TABLES, TYPE_QUEUES, TYPE_RECYCLE_BIN, TYPE_RECYCLE_BIN_ITEM, TYPE_SCHEMA, TYPE_SEQUENCE, TYPE_SEQUENCES, TYPE_SYNONYM, TYPE_SYNONYMS, TYPE_SYSTEM_TABLES, TYPE_SYSTEM_VIEWS, TYPE_TABLE, TYPE_TABLES, TYPE_TEMPORARY_TABLES, TYPE_TEMPORARY_VIEWS, TYPE_TRIGGER, TYPE_TRIGGERS, TYPE_TYPE, TYPE_TYPES, TYPE_USER_TYPE, TYPE_USER_TYPES, TYPE_VIEW, TYPE_VIEWS, TYPE_WORKSHEET, TYPE_WORKSHEETS, TYPE_XML_SCHEMA, TYPE_XML_SCHEMAS, VIEWS_DATASET_TYPE
APP, COMMAND, ETL_DRIVER, FORMATTER, IDE_NODE, NO_RANK, WIDGET
Constructor and Description |
---|
BaseMetadata() |
Modifier and Type | Method and Description |
---|---|
String |
asText(String catalog,
String schema,
String pattern,
String type,
String metadataId)
Shows object DDL.
|
int |
compareTo(ExtensionModule ext) |
String |
dropAsText(String catalog,
String schema,
String pattern,
String type)
Shows object drop DDL.
|
DataSet |
getColumns(Alias alias,
DataSet dataSet,
DataSetConnectorParams params,
DataSetConnector connector)
Gets the columns.
|
String |
getConfigFileName()
Gets the path to the configuration file for the module.
|
ConnectionFactory |
getConnectionFactory()
Gets the connection factory.
|
ConnectionParamsProvider<Alias> |
getConnectionParamsProvider()
Gets the connection params provider.
|
String |
getCurrentDatabase()
Gets the current database.
|
DataSet |
getDefaultColumns(Alias alias,
DataSet dataSet)
Gets the default columns.
|
String |
getDisplayName()
Gets the display name.
|
Driver |
getDriver()
Gets the driver.
|
int |
getExtensionRank()
Gets the extension rank.
|
String |
getFullObjectName(String pattern,
String catalog,
String schema)
Gets the full object name.
|
String |
getIconPath()
Gets the full path to the icon file.
|
String |
getLocalUnitClassPath()
If extension module is a "local" it must return the path to it's corresponding Unit.
|
DataSet |
getMetadataByType(String catalog,
String schema,
String pattern,
String type,
String metadataId)
Gets the metadata by type.
|
DataSet |
getMetadataByTypePreserveException(String catalog,
String schema,
String pattern,
String type,
String metadataId)
Gets the metadata by type and preserve exception.
|
abstract Map<String,String> |
getMetadataMethods()
Gets the metadata methods.
|
String |
getMetadataTypeByParentType(String parentType)
Gets the metadata type by parent type.
|
List<Object> |
getMetadataTypes(String parentType)
Gets the metadata types.
|
String |
getObjectName(String pattern)
Gets the object name.
|
String |
getObjectOwnerName(String pattern)
Gets the object owner name.
|
KeyValue[] |
getObjectTypes()
Gets the object types.
|
String |
getType()
Gets the type of the extension module.
|
abstract Map<String,String> |
getTypesByParent()
Gets the types by parent.
|
String |
getXmlConfigFileName()
Gets the path to the xml configuration file for the module.
|
boolean |
hasCatalogs()
Checks if database has catalogs.
|
boolean |
hasMetadataTypes(String type)
Checks if database has given metadata type.
|
boolean |
hasSchemas()
Checks if database has schemas.
|
void |
init(ConnectionFactory connectionFactory,
ConnectionParamsProvider<Alias> connectionParamsProvider,
Driver driver)
Initializes metadata driver.
|
boolean |
isDatabaseCurrent(String compareTo)
Checks if database is current.
|
DataSet |
searchDatabase(DatabaseFilter filter)
Search database objects.
|
void |
setCurrentDatabase(String value)
Sets the current database.
|
void |
setHasCatalogs(boolean value)
Sets the value for the flag "has catalogs".
|
void |
setHasSchemas(boolean value)
Sets the value for the flag "has schemas".
|
boolean |
supportsAsText(String type)
Checks if metadata driver supports asText method for the type.
|
boolean |
supportsDrop(String type)
Checks if metadata driver supports dropAsText method for the type.
|
boolean |
supportsRefresh(String type)
Checks if metadata driver supports refresh for the type.
|
boolean |
supportsSearchDatabase()
Checks if metadata driver supports search database.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allowNotDefault, createAsText, discoverDatabaseTypes, executeAsText, free, getAllowedSchema, getCatalogSchemaMetadataAllowed, getName, getTableMetadataAllowed, getTopLevelAllowed, getTopLevelDbObjects, getTypeByTypeFieldValue, getTypeField, getTypeMethods, needToPopulate, supportsExecute
getLicensePropertyName, getVendor, getVersion
public String asText(String catalog, String schema, String pattern, String type, String metadataId) throws Exception
Metadata
public int compareTo(ExtensionModule ext)
compareTo
in interface Comparable<ExtensionModule>
public String dropAsText(String catalog, String schema, String pattern, String type) throws Exception
Metadata
dropAsText
in interface Metadata
catalog
- the catalogschema
- the schemapattern
- the patterntype
- the typeException
- in case of any errorpublic String getConfigFileName()
ExtensionModule
getConfigFileName
in interface ExtensionModule
public ConnectionFactory getConnectionFactory()
public ConnectionParamsProvider<Alias> getConnectionParamsProvider()
Metadata
getConnectionParamsProvider
in interface Metadata
public String getCurrentDatabase()
public String getDisplayName()
ExtensionModule
getDisplayName
in interface ExtensionModule
public int getExtensionRank()
ExtensionModule
getExtensionRank
in interface ExtensionModule
public String getFullObjectName(String pattern, String catalog, String schema)
Metadata
getFullObjectName
in interface Metadata
pattern
- the patterncatalog
- the catalogschema
- the schemapublic String getIconPath()
ExtensionModule
getIconPath
in interface ExtensionModule
public String getLocalUnitClassPath()
ExtensionModule
getLocalUnitClassPath
in interface ExtensionModule
Unit
public DataSet getMetadataByType(String catalog, String schema, String pattern, String type, String metadataId) throws Exception
Metadata
getMetadataByType
in interface Metadata
catalog
- the catalogschema
- the schemapattern
- the patterntype
- the typemetadataId
- the metadata idException
- in case of any errorpublic DataSet getMetadataByTypePreserveException(String catalog, String schema, String pattern, String type, String metadataId) throws Exception
Metadata
getMetadataByTypePreserveException
in interface Metadata
catalog
- the catalogschema
- the schemapattern
- the patterntype
- the typemetadataId
- the metadata idException
- in case of any errorpublic abstract Map<String,String> getMetadataMethods()
public String getMetadataTypeByParentType(String parentType)
Metadata
getMetadataTypeByParentType
in interface Metadata
parentType
- the parent typepublic List<Object> getMetadataTypes(String parentType) throws Exception
Metadata
getMetadataTypes
in interface Metadata
parentType
- the parent typeException
- in case of any errorpublic String getObjectName(String pattern)
Metadata
getObjectName
in interface Metadata
pattern
- the patternpublic String getObjectOwnerName(String pattern)
Metadata
getObjectOwnerName
in interface Metadata
pattern
- the patternpublic KeyValue[] getObjectTypes()
Metadata
getObjectTypes
in interface Metadata
public String getType()
ExtensionModule
getType
in interface ExtensionModule
public abstract Map<String,String> getTypesByParent()
public String getXmlConfigFileName()
ExtensionModule
getXmlConfigFileName
in interface ExtensionModule
public boolean hasCatalogs()
Metadata
hasCatalogs
in interface Metadata
public boolean hasMetadataTypes(String type)
Metadata
hasMetadataTypes
in interface Metadata
type
- the typepublic boolean hasSchemas()
Metadata
hasSchemas
in interface Metadata
public void init(ConnectionFactory connectionFactory, ConnectionParamsProvider<Alias> connectionParamsProvider, Driver driver) throws Exception
Metadata
public boolean isDatabaseCurrent(String compareTo)
Metadata
isDatabaseCurrent
in interface Metadata
compareTo
- the compare topublic DataSet searchDatabase(DatabaseFilter filter) throws Exception
Metadata
searchDatabase
in interface Metadata
filter
- the search filterException
- in case of any errorpublic void setCurrentDatabase(String value)
value
- the new current databasepublic void setHasCatalogs(boolean value)
value
- the new value for the flag "has catalogs"public void setHasSchemas(boolean value)
value
- the new value for the flag "has schemas".public boolean supportsAsText(String type)
Metadata
supportsAsText
in interface Metadata
type
- the typepublic boolean supportsDrop(String type)
Metadata
supportsDrop
in interface Metadata
type
- the typepublic boolean supportsRefresh(String type)
Metadata
supportsRefresh
in interface Metadata
type
- the typepublic boolean supportsSearchDatabase()
Metadata
supportsSearchDatabase
in interface Metadata
public DataSet getColumns(Alias alias, DataSet dataSet, DataSetConnectorParams params, DataSetConnector connector) throws Exception
alias
- the aliasdataSet
- the data setparams
- the paramsconnector
- the connectorException
- the exceptionCopyright © 2010-2020 Toolsverse. All Rights Reserved.