|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.xmla.Rowset
abstract class Rowset
Base class for an XML for Analysis schema rowset. A concrete derived class
should implement populate(mondrian.xmla.XmlaResponse, java.util.List
, calling addRow(mondrian.xmla.Rowset.Row, java.util.List
for each row.
RowsetDefinition
Nested Class Summary | |
---|---|
(package private) static class |
Rowset.RestrictionTest
Extensions to this abstract class implement a restriction test for each Rowset's discovery request. |
protected static class |
Rowset.Row
A set of name/value pairs, which can be output using addRow(mondrian.xmla.Rowset.Row, java.util.List . |
protected static class |
Rowset.XmlElement
Holder for non-scalar column values of a Rowset.Row . |
Field Summary | |
---|---|
protected XmlaHandler |
handler
|
protected static org.apache.log4j.Logger |
LOGGER
|
protected Map<String,String> |
properties
|
protected XmlaRequest |
request
|
protected Map<String,Object> |
restrictions
|
protected RowsetDefinition |
rowsetDefinition
|
Constructor Summary | |
---|---|
Rowset(RowsetDefinition definition,
XmlaRequest request,
XmlaHandler handler)
The exceptions thrown in this constructor are not produced during the execution of an XMLA request and so can be ordinary exceptions and not XmlaException (which are specifically for generating SOAP Fault xml). |
Method Summary | ||
---|---|---|
protected boolean |
addRow(Rowset.Row row,
List<Rowset.Row> rows)
Adds a Rowset.Row to a result, provided that it meets the necessary
criteria. |
|
protected void |
emit(Rowset.Row row,
XmlaResponse response)
Emits a row for this rowset, reading fields from a Rowset.Row object. |
|
(package private) Rowset.RestrictionTest |
getRestrictionTest(RowsetDefinition.Column column)
|
|
(package private) int |
getRestrictionValueAsInt(RowsetDefinition.Column column)
Returns a column's restriction as an int if it
exists, -1 otherwise. |
|
(package private) String |
getRestrictionValueAsString(RowsetDefinition.Column column)
Returns the restriction if it is a String, or null otherwise. |
|
protected boolean |
isRestricted(RowsetDefinition.Column column)
Returns true if there is a restriction for the given column definition. |
|
protected
|
populate(Class<E> clazz,
List<Rowset.Row> rows)
Populates all of the values in an enumeration into a list of rows. |
|
abstract void |
populate(XmlaResponse response,
List<Rowset.Row> rows)
Gathers the set of rows which match a given set of the criteria. |
|
protected ArrayList<RowsetDefinition.Column> |
pruneRestrictions(ArrayList<RowsetDefinition.Column> list)
|
|
protected void |
setProperty(PropertyDefinition propertyDef,
String value)
Sets a property for this rowset. |
|
void |
unparse(XmlaResponse response)
Writes the contents of this rowset as a series of SAX events. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger LOGGER
protected final RowsetDefinition rowsetDefinition
protected final Map<String,Object> restrictions
protected final Map<String,String> properties
protected final XmlaRequest request
protected final XmlaHandler handler
Constructor Detail |
---|
Rowset(RowsetDefinition definition, XmlaRequest request, XmlaHandler handler)
Method Detail |
---|
protected ArrayList<RowsetDefinition.Column> pruneRestrictions(ArrayList<RowsetDefinition.Column> list)
protected void setProperty(PropertyDefinition propertyDef, String value)
public final void unparse(XmlaResponse response) throws XmlaException
XmlaException
public abstract void populate(XmlaResponse response, List<Rowset.Row> rows) throws XmlaException
XmlaException
protected final boolean addRow(Rowset.Row row, List<Rowset.Row> rows) throws XmlaException
Rowset.Row
to a result, provided that it meets the necessary
criteria. Returns whether the row was added.
XmlaException
row
- Rowrows
- List of result rowsprotected void emit(Rowset.Row row, XmlaResponse response) throws XmlaException
Rowset.Row
object.
XmlaException
row
- Rowresponse
- XMLA response writerprotected <E extends Enum<E>> void populate(Class<E> clazz, List<Rowset.Row> rows) throws XmlaException
XmlaException
Rowset.RestrictionTest getRestrictionTest(RowsetDefinition.Column column)
String getRestrictionValueAsString(RowsetDefinition.Column column)
int getRestrictionValueAsInt(RowsetDefinition.Column column)
int
if it
exists, -1 otherwise.
protected boolean isRestricted(RowsetDefinition.Column column)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |