|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.rolap.RolapSchema
public class RolapSchema
A RolapSchema
is a collection of RolapCube
s and
shared RolapDimension
s. It is shared betweeen RolapConnection
s. It caches MemberReader
s, etc.
RolapConnection
Nested Class Summary | |
---|---|
(package private) static class |
RolapSchema.Pool
A collection of schemas, identified by their connection properties (catalog name, JDBC URL, and so forth). |
(package private) static class |
RolapSchema.RolapSchemaFunctionTable
Function table which contains all of the user-defined functions in this schema, plus all of the standard functions. |
(package private) class |
RolapSchema.RolapStarRegistry
RolapStarRegistry is a registry for RolapStar s. |
Field Summary | |
---|---|
(package private) RolapNativeRegistry |
nativeRegistry
|
(package private) List<RolapSchemaParameter> |
parameterList
|
Method Summary | |
---|---|
protected void |
addCube(RolapCube cube)
Adds a cube to the cube name map. |
static boolean |
cacheContains(RolapSchema rolapSchema)
|
void |
checkAggregateModifications()
Checks whether there are modifications in the aggregations cache. |
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. |
(package private) MemberReader |
createMemberReader(String sharedName,
RolapHierarchy hierarchy,
String memberReaderClass)
Gets a MemberReader with which to read a hierarchy. |
boolean |
equals(Object o)
|
(package private) void |
error(String message,
mondrian.rolap.RolapSchema.XmlLocation xmlLocation)
Reports an error. |
protected void |
finalCleanUp()
|
protected void |
finalize()
|
(package private) Integer |
getCachedRelationExprCardinality(MondrianDef.Relation relation,
MondrianDef.Expression columnExpr)
Returns the cached cardinality for the column. |
List<RolapCube> |
getCubeList()
|
Cube[] |
getCubes()
Returns a list of all cubes in this schema. |
List<RolapCube> |
getCubesWithStar(RolapStar star)
|
DataSourceChangeListener |
getDataSourceChangeListener()
|
(package private) RoleImpl |
getDefaultRole()
|
SqlQuery.Dialect |
getDialect()
Returns this schema's SQL dialect. |
FunTable |
getFunTable()
Returns this schema's function table. |
RolapConnection |
getInternalConnection()
Connection for purposes of parsing and validation. |
protected org.apache.log4j.Logger |
getLogger()
|
String |
getName()
Returns the name of this schema. |
NamedSet |
getNamedSet(String name)
|
(package private) RolapNativeRegistry |
getNativeRegistry()
|
Parameter[] |
getParameters()
Returns this schema's parameters. |
static Iterator<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. |
(package private) RolapHierarchy |
getSharedHierarchy(String name)
|
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)
Method called by all constructors to load the catalog into DOM and build application mdx and sql objects. |
(package private) mondrian.rolap.RolapSchema.XmlLocation |
locate(ElementDef node,
String attributeName)
Returns the location of an element or attribute in an XML document. |
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. |
void |
pushAggregateModificationsToGlobalCache()
Pushes all modifications of the aggregations to global cache, so other queries can start using the new cache |
(package private) void |
putCachedRelationExprCardinality(MondrianDef.Relation relation,
MondrianDef.Expression columnExpr,
Integer cardinality)
Sets the cardinality for a given column in cache. |
boolean |
removeCube(String cubeName)
Removes a cube. |
Set<String> |
roleNames()
|
void |
setDataSourceChangeListener(DataSourceChangeListener dataSourceChangeListener)
|
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final List<RolapSchemaParameter> parameterList
final RolapNativeRegistry nativeRegistry
Method Detail |
---|
protected void finalCleanUp()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
protected org.apache.log4j.Logger getLogger()
protected void load(String catalogUrl, String catalogStr)
catalogUrl
- URL of catalogcatalogStr
- Text of catalog, or nullpublic Date getSchemaLoadDate()
Schema
getSchemaLoadDate
in interface Schema
public List<Exception> getWarnings()
Schema
getWarnings
in interface Schema
RoleImpl getDefaultRole()
public MondrianDef.Schema getXMLSchema()
public String getName()
Schema
getName
in interface Schema
public SqlQuery.Dialect getDialect()
NOTE: This method is not cheap. The implementation gets a connection from the connection pool.
mondrian.rolap.RolapSchema.XmlLocation locate(ElementDef node, String attributeName)
TODO: modify eigenbase-xom parser to return position info
node
- NodeattributeName
- Attribute name, or null
void error(String message, mondrian.rolap.RolapSchema.XmlLocation xmlLocation)
RolapConnectionProperties.Ignore
), adds
it to the stack, overwise throws. A thrown exception will typically
abort the attempt to create the exception.
message
- MessagexmlLocation
- Location of XML element or attribute that caused
the error, or nullpublic Dimension createDimension(Cube cube, String xml)
Schema
createDimension
in interface Schema
public Cube createCube(String xml)
Schema
createCube
in interface Schema
public static Iterator<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)
public List<RolapCube> getCubesWithStar(RolapStar star)
protected void addCube(RolapCube cube)
lookupCube(String)
public boolean removeCube(String cubeName)
Schema
removeCube
in interface Schema
public Cube[] getCubes()
Schema
getCubes
in interface Schema
public List<RolapCube> getCubeList()
public Hierarchy[] getSharedHierarchies()
Schema
getSharedHierarchies
in interface Schema
RolapHierarchy getSharedHierarchy(String name)
public NamedSet getNamedSet(String name)
public Role lookupRole(String role)
Schema
null
if no such role exists.
lookupRole
in interface Schema
public Set<String> roleNames()
public FunTable getFunTable()
Schema
getFunTable
in interface Schema
public Parameter[] getParameters()
Schema
getParameters
in interface Schema
MemberReader createMemberReader(String sharedName, RolapHierarchy hierarchy, String memberReaderClass)
MemberReader
with which to read a hierarchy. If the
hierarchy is shared (sharedName
is not null), looks up
a reader from a cache, or creates one if necessary.
Synchronization: thread safe
public SchemaReader getSchemaReader()
Schema
SchemaReader
without any access control.
getSchemaReader
in interface Schema
public RolapConnection getInternalConnection()
Integer getCachedRelationExprCardinality(MondrianDef.Relation relation, MondrianDef.Expression columnExpr)
void putCachedRelationExprCardinality(MondrianDef.Relation relation, MondrianDef.Expression columnExpr, Integer cardinality)
relation
- the relation associated with the column expressioncolumnExpr
- the column expression to cache the cardinality forcardinality
- the cardinality for the column expressionpublic RolapSchema.RolapStarRegistry getRolapStarRegistry()
public RolapStar getStar(String factTableName)
public Collection<RolapStar> getStars()
public void checkAggregateModifications()
public void pushAggregateModificationsToGlobalCache()
RolapNativeRegistry getNativeRegistry()
public DataSourceChangeListener getDataSourceChangeListener()
public void setDataSourceChangeListener(DataSourceChangeListener dataSourceChangeListener)
dataSourceChangeListener
- The dataSourceChangeListener to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |