Package org.h2.table

Class TableLinkConnection


  • public class TableLinkConnection
    extends java.lang.Object
    A connection for a linked table. The same connection may be used for multiple tables, that means a connection may be shared.
    • Method Detail

      • open

        public static TableLinkConnection open​(java.util.HashMap<TableLinkConnection,​TableLinkConnection> map,
                                               java.lang.String driver,
                                               java.lang.String url,
                                               java.lang.String user,
                                               java.lang.String password,
                                               boolean shareLinkedConnections)
        Open a new connection.
        Parameters:
        map - the map where the connection should be stored (if shared connections are enabled).
        driver - the JDBC driver class name
        url - the database URL
        user - the username
        password - the password
        shareLinkedConnections - if connections should be shared
        Returns:
        a connection
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • setAutoCommit

        public void setAutoCommit​(boolean mode)
        Specify if the autocommit mode is activated or not
        Parameters:
        mode - to set
      • getAutocommit

        public boolean getAutocommit()
        The autocommit mode
        Returns:
        true if autocommit is on