Package mondrian.olap4j
Class MondrianOlap4jExtra
- java.lang.Object
-
- mondrian.olap4j.MondrianOlap4jExtra
-
- All Implemented Interfaces:
XmlaHandler.XmlaExtra
class MondrianOlap4jExtra extends Object implements XmlaHandler.XmlaExtra
Provides access to internals of mondrian's olap4j driver that are not part of the olap4j API.- Since:
- Nov 12, 2010
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.xmla.XmlaHandler.XmlaExtra
XmlaHandler.XmlaExtra.FunctionDefinition
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static MondrianOlap4jExtraINSTANCE
-
Constructor Summary
Constructors Constructor Description MondrianOlap4jExtra()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDrillThrough(Cell cell)Returns a boolean indicating if the specified cell can be drilled on.voidcheckMemberOrdinal(Member member)ResultSetexecuteDrillthrough(OlapStatement olapStatement, String mdx, boolean advanced, String tabFields, int[] rowCountSlot)voidflushSchemaCache(OlapConnection conn)Makes the connection send a command to the server to flush all caches.Map<String,Object>getAnnotationMap(MetadataElement element)Returns a map containing annotations on this element.StringgetCubeType(Cube cube)List<Map<String,Object>>getDataSources(OlapConnection connection)Returns a list of the data sources in this server.intgetDrillThroughCount(Cell cell)Returns the number of rows returned by a drillthrough on the specified cell.intgetHierarchyCardinality(Hierarchy hierarchy)intgetHierarchyStructure(Hierarchy hierarchy)intgetLevelCardinality(Level level)List<Property>getLevelProperties(Level level)Returns the defined properties of a level.intgetMeasureAggregator(Member member)ObjectgetMemberKey(Member m)Returns the key for a given member.ObjectgetOrderKey(Member m)Returns the ordering key for a given member.voidgetSchemaFunctionList(List<XmlaHandler.XmlaExtra.FunctionDefinition> funDefs, Schema schema, Util.Functor1<Boolean,String> functionFilter)StringgetSchemaId(Schema schema)Returns the unique ID of a schema.DategetSchemaLoadDate(Schema schema)List<String>getSchemaRoleNames(Schema schema)Returns a list of names of roles in the given schema to which the current user belongs.booleanisHierarchyParentChild(Hierarchy hierarchy)booleanisLevelUnique(Level level)booleanisPropertyInternal(Property property)voidsetPreferList(OlapConnection connection)booleanshouldReturnCellProperty(CellSet cellSet, Property cellProperty, boolean evenEmpty)Returns whether we should return a cell property in the XMLA result.
-
-
-
Field Detail
-
INSTANCE
static final MondrianOlap4jExtra INSTANCE
-
-
Method Detail
-
executeDrillthrough
public ResultSet executeDrillthrough(OlapStatement olapStatement, String mdx, boolean advanced, String tabFields, int[] rowCountSlot) throws SQLException
- Specified by:
executeDrillthroughin interfaceXmlaHandler.XmlaExtra- Throws:
SQLException
-
setPreferList
public void setPreferList(OlapConnection connection)
- Specified by:
setPreferListin interfaceXmlaHandler.XmlaExtra
-
getSchemaLoadDate
public Date getSchemaLoadDate(Schema schema)
- Specified by:
getSchemaLoadDatein interfaceXmlaHandler.XmlaExtra
-
getLevelCardinality
public int getLevelCardinality(Level level) throws OlapException
- Specified by:
getLevelCardinalityin interfaceXmlaHandler.XmlaExtra- Throws:
OlapException
-
getSchemaFunctionList
public void getSchemaFunctionList(List<XmlaHandler.XmlaExtra.FunctionDefinition> funDefs, Schema schema, Util.Functor1<Boolean,String> functionFilter)
- Specified by:
getSchemaFunctionListin interfaceXmlaHandler.XmlaExtra
-
getHierarchyCardinality
public int getHierarchyCardinality(Hierarchy hierarchy) throws OlapException
- Specified by:
getHierarchyCardinalityin interfaceXmlaHandler.XmlaExtra- Throws:
OlapException
-
getHierarchyStructure
public int getHierarchyStructure(Hierarchy hierarchy)
- Specified by:
getHierarchyStructurein interfaceXmlaHandler.XmlaExtra
-
isHierarchyParentChild
public boolean isHierarchyParentChild(Hierarchy hierarchy)
- Specified by:
isHierarchyParentChildin interfaceXmlaHandler.XmlaExtra
-
getMeasureAggregator
public int getMeasureAggregator(Member member)
- Specified by:
getMeasureAggregatorin interfaceXmlaHandler.XmlaExtra
-
checkMemberOrdinal
public void checkMemberOrdinal(Member member) throws OlapException
- Specified by:
checkMemberOrdinalin interfaceXmlaHandler.XmlaExtra- Throws:
OlapException
-
shouldReturnCellProperty
public boolean shouldReturnCellProperty(CellSet cellSet, Property cellProperty, boolean evenEmpty)
Description copied from interface:XmlaHandler.XmlaExtraReturns whether we should return a cell property in the XMLA result.- Specified by:
shouldReturnCellPropertyin interfaceXmlaHandler.XmlaExtra- Parameters:
cellSet- Cell setcellProperty- Cell property definitionevenEmpty- Whether to return even if cell has no properties- Returns:
- Whether to return cell property in XMLA result
-
getSchemaRoleNames
public List<String> getSchemaRoleNames(Schema schema)
Description copied from interface:XmlaHandler.XmlaExtraReturns a list of names of roles in the given schema to which the current user belongs.- Specified by:
getSchemaRoleNamesin interfaceXmlaHandler.XmlaExtra- Parameters:
schema- Schema- Returns:
- List of roles
-
getSchemaId
public String getSchemaId(Schema schema)
Description copied from interface:XmlaHandler.XmlaExtraReturns the unique ID of a schema.- Specified by:
getSchemaIdin interfaceXmlaHandler.XmlaExtra
-
getCubeType
public String getCubeType(Cube cube)
- Specified by:
getCubeTypein interfaceXmlaHandler.XmlaExtra
-
isLevelUnique
public boolean isLevelUnique(Level level)
- Specified by:
isLevelUniquein interfaceXmlaHandler.XmlaExtra
-
getLevelProperties
public List<Property> getLevelProperties(Level level)
Description copied from interface:XmlaHandler.XmlaExtraReturns the defined properties of a level. (Not including system properties that every level has.)- Specified by:
getLevelPropertiesin interfaceXmlaHandler.XmlaExtra- Parameters:
level- Level- Returns:
- Defined properties
-
isPropertyInternal
public boolean isPropertyInternal(Property property)
- Specified by:
isPropertyInternalin interfaceXmlaHandler.XmlaExtra
-
getDataSources
public List<Map<String,Object>> getDataSources(OlapConnection connection) throws OlapException
Description copied from interface:XmlaHandler.XmlaExtraReturns a list of the data sources in this server. One element per data source, each element a map whose keys are the XMLA fields describing a data source: "DataSourceName", "DataSourceDescription", "URL", etc. Unrecognized fields are ignored.- Specified by:
getDataSourcesin interfaceXmlaHandler.XmlaExtra- Parameters:
connection- Connection- Returns:
- List of data source definitions
- Throws:
OlapException- on error
-
getAnnotationMap
public Map<String,Object> getAnnotationMap(MetadataElement element) throws SQLException
Description copied from interface:XmlaHandler.XmlaExtraReturns a map containing annotations on this element.- Specified by:
getAnnotationMapin interfaceXmlaHandler.XmlaExtra- Parameters:
element- Element- Returns:
- Annotation map, never null
- Throws:
SQLException
-
canDrillThrough
public boolean canDrillThrough(Cell cell)
Description copied from interface:XmlaHandler.XmlaExtraReturns a boolean indicating if the specified cell can be drilled on.- Specified by:
canDrillThroughin interfaceXmlaHandler.XmlaExtra
-
getDrillThroughCount
public int getDrillThroughCount(Cell cell)
Description copied from interface:XmlaHandler.XmlaExtraReturns the number of rows returned by a drillthrough on the specified cell. Will also return -1 if it cannot determine the cardinality.- Specified by:
getDrillThroughCountin interfaceXmlaHandler.XmlaExtra
-
flushSchemaCache
public void flushSchemaCache(OlapConnection conn) throws OlapException
Description copied from interface:XmlaHandler.XmlaExtraMakes the connection send a command to the server to flush all caches.- Specified by:
flushSchemaCachein interfaceXmlaHandler.XmlaExtra- Throws:
OlapException
-
getMemberKey
public Object getMemberKey(Member m) throws OlapException
Description copied from interface:XmlaHandler.XmlaExtraReturns the key for a given member.- Specified by:
getMemberKeyin interfaceXmlaHandler.XmlaExtra- Throws:
OlapException
-
getOrderKey
public Object getOrderKey(Member m) throws OlapException
Description copied from interface:XmlaHandler.XmlaExtraReturns the ordering key for a given member.- Specified by:
getOrderKeyin interfaceXmlaHandler.XmlaExtra- Throws:
OlapException
-
-