Package com.exasol.adapter
Class AdapterProperties
- java.lang.Object
-
- com.exasol.adapter.AbstractAdapterProperties
-
- com.exasol.adapter.AdapterProperties
-
public class AdapterProperties extends AbstractAdapterProperties
The main job of this class is to turn user-defined key-value-pairs into concrete properties that the adapter knows. This improves the code readability and robustness.It is still possible to access the raw keys and values in order to support properties that are specific to an adapter type an can therefore not be covered in the common module.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBINARY_COLUMN_HANDLING_PROPERTYThe constant BINARY_COLUMN_HANDLING_PROPERTY.static StringCATALOG_NAME_PROPERTYThe constant CATALOG_NAME_PROPERTY.static StringCONNECTION_NAME_PROPERTYThe constant CONNECTION_NAME_PROPERTY.static StringDEBUG_ADDRESS_PROPERTYThe constant DEBUG_ADDRESS_PROPERTY.static StringEXCEPTION_HANDLING_PROPERTYThe constant EXCEPTION_HANDLING_PROPERTY.static StringEXCLUDED_CAPABILITIES_PROPERTYThe constant EXCLUDED_CAPABILITIES_PROPERTY.static StringIGNORE_ERRORS_PROPERTYThe constant IGNORE_ERRORS_PROPERTY.static StringIS_LOCAL_PROPERTYThe constant IS_LOCAL_PROPERTY.static StringLOG_LEVEL_PROPERTYThe constant LOG_LEVEL_PROPERTY.static StringSCHEMA_NAME_PROPERTYThe constant SCHEMA_NAME_PROPERTY.static StringTABLE_FILTER_PROPERTYThe constant TABLE_FILTER_PROPERTY.
-
Constructor Summary
Constructors Constructor Description AdapterProperties(Map<String,String> properties)Create a new instance ofAdapterProperties
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AdapterPropertiesemptyProperties()Get empty property listBinaryColumnHandlinggetBinaryColumnHandling()Get binary column handlingStringgetCatalogName()Get the catalog nameStringgetConnectionName()Get the connection nameStringgetDebugAddress()Get the debug addressStringgetExceptionHandling()Get the exception handlingStringgetExcludedCapabilities()Get the excluded capabilitiesList<String>getFilteredTables()Get the list of tables for which the metadata will be read from the remote sourceList<String>getIgnoredErrors()Get the list of ignored errorsStringgetLogLevel()Get the log levelStringgetSchemaName()Get the schema namebooleanhasBinaryColumnHandling()Check if the binary column handling property is setbooleanhasCatalogName()Check if the catalog name property is setbooleanhasConnectionName()Check if the connection name property is setbooleanhasDebugAddress()Check if the debug address property is setbooleanhasExceptionHandling()Check if the exception handling property is setbooleanhasExcludedCapabilities()Check if the excluded capabilities property is setbooleanhasIgnoreErrors()Check if the ignore errors property is setbooleanhasIsLocal()Check if the "is local" property is setbooleanhasLogLevel()Check if the log level property is setbooleanhasSchemaName()Check if the schema name property is setbooleanhasTableFilter()Check if the table filter property is setbooleanisLocalSource()Check if the data source is the local Exasol instancestatic booleanisRefreshingVirtualSchemaRequired(Map<String,String> changedProperties)Check whether any of the given properties causes a refresh of the virtual schema-
Methods inherited from class com.exasol.adapter.AbstractAdapterProperties
containsKey, entrySet, equals, get, hashCode, isEmpty, isEnabled, keySet, values
-
-
-
-
Field Detail
-
TABLE_FILTER_PROPERTY
public static final String TABLE_FILTER_PROPERTY
The constant TABLE_FILTER_PROPERTY.- See Also:
- Constant Field Values
-
CATALOG_NAME_PROPERTY
public static final String CATALOG_NAME_PROPERTY
The constant CATALOG_NAME_PROPERTY.- See Also:
- Constant Field Values
-
SCHEMA_NAME_PROPERTY
public static final String SCHEMA_NAME_PROPERTY
The constant SCHEMA_NAME_PROPERTY.- See Also:
- Constant Field Values
-
CONNECTION_NAME_PROPERTY
public static final String CONNECTION_NAME_PROPERTY
The constant CONNECTION_NAME_PROPERTY.- See Also:
- Constant Field Values
-
DEBUG_ADDRESS_PROPERTY
public static final String DEBUG_ADDRESS_PROPERTY
The constant DEBUG_ADDRESS_PROPERTY.- See Also:
- Constant Field Values
-
LOG_LEVEL_PROPERTY
public static final String LOG_LEVEL_PROPERTY
The constant LOG_LEVEL_PROPERTY.- See Also:
- Constant Field Values
-
EXCLUDED_CAPABILITIES_PROPERTY
public static final String EXCLUDED_CAPABILITIES_PROPERTY
The constant EXCLUDED_CAPABILITIES_PROPERTY.- See Also:
- Constant Field Values
-
EXCEPTION_HANDLING_PROPERTY
public static final String EXCEPTION_HANDLING_PROPERTY
The constant EXCEPTION_HANDLING_PROPERTY.- See Also:
- Constant Field Values
-
IGNORE_ERRORS_PROPERTY
public static final String IGNORE_ERRORS_PROPERTY
The constant IGNORE_ERRORS_PROPERTY.- See Also:
- Constant Field Values
-
IS_LOCAL_PROPERTY
public static final String IS_LOCAL_PROPERTY
The constant IS_LOCAL_PROPERTY.- See Also:
- Constant Field Values
-
BINARY_COLUMN_HANDLING_PROPERTY
public static final String BINARY_COLUMN_HANDLING_PROPERTY
The constant BINARY_COLUMN_HANDLING_PROPERTY.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AdapterProperties
public AdapterProperties(Map<String,String> properties)
Create a new instance ofAdapterProperties- Parameters:
properties- adapter properties
-
-
Method Detail
-
getCatalogName
public String getCatalogName()
Get the catalog name- Returns:
- catalog name
-
getSchemaName
public String getSchemaName()
Get the schema name- Returns:
- schema name
-
getConnectionName
public String getConnectionName()
Get the connection name- Returns:
- connection name
-
getDebugAddress
public String getDebugAddress()
Get the debug address- Returns:
- debug address
-
getLogLevel
public String getLogLevel()
Get the log level- Returns:
- log level
-
getExcludedCapabilities
public String getExcludedCapabilities()
Get the excluded capabilities- Returns:
- excluded capabilities
-
getExceptionHandling
public String getExceptionHandling()
Get the exception handling- Returns:
- exception handling
-
getIgnoredErrors
public List<String> getIgnoredErrors()
Get the list of ignored errors- Returns:
- list of ignored errors
-
getFilteredTables
public List<String> getFilteredTables()
Get the list of tables for which the metadata will be read from the remote source- Returns:
- list of tables serving as positive filter criteria
-
isRefreshingVirtualSchemaRequired
public static boolean isRefreshingVirtualSchemaRequired(Map<String,String> changedProperties)
Check whether any of the given properties causes a refresh of the virtual schema- Parameters:
changedProperties- map of properties that were changed- Returns:
trueif any of the changes makes refreshing the virtual schema necessary
-
isLocalSource
public boolean isLocalSource()
Check if the data source is the local Exasol instance- Returns:
trueif the data source and the database containing the Virtual Schema are hosted on the same Exasol cluster
-
getBinaryColumnHandling
public BinaryColumnHandling getBinaryColumnHandling()
Get binary column handling- Returns:
- binary column handling
-
hasTableFilter
public boolean hasTableFilter()
Check if the table filter property is set- Returns:
trueif table filter property is set
-
hasCatalogName
public boolean hasCatalogName()
Check if the catalog name property is set- Returns:
trueif catalog name property is set
-
hasSchemaName
public boolean hasSchemaName()
Check if the schema name property is set- Returns:
trueif schema name property is set
-
hasConnectionName
public boolean hasConnectionName()
Check if the connection name property is set- Returns:
trueif connection name property is set
-
hasDebugAddress
public boolean hasDebugAddress()
Check if the debug address property is set- Returns:
trueif debug address property is set
-
hasLogLevel
public boolean hasLogLevel()
Check if the log level property is set- Returns:
trueif log level property is set
-
hasExcludedCapabilities
public boolean hasExcludedCapabilities()
Check if the excluded capabilities property is set- Returns:
trueif excluded capabilities property is set
-
hasExceptionHandling
public boolean hasExceptionHandling()
Check if the exception handling property is set- Returns:
trueif exception handling property is set
-
hasIgnoreErrors
public boolean hasIgnoreErrors()
Check if the ignore errors property is set- Returns:
trueif ignore errors property is set
-
hasIsLocal
public boolean hasIsLocal()
Check if the "is local" property is set- Returns:
trueif "is local" property is set
-
hasBinaryColumnHandling
public boolean hasBinaryColumnHandling()
Check if the binary column handling property is set- Returns:
trueif binary column handling property is set
-
emptyProperties
public static AdapterProperties emptyProperties()
Get empty property list- Returns:
- empty properties
-
-