Class BaseDataSource

    • Constructor Detail

      • BaseDataSource

        public BaseDataSource()
        Constructor for MMDataSource.
    • Method Detail

      • getDisableLocalTxn

        public String getDisableLocalTxn()
      • setDisableLocalTxn

        public void setDisableLocalTxn​(String disableLocalTxn)
      • getApplicationName

        public String getApplicationName()
        Returns the name of the application. Supplying this property may allow an administrator of a Teiid Server to better identify individual connections and usage patterns. This property is optional.
        Returns:
        String the application name; may be null or zero-length
      • getDatabaseName

        public String getDatabaseName()
        Returns the name of the virtual database on a particular Teiid Server.
        Returns:
        String
      • getDatabaseVersion

        public String getDatabaseVersion()
        Returns the databaseVersion.
        Returns:
        String
      • getDataSourceName

        public String getDataSourceName()
        Returns the logical name for the underlying XADataSource or ConnectionPoolDataSource; used only when pooling connections or distributed transactions are implemented.
        Returns:
        the logical name for the underlying data source; may be null
      • getDescription

        public String getDescription()
        Returns the description of this data source.
        Returns:
        the description; may be null
      • getUser

        public String getUser()
        Returns the user.
        Returns:
        the name of the user for this data source
      • getPassword

        public String getPassword()
        Returns the password.
        Returns:
        the password for this data source.
      • setApplicationName

        public void setApplicationName​(String applicationName)
        Sets the name of the application. Supplying this property may allow an administrator of a Teiid Server to better identify individual connections and usage patterns. This property is optional.
        Parameters:
        applicationName - The applicationName to set
      • setDatabaseName

        public void setDatabaseName​(String databaseName)
        Sets the name of the virtual database on a particular Teiid Server.
        Parameters:
        databaseName - The name of the virtual database
      • setDatabaseVersion

        public void setDatabaseVersion​(String databaseVersion)
        Sets the databaseVersion.
        Parameters:
        databaseVersion - The version of the virtual database
      • setDataSourceName

        public void setDataSourceName​(String dataSourceName)
        Sets the logical name for the underlying XADataSource or ConnectionPoolDataSource; used only when pooling connections or distributed transactions are implemented.
        Parameters:
        dataSourceName - The dataSourceName for this data source; may be null
      • setUser

        public void setUser​(String user)
        Sets the user.
        Parameters:
        user - The user to set
      • setPassword

        public void setPassword​(String password)
        Sets the password.
        Parameters:
        password - The password for this data source
      • setDescription

        public void setDescription​(String description)
        Sets the description of this data source.
        Parameters:
        description - The description for this data source; may be null
      • setPartialResultsMode

        public void setPartialResultsMode​(String partialResultsMode)
      • getPartialResultsMode

        public String getPartialResultsMode()
      • setFetchSize

        public void setFetchSize​(int fetchSize)
      • getFetchSize

        public int getFetchSize()
      • setResultSetCacheMode

        public void setResultSetCacheMode​(String resultSetCacheMode)
      • getResultSetCacheMode

        public String getResultSetCacheMode()
      • getShowPlan

        public String getShowPlan()
      • setShowPlan

        public void setShowPlan​(String showPlan)
      • setNoExec

        public void setNoExec​(boolean noExec)
      • isNoExec

        public boolean isNoExec()
      • getAutoCommitTxn

        public String getAutoCommitTxn()
        Returns the current setting for how connections are created by this DataSource manage transactions for client requests when client applications do not use transactions. Because a virtual database will likely deal with multiple underlying information sources, Teiid will execute all client requests within the contexts of transactions. This method determines the semantics of creating such transactions when the client does not explicitly do so.
        Returns:
        the current setting, or null if the property has not been set and the default mode will be used.
      • setAutoCommitTxn

        public void setAutoCommitTxn​(String transactionAutoWrap)
        Sets the setting for how connections are created by this DataSource manage transactions for client requests with autoCommit = true. Because a virtual database will likely deal with multiple underlying information sources, Teiid will execute all client requests within the contexts of transactions. This method determines the semantics of creating such transactions when the client does not explicitly do so.

        The allowable values for this property are:

        • "OFF" - Nothing is ever wrapped in a transaction and the server will execute multi-source updates happily but outside a transaction. This is least safe but highest performance. The TXN_WRAP_OFF constant value is provided for convenience.
        • "ON" - Always wrap every command in a transaction. This is most safe but lowest performance. The TXN_WRAP_ON constant value is provided for convenience.
        • "AUTO" - checks if a command requires a transaction and will be automatically wrap it. This is the default mode. The TXN_WRAP_AUTO constant value is provided for convenience.
        Parameters:
        transactionAutoWrap - The transactionAutoWrap to set
      • getUseJDBC4ColumnNameAndLabelSemantics

        public boolean getUseJDBC4ColumnNameAndLabelSemantics()
      • setUseJDBC4ColumnNameAndLabelSemantics

        public void setUseJDBC4ColumnNameAndLabelSemantics​(boolean useJDBC4ColumnNameAndLabelSemantics)
      • reasonWhyInvalidApplicationName

        public static String reasonWhyInvalidApplicationName​(String applicationName)
        Return the reason why the supplied application name may be invalid, or null if it is considered valid.
        Parameters:
        applicationName - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setApplicationName(String)
      • reasonWhyInvalidDatabaseName

        public static String reasonWhyInvalidDatabaseName​(String databaseName)
        Return the reason why the supplied virtual database name may be invalid, or null if it is considered valid.
        Parameters:
        databaseName - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setDatabaseName(String)
      • reasonWhyInvalidUser

        public static String reasonWhyInvalidUser​(String userName)
        Return the reason why the supplied user name may be invalid, or null if it is considered valid.
        Parameters:
        userName - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setUser(String)
      • reasonWhyInvalidTransactionAutoWrap

        public static String reasonWhyInvalidTransactionAutoWrap​(String autoWrap)
        Return the reason why the supplied transaction auto wrap value may be invalid, or null if it is considered valid.

        This method checks to see that the value is one of the allowable values.

        Parameters:
        autoWrap - a possible value for the auto wrap property.
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setAutoCommitTxn(String)
      • reasonWhyInvalidDatabaseVersion

        public static String reasonWhyInvalidDatabaseVersion​(String databaseVersion)
        Return the reason why the supplied virtual database version may be invalid, or null if it is considered valid.
        Parameters:
        databaseVersion - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setDatabaseVersion(String)
      • reasonWhyInvalidDataSourceName

        public static String reasonWhyInvalidDataSourceName​(String dataSourceName)
        Return the reason why the supplied data source name may be invalid, or null if it is considered valid.
        Parameters:
        dataSourceName - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setDataSourceName(String)
      • reasonWhyInvalidPassword

        public static String reasonWhyInvalidPassword​(String pwd)
        Return the reason why the supplied password may be invalid, or null if it is considered valid.
        Parameters:
        pwd - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setPassword(String)
      • reasonWhyInvalidDescription

        public static String reasonWhyInvalidDescription​(String description)
        Return the reason why the supplied description may be invalid, or null if it is considered valid.
        Parameters:
        description - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setDescription(String)
      • reasonWhyInvalidPartialResultsMode

        public static String reasonWhyInvalidPartialResultsMode​(String partialMode)
        The reason why partialResultsMode is invalid.
        Parameters:
        partialMode - boolean flag
        Returns:
        String reason
      • reasonWhyInvalidFetchSize

        public static String reasonWhyInvalidFetchSize​(int fetchSize)
        The reason why fetchSize is invalid.
        Parameters:
        fetchSize - Number of rows per batch
        Returns:
        the reason why the property is invalid, or null if it is considered valid
      • setAdditionalProperties

        public void setAdditionalProperties​(String additionalProperties)
      • getAdditionalProperties

        public String getAdditionalProperties()
      • setAnsiQuotedIdentifiers

        public void setAnsiQuotedIdentifiers​(boolean ansiQuotedIdentifiers)
      • isAnsiQuotedIdentifiers

        public boolean isAnsiQuotedIdentifiers()
      • getQueryTimeout

        public int getQueryTimeout()
      • setQueryTimeout

        public void setQueryTimeout​(int queryTimeout)