Package com.exasol.adapter.properties
Class TableCountLimit
- java.lang.Object
-
- com.exasol.adapter.properties.TableCountLimit
-
public final class TableCountLimit extends Object
Class to handle the property for limiting the maximum number of tables for mapping.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAXTABLES_PROPERTYProperty for maximum number of tables to be mapped; exceeding this limit (default 1000) will abort virtual schema creation or refresh.
-
Constructor Summary
Constructors Constructor Description TableCountLimit(int maxNumberOfTables)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TableCountLimitfrom(com.exasol.adapter.AdapterProperties properties)static PropertyValidatorgetValidator()voidvalidateNumberOfTables(int numberOfTables)Verify that the given number of mapped tables does not exceed the configured max table limit.
-
-
-
Field Detail
-
MAXTABLES_PROPERTY
public static final String MAXTABLES_PROPERTY
Property for maximum number of tables to be mapped; exceeding this limit (default 1000) will abort virtual schema creation or refresh.- See Also:
- Constant Field Values
-
-
Method Detail
-
getValidator
public static PropertyValidator getValidator()
- Returns:
- validator for the property controlling the maximum number of tables to be mapped.
-
from
public static TableCountLimit from(com.exasol.adapter.AdapterProperties properties)
- Parameters:
properties- Adapter Properties passed toCREATE VIRTUAL SCHEMA- Returns:
- new instance of
TableCountLimitbased on the properties
-
validateNumberOfTables
public void validateNumberOfTables(int numberOfTables) throws RemoteMetadataReaderExceptionVerify that the given number of mapped tables does not exceed the configured max table limit.- Parameters:
numberOfTables- actual number of mapped tables- Throws:
RemoteMetadataReaderException- if the table limit has been exceeded
-
-