Class TableCountLimit


  • public final class TableCountLimit
    extends Object
    Class to handle the property for limiting the maximum number of tables for mapping.
    • 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
    • Constructor Detail

      • TableCountLimit

        public TableCountLimit​(int maxNumberOfTables)
        Parameters:
        maxNumberOfTables - maximum number of tables to be accepted
    • 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 to CREATE VIRTUAL SCHEMA
        Returns:
        new instance of TableCountLimit based on the properties
      • validateNumberOfTables

        public void validateNumberOfTables​(int numberOfTables)
                                    throws RemoteMetadataReaderException
        Verify 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