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 java.lang.StringBINARY_COLUMN_HANDLING_PROPERTYstatic java.lang.StringCATALOG_NAME_PROPERTYstatic java.lang.StringCONNECTION_NAME_PROPERTYstatic java.lang.StringCONNECTION_STRING_PROPERTYstatic java.lang.StringDEBUG_ADDRESS_PROPERTYstatic java.lang.StringEXCEPTION_HANDLING_PROPERTYstatic java.lang.StringEXCLUDED_CAPABILITIES_PROPERTYstatic java.lang.StringIGNORE_ERRORS_PROPERTYstatic java.lang.StringIS_LOCAL_PROPERTYstatic java.lang.StringLOG_LEVEL_PROPERTYstatic java.lang.StringPASSWORD_PROPERTYstatic java.lang.StringSCHEMA_NAME_PROPERTYstatic java.lang.StringSQL_DIALECT_PROPERTYstatic java.lang.StringTABLE_FILTER_PROPERTYstatic java.lang.StringUSERNAME_PROPERTY
-
Constructor Summary
Constructors Constructor Description AdapterProperties(java.util.Map<java.lang.String,java.lang.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 handlingjava.lang.StringgetCatalogName()Get the catalog namejava.lang.StringgetConnectionName()Get the connection namejava.lang.StringgetConnectionString()Get the connection stringjava.lang.StringgetDebugAddress()Get the debug addressjava.lang.StringgetExceptionHandling()Get the exception handlingjava.lang.StringgetExcludedCapabilities()Get the excluded capabilitiesjava.util.List<java.lang.String>getFilteredTables()Get the list of tables for which the metadata will be read from the remote sourcejava.util.List<java.lang.String>getIgnoredErrors()Get the list of ignored errorsjava.lang.StringgetLogLevel()Get the log leveljava.lang.StringgetPassword()Get the passwordjava.lang.StringgetSchemaName()Get the schema namejava.lang.StringgetSqlDialect()Get the sql dialectjava.lang.StringgetUsername()Get the user 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 setbooleanhasConnectionString()Check if the connection string 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 setbooleanhasPassword()Check if the password property is setbooleanhasSchemaName()Check if the schema name property is setbooleanhasSqlDialect()Check if the SQL dialect property is setbooleanhasTableFilter()Check if the table filter property is setbooleanhasUsername()Check if the username property is setbooleanisLocalSource()Check if the data source is the local Exasol instancestatic booleanisRefreshingVirtualSchemaRequired(java.util.Map<java.lang.String,java.lang.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 java.lang.String TABLE_FILTER_PROPERTY
- See Also:
- Constant Field Values
-
CATALOG_NAME_PROPERTY
public static final java.lang.String CATALOG_NAME_PROPERTY
- See Also:
- Constant Field Values
-
SCHEMA_NAME_PROPERTY
public static final java.lang.String SCHEMA_NAME_PROPERTY
- See Also:
- Constant Field Values
-
CONNECTION_NAME_PROPERTY
public static final java.lang.String CONNECTION_NAME_PROPERTY
- See Also:
- Constant Field Values
-
CONNECTION_STRING_PROPERTY
public static final java.lang.String CONNECTION_STRING_PROPERTY
- See Also:
- Constant Field Values
-
DEBUG_ADDRESS_PROPERTY
public static final java.lang.String DEBUG_ADDRESS_PROPERTY
- See Also:
- Constant Field Values
-
LOG_LEVEL_PROPERTY
public static final java.lang.String LOG_LEVEL_PROPERTY
- See Also:
- Constant Field Values
-
SQL_DIALECT_PROPERTY
public static final java.lang.String SQL_DIALECT_PROPERTY
- See Also:
- Constant Field Values
-
EXCLUDED_CAPABILITIES_PROPERTY
public static final java.lang.String EXCLUDED_CAPABILITIES_PROPERTY
- See Also:
- Constant Field Values
-
EXCEPTION_HANDLING_PROPERTY
public static final java.lang.String EXCEPTION_HANDLING_PROPERTY
- See Also:
- Constant Field Values
-
IGNORE_ERRORS_PROPERTY
public static final java.lang.String IGNORE_ERRORS_PROPERTY
- See Also:
- Constant Field Values
-
IS_LOCAL_PROPERTY
public static final java.lang.String IS_LOCAL_PROPERTY
- See Also:
- Constant Field Values
-
USERNAME_PROPERTY
public static final java.lang.String USERNAME_PROPERTY
- See Also:
- Constant Field Values
-
PASSWORD_PROPERTY
public static final java.lang.String PASSWORD_PROPERTY
- See Also:
- Constant Field Values
-
BINARY_COLUMN_HANDLING_PROPERTY
public static final java.lang.String BINARY_COLUMN_HANDLING_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AdapterProperties
public AdapterProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Create a new instance ofAdapterProperties- Parameters:
properties- adapter properties
-
-
Method Detail
-
getCatalogName
public java.lang.String getCatalogName()
Get the catalog name- Returns:
- catalog name
-
getSchemaName
public java.lang.String getSchemaName()
Get the schema name- Returns:
- schema name
-
getConnectionName
public java.lang.String getConnectionName()
Get the connection name- Returns:
- connection name
-
getConnectionString
public java.lang.String getConnectionString()
Get the connection string- Returns:
- connection string
-
getUsername
public java.lang.String getUsername()
Get the user name- Returns:
- user name
-
getPassword
public java.lang.String getPassword()
Get the password- Returns:
- password
-
getDebugAddress
public java.lang.String getDebugAddress()
Get the debug address- Returns:
- debug address
-
getLogLevel
public java.lang.String getLogLevel()
Get the log level- Returns:
- log level
-
getSqlDialect
public java.lang.String getSqlDialect()
Get the sql dialect- Returns:
- sql dialect
-
getExcludedCapabilities
public java.lang.String getExcludedCapabilities()
Get the excluded capabilities- Returns:
- excluded capabilities
-
getExceptionHandling
public java.lang.String getExceptionHandling()
Get the exception handling- Returns:
- exception handling
-
getIgnoredErrors
public java.util.List<java.lang.String> getIgnoredErrors()
Get the list of ignored errors- Returns:
- list of ignored errors
-
getFilteredTables
public java.util.List<java.lang.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(java.util.Map<java.lang.String,java.lang.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
-
hasUsername
public boolean hasUsername()
Check if the username property is set- Returns:
trueif username property is set
-
hasPassword
public boolean hasPassword()
Check if the password property is set- Returns:
trueif password property is set
-
hasConnectionString
public boolean hasConnectionString()
Check if the connection string property is set- Returns:
trueif connection string property is set
-
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
-
hasSqlDialect
public boolean hasSqlDialect()
Check if the SQL dialect property is set- Returns:
trueif SQL dialect 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
-
-