Class RolapConnection

    • Field Detail

      • role

        protected Role role
    • Method Detail

      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • getId

        public int getId()
        Returns the identifier of this connection. Unique within the lifetime of this JVM.
        Returns:
        Identifier of this connection
      • createDataSource

        static javax.sql.DataSource createDataSource​(javax.sql.DataSource dataSource,
                                                     Util.PropertyList connectInfo,
                                                     java.lang.StringBuilder buf)
        Creates a JDBC data source from the JDBC credentials contained within a set of mondrian connection properties.

        This method is package-level so that it can be called from the RolapConnectionTest unit test.

        Parameters:
        dataSource - Anonymous data source from user, or null
        connectInfo - Mondrian connection properties
        buf - Into which method writes a description of the JDBC credentials
        Returns:
        Data source
      • close

        public void close()
        Description copied from interface: Connection
        Closes this Connection. You may not use this Connection after closing it.
      • getSchema

        public RolapSchema getSchema()
        Description copied from interface: Connection
        Get the Schema associated with this Connection.
        Returns:
        the Schema (never null).
      • getConnectString

        public java.lang.String getConnectString()
        Description copied from interface: Connection
        Get the Connect String associated with this Connection.
        Returns:
        the Connect String (never null).
      • getCatalogName

        public java.lang.String getCatalogName()
        Description copied from interface: Connection
        Get the name of the Catalog associated with this Connection.
        Returns:
        the Catalog name (never null).
      • getLocale

        public java.util.Locale getLocale()
        Description copied from interface: Connection
        Returns the locale this connection belongs to. Determines, for example, the currency string used in formatting cell values.
        See Also:
        Format
      • setLocale

        public void setLocale​(java.util.Locale locale)
      • getSchemaReader

        public SchemaReader getSchemaReader()
        Description copied from interface: Connection
        Returns a schema reader with access control appropriate to the current role.
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
        Description copied from interface: Connection
        Returns the value of a connection property.
        Parameters:
        name - Name of property, for example "JdbcUser".
        Returns:
        Value of property, or null if property is not defined.
      • getCacheControl

        public CacheControl getCacheControl​(java.io.PrintWriter pw)
        Description copied from interface: Connection
        Returns an object with which to explicitly control the contents of the cache.
        Parameters:
        pw - Writer to which to write logging information; may be null
      • setRole

        public void setRole​(Role role)
        Description copied from interface: Connection
        Sets the privileges for the this connection.
      • getRole

        public Role getRole()
        Description copied from interface: Connection
        Returns the access-control profile for this connection.
      • setScenario

        public void setScenario​(Scenario scenario)
      • getScenario

        public Scenario getScenario()
      • getServer

        public MondrianServer getServer()
        Returns the server (mondrian instance) that this connection belongs to. Usually there is only one server instance in a given JVM.
        Returns:
        Server instance; never null
      • parseStatement

        public QueryPart parseStatement​(java.lang.String query)
        Description copied from interface: Connection
        Parses a statement.
        Parameters:
        query - MDX string
        Returns:
        A Query if it is a SELECT statement, a DrillThrough if it is a DRILLTHROUGH statement
      • parseExpression

        public Exp parseExpression​(java.lang.String expr)
        Description copied from interface: Connection
        Parses an expresion.
      • getDataSource

        public javax.sql.DataSource getDataSource()
        Description copied from interface: Connection
        Returns the data source this connection uses to create connections to the underlying JDBC database.
        Returns:
        Data source