Skip to content

Commit

Permalink
ANALYZER-2188 - adding new methods to XmlaExtra
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurtis Walker committed Nov 26, 2013
1 parent dad5a17 commit 8f0f55f
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/main/java/mondrian/xmla/XmlaHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -3072,6 +3072,35 @@ Map<String, Object> getAnnotationMap(MetadataElement element)
*/
List<String> getKeywords();

/**
* Returns a boolean indicating if the specified
* cell can be drilled on.
*/
boolean canDrillThrough(Cell cell);

/**
* Returns the number of rows returned by a
* drillthrough on the specified cell. Will also
* return -1 if it cannot determine the cardinality.
*/
int getDrillThroughCount(Cell cell);

/**
* Makes the connection send a command to the server
* to flush all caches.
*/
void flushSchemaCache(OlapConnection conn) throws OlapException;

/**
* Returns the key for a given member.
*/
Object getMemberKey(Member m) throws OlapException;

/**
* Returns the ordering key for a given member.
*/
Object getOrderKey(Member m) throws OlapException;

class FunctionDefinition {
public final String functionName;
public final String description;
Expand Down Expand Up @@ -3245,6 +3274,28 @@ public String getPropertyValue(PropertyDefinition propertyDefinition) {
public List<String> getKeywords() {
return Collections.emptyList();
}

public boolean canDrillThrough(Cell cell) {
return false;
}

public int getDrillThroughCount(Cell cell) {
return -1;
}

public void flushSchemaCache(OlapConnection conn) throws OlapException{
// no op.
}

public Object getMemberKey(Member m) throws OlapException {
return
m.getPropertyValue(
Property.StandardMemberProperty.MEMBER_KEY);
}

public Object getOrderKey(Member m) throws OlapException {
return m.getOrdinal();
}
}

private static String createCsv(Iterable<? extends Object> iterable) {
Expand Down

0 comments on commit 8f0f55f

Please sign in to comment.