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 String
BINARY_COLUMN_HANDLING_PROPERTY
static String
CATALOG_NAME_PROPERTY
static String
CONNECTION_NAME_PROPERTY
static String
DEBUG_ADDRESS_PROPERTY
static String
EXCEPTION_HANDLING_PROPERTY
static String
EXCLUDED_CAPABILITIES_PROPERTY
static String
IGNORE_ERRORS_PROPERTY
static String
IS_LOCAL_PROPERTY
static String
LOG_LEVEL_PROPERTY
static String
SCHEMA_NAME_PROPERTY
static String
SQL_DIALECT_PROPERTY
static String
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 AdapterProperties
emptyProperties()
Get empty property listBinaryColumnHandling
getBinaryColumnHandling()
Get binary column handlingString
getCatalogName()
Get the catalog nameString
getConnectionName()
Get the connection nameString
getDebugAddress()
Get the debug addressString
getExceptionHandling()
Get the exception handlingString
getExcludedCapabilities()
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 errorsString
getLogLevel()
Get the log levelString
getSchemaName()
Get the schema nameString
getSqlDialect()
Get the sql dialectboolean
hasBinaryColumnHandling()
Check if the binary column handling property is setboolean
hasCatalogName()
Check if the catalog name property is setboolean
hasConnectionName()
Check if the connection name property is setboolean
hasDebugAddress()
Check if the debug address property is setboolean
hasExceptionHandling()
Check if the exception handling property is setboolean
hasExcludedCapabilities()
Check if the excluded capabilities property is setboolean
hasIgnoreErrors()
Check if the ignore errors property is setboolean
hasIsLocal()
Check if the "is local" property is setboolean
hasLogLevel()
Check if the log level property is setboolean
hasSchemaName()
Check if the schema name property is setboolean
hasSqlDialect()
Check if the SQL dialect property is setboolean
hasTableFilter()
Check if the table filter property is setboolean
isLocalSource()
Check if the data source is the local Exasol instancestatic boolean
isRefreshingVirtualSchemaRequired(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
- See Also:
- Constant Field Values
-
CATALOG_NAME_PROPERTY
public static final String CATALOG_NAME_PROPERTY
- See Also:
- Constant Field Values
-
SCHEMA_NAME_PROPERTY
public static final String SCHEMA_NAME_PROPERTY
- See Also:
- Constant Field Values
-
CONNECTION_NAME_PROPERTY
public static final String CONNECTION_NAME_PROPERTY
- See Also:
- Constant Field Values
-
DEBUG_ADDRESS_PROPERTY
public static final String DEBUG_ADDRESS_PROPERTY
- See Also:
- Constant Field Values
-
LOG_LEVEL_PROPERTY
public static final String LOG_LEVEL_PROPERTY
- See Also:
- Constant Field Values
-
SQL_DIALECT_PROPERTY
public static final String SQL_DIALECT_PROPERTY
- See Also:
- Constant Field Values
-
EXCLUDED_CAPABILITIES_PROPERTY
public static final String EXCLUDED_CAPABILITIES_PROPERTY
- See Also:
- Constant Field Values
-
EXCEPTION_HANDLING_PROPERTY
public static final String EXCEPTION_HANDLING_PROPERTY
- See Also:
- Constant Field Values
-
IGNORE_ERRORS_PROPERTY
public static final String IGNORE_ERRORS_PROPERTY
- See Also:
- Constant Field Values
-
IS_LOCAL_PROPERTY
public static final String IS_LOCAL_PROPERTY
- See Also:
- Constant Field Values
-
BINARY_COLUMN_HANDLING_PROPERTY
public static final String 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
-
getSqlDialect
public String getSqlDialect()
Get the sql dialect- Returns:
- sql dialect
-
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:
true
if 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:
true
if 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:
true
if table filter property is set
-
hasCatalogName
public boolean hasCatalogName()
Check if the catalog name property is set- Returns:
true
if catalog name property is set
-
hasSchemaName
public boolean hasSchemaName()
Check if the schema name property is set- Returns:
true
if schema name property is set
-
hasConnectionName
public boolean hasConnectionName()
Check if the connection name property is set- Returns:
true
if connection name property is set
-
hasDebugAddress
public boolean hasDebugAddress()
Check if the debug address property is set- Returns:
true
if debug address property is set
-
hasLogLevel
public boolean hasLogLevel()
Check if the log level property is set- Returns:
true
if log level property is set
-
hasSqlDialect
public boolean hasSqlDialect()
Check if the SQL dialect property is set- Returns:
true
if SQL dialect property is set
-
hasExcludedCapabilities
public boolean hasExcludedCapabilities()
Check if the excluded capabilities property is set- Returns:
true
if excluded capabilities property is set
-
hasExceptionHandling
public boolean hasExceptionHandling()
Check if the exception handling property is set- Returns:
true
if exception handling property is set
-
hasIgnoreErrors
public boolean hasIgnoreErrors()
Check if the ignore errors property is set- Returns:
true
if ignore errors property is set
-
hasIsLocal
public boolean hasIsLocal()
Check if the "is local" property is set- Returns:
true
if "is local" property is set
-
hasBinaryColumnHandling
public boolean hasBinaryColumnHandling()
Check if the binary column handling property is set- Returns:
true
if binary column handling property is set
-
emptyProperties
public static AdapterProperties emptyProperties()
Get empty property list- Returns:
- empty properties
-
-