Class RolapSchema

    • Method Detail

      • flushSegments

        protected void flushSegments()
      • flushJdbcSchema

        protected void flushJdbcSchema()
        Clears the cache of JDBC tables for the aggs.
      • finalCleanUp

        protected void finalCleanUp()
        Performs a sweep of the JDBC tables caches and the segment data. Only called internally when a schema and it's data must be refreshed.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getLogger

        protected org.apache.logging.log4j.Logger getLogger()
      • load

        @Deprecated
        protected void load​(String catalogUrl,
                            String catalogStr)
        Deprecated.
        API changed to also pass Mondrian connection properties
        Parameters:
        catalogUrl - URL of catalog
        catalogStr - Text of catalog, or null
      • load

        protected void load​(String catalogUrl,
                            String catalogStr,
                            Util.PropertyList connectInfo)
        Method called by all constructors to load the catalog into DOM and build application mdx and sql objects.
        Parameters:
        catalogUrl - URL of catalog
        catalogStr - Text of catalog, or null
        connectInfo - Mondrian connection properties
      • getSchemaLoadDate

        public Date getSchemaLoadDate()
        Description copied from interface: Schema
        Returns when this schema was last loaded.
        Specified by:
        getSchemaLoadDate in interface Schema
        Returns:
        Date and time when this schema was last loaded
      • getWarnings

        public List<Exception> getWarnings()
        Description copied from interface: Schema
        Returns a list of warnings and errors that occurred while loading this schema.
        Specified by:
        getWarnings in interface Schema
        Returns:
        list of warnings
      • getDefaultRole

        public Role getDefaultRole()
      • getName

        public String getName()
        Description copied from interface: Schema
        Returns the name of this schema.
        Specified by:
        getName in interface Schema
      • getId

        public String getId()
        Returns this schema instance unique ID.
        Specified by:
        getId in interface Schema
        Returns:
        A string representing the schema ID.
      • getKey

        public SchemaKey getKey()
        Returns this schema instance unique key.
        Returns:
        a SchemaKey.
      • getAnnotationMap

        public Map<String,​Annotation> getAnnotationMap()
        Description copied from interface: Annotated
        Returns a list of annotations.

        The map may be empty, never null.

        Specified by:
        getAnnotationMap in interface Annotated
        Returns:
        Map from annotation name to annotations.
      • getDialect

        public Dialect getDialect()
        Returns this schema's SQL dialect.

        NOTE: This method is not cheap. The implementation gets a connection from the connection pool.

        Returns:
        dialect
      • createDimension

        public Dimension createDimension​(Cube cube,
                                         String xml)
        Description copied from interface: Schema
        Creates a dimension in the given cube by parsing an XML string. The XML string must be either a <Dimension> or a <DimensionUsage>. Returns the dimension created.
        Specified by:
        createDimension in interface Schema
      • createCube

        public Cube createCube​(String xml)
        Description copied from interface: Schema
        Creates a cube by parsing an XML string. Returns the cube created.
        Specified by:
        createCube in interface Schema
      • cacheContains

        public static boolean cacheContains​(RolapSchema rolapSchema)
      • lookupCube

        public Cube lookupCube​(String cube,
                               boolean failIfNotFound)
        Description copied from interface: Schema
        Finds a cube called cube in this schema; if no cube exists, failIfNotFound controls whether to raise an error or return null.
        Specified by:
        lookupCube in interface Schema
      • lookupCube

        protected RolapCube lookupCube​(String cubeName)
        Finds a cube called 'cube' in the current catalog, or return null if no cube exists.
      • lookupXmlCalculatedMember

        protected MondrianDef.CalculatedMember lookupXmlCalculatedMember​(String calcMemberName,
                                                                         String cubeName)
        Returns an xmlCalculatedMember called 'calcMemberName' in the cube called 'cubeName' or return null if no calculatedMember or xmlCube by those name exists.
      • removeCube

        public boolean removeCube​(String cubeName)
        Description copied from interface: Schema
        Removes a cube.
        Specified by:
        removeCube in interface Schema
        Returns:
        Whether cube was removed
      • getCubes

        public Cube[] getCubes()
        Description copied from interface: Schema
        Returns a list of all cubes in this schema.
        Specified by:
        getCubes in interface Schema
      • getSharedHierarchies

        public Hierarchy[] getSharedHierarchies()
        Description copied from interface: Schema
        Returns a list of shared dimensions in this schema.
        Specified by:
        getSharedHierarchies in interface Schema
      • getNamedSet

        public NamedSet getNamedSet​(org.olap4j.mdx.IdentifierSegment segment)
      • lookupRole

        public Role lookupRole​(String role)
        Description copied from interface: Schema
        Finds a role with a given name in the current catalog, or returns null if no such role exists.
        Specified by:
        lookupRole in interface Schema
      • getFunTable

        public FunTable getFunTable()
        Description copied from interface: Schema
        Returns this schema's function table.
        Specified by:
        getFunTable in interface Schema
      • getParameters

        public Parameter[] getParameters()
        Description copied from interface: Schema
        Returns this schema's parameters.
        Specified by:
        getParameters in interface Schema
      • getInternalConnection

        public RolapConnection getInternalConnection()
        Connection for purposes of parsing and validation. Careful! It won't have the correct locale or access-control profile.
      • getDataSourceChangeListener

        public DataSourceChangeListener getDataSourceChangeListener()
        Returns:
        Returns the dataSourceChangeListener.
      • setDataSourceChangeListener

        public void setDataSourceChangeListener​(DataSourceChangeListener dataSourceChangeListener)
        Parameters:
        dataSourceChangeListener - The dataSourceChangeListener to set.