public class RolapSchema extends Object implements Schema
RolapSchema
is a collection of RolapCube
s and
shared RolapDimension
s. It is shared betweeen RolapConnection
s. It caches MemberReader
s, etc.RolapConnection
Modifier and Type | Class and Description |
---|---|
class |
RolapSchema.RolapStarRegistry
RolapStarRegistry is a registry for RolapStar s. |
Modifier and Type | Method and Description |
---|---|
protected void |
addCube(RolapCube cube)
Adds a cube to the cube name map.
|
static boolean |
cacheContains(RolapSchema rolapSchema) |
Cube |
createCube(String xml)
Creates a cube by parsing an XML string.
|
Dimension |
createDimension(Cube cube,
String xml)
Creates a dimension in the given cube by parsing an XML string.
|
boolean |
equals(Object o) |
protected void |
finalCleanUp()
Performs a sweep of the JDBC tables caches and the segment data.
|
protected void |
finalize() |
protected void |
flushJdbcSchema()
Clears the cache of JDBC tables for the aggs.
|
protected void |
flushSegments() |
Map<String,Annotation> |
getAnnotationMap()
Returns a list of annotations.
|
ByteString |
getChecksum()
Returns the checksum of this schema.
|
List<RolapCube> |
getCubeList() |
Cube[] |
getCubes()
Returns a list of all cubes in this schema.
|
List<RolapCube> |
getCubesWithStar(RolapStar star) |
DataSourceChangeListener |
getDataSourceChangeListener() |
Role |
getDefaultRole() |
Dialect |
getDialect()
Returns this schema's SQL dialect.
|
FunTable |
getFunTable()
Returns this schema's function table.
|
String |
getId()
Returns this schema instance unique ID.
|
RolapConnection |
getInternalConnection()
Connection for purposes of parsing and validation.
|
SchemaKey |
getKey()
Returns this schema instance unique key.
|
protected org.apache.log4j.Logger |
getLogger() |
String |
getName()
Returns the name of this schema.
|
NamedSet |
getNamedSet(org.olap4j.mdx.IdentifierSegment segment) |
NamedSet |
getNamedSet(String name) |
Parameter[] |
getParameters()
Returns this schema's parameters.
|
static List<RolapSchema> |
getRolapSchemas() |
RolapSchema.RolapStarRegistry |
getRolapStarRegistry() |
Date |
getSchemaLoadDate()
Returns when this schema was last loaded.
|
SchemaReader |
getSchemaReader()
Creates a
SchemaReader without any access control. |
Hierarchy[] |
getSharedHierarchies()
Returns a list of shared dimensions in this schema.
|
RolapStar |
getStar(List<String> starKey) |
RolapStar |
getStar(String factTableName) |
Collection<RolapStar> |
getStars() |
List<Exception> |
getWarnings()
Returns a list of warnings and errors that occurred while loading this
schema.
|
MondrianDef.Schema |
getXMLSchema() |
int |
hashCode() |
protected void |
load(String catalogUrl,
String catalogStr)
Deprecated.
API changed to also pass Mondrian connection properties
|
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.
|
protected RolapCube |
lookupCube(String cubeName)
Finds a cube called 'cube' in the current catalog, or return null if no
cube exists.
|
Cube |
lookupCube(String cube,
boolean failIfNotFound)
Finds a cube called
cube in this schema; if no cube
exists, failIfNotFound controls whether to raise an error
or return null . |
Role |
lookupRole(String role)
Finds a role with a given name in the current catalog, or returns
null if no such role exists. |
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.
|
boolean |
removeCube(String cubeName)
Removes a cube.
|
Set<String> |
roleNames() |
void |
setDataSourceChangeListener(DataSourceChangeListener dataSourceChangeListener) |
protected void flushSegments()
protected void flushJdbcSchema()
protected void finalCleanUp()
protected void finalize() throws Throwable
protected org.apache.log4j.Logger getLogger()
@Deprecated protected void load(String catalogUrl, String catalogStr)
catalogUrl
- URL of catalogcatalogStr
- Text of catalog, or nullprotected void load(String catalogUrl, String catalogStr, Util.PropertyList connectInfo)
catalogUrl
- URL of catalogcatalogStr
- Text of catalog, or nullconnectInfo
- Mondrian connection propertiespublic Date getSchemaLoadDate()
Schema
getSchemaLoadDate
in interface Schema
public List<Exception> getWarnings()
Schema
getWarnings
in interface Schema
public Role getDefaultRole()
public MondrianDef.Schema getXMLSchema()
public String getName()
Schema
public String getId()
public Map<String,Annotation> getAnnotationMap()
Annotated
The map may be empty, never null.
getAnnotationMap
in interface Annotated
public Dialect getDialect()
NOTE: This method is not cheap. The implementation gets a connection from the connection pool.
public Dimension createDimension(Cube cube, String xml)
Schema
createDimension
in interface Schema
public Cube createCube(String xml)
Schema
createCube
in interface Schema
public static List<RolapSchema> getRolapSchemas()
public static boolean cacheContains(RolapSchema rolapSchema)
public Cube lookupCube(String cube, boolean failIfNotFound)
Schema
cube
in this schema; if no cube
exists, failIfNotFound
controls whether to raise an error
or return null
.lookupCube
in interface Schema
protected RolapCube lookupCube(String cubeName)
protected MondrianDef.CalculatedMember lookupXmlCalculatedMember(String calcMemberName, String cubeName)
protected void addCube(RolapCube cube)
lookupCube(String)
public boolean removeCube(String cubeName)
Schema
removeCube
in interface Schema
public Cube[] getCubes()
Schema
public Hierarchy[] getSharedHierarchies()
Schema
getSharedHierarchies
in interface Schema
public NamedSet getNamedSet(org.olap4j.mdx.IdentifierSegment segment)
public Role lookupRole(String role)
Schema
null
if no such role exists.lookupRole
in interface Schema
public FunTable getFunTable()
Schema
getFunTable
in interface Schema
public Parameter[] getParameters()
Schema
getParameters
in interface Schema
public SchemaReader getSchemaReader()
Schema
SchemaReader
without any access control.getSchemaReader
in interface Schema
public ByteString getChecksum()
null
if RolapConnectionProperties.UseContentChecksum
is set to false.public RolapConnection getInternalConnection()
public RolapSchema.RolapStarRegistry getRolapStarRegistry()
public Collection<RolapStar> getStars()
public DataSourceChangeListener getDataSourceChangeListener()
public void setDataSourceChangeListener(DataSourceChangeListener dataSourceChangeListener)
dataSourceChangeListener
- The dataSourceChangeListener to set.Copyright © 2019 Hitachi Vantara. All rights reserved.