ca.sqlpower.wabit.rs.olap
Class WabitOlapAxis

java.lang.Object
  extended by ca.sqlpower.object.AbstractSPObject
      extended by ca.sqlpower.wabit.AbstractWabitObject
          extended by ca.sqlpower.wabit.rs.olap.WabitOlapAxis
All Implemented Interfaces:
ca.sqlpower.object.SPObject, WabitObject

public class WabitOlapAxis
extends AbstractWabitObject

Wrapper class to an Olap4j Dimension. Used to load and save Olap4j Dimensions.


Field Summary
 
Fields inherited from class ca.sqlpower.object.AbstractSPObject
uuid
 
Constructor Summary
WabitOlapAxis(org.olap4j.Axis ordinal)
          Creates a WabitOlapDimension with the given name.
WabitOlapAxis(org.olap4j.query.QueryAxis queryAxis)
          Creates a WabitOlapAxis to wrap the given QueryAxis.
WabitOlapAxis(WabitOlapAxis axis)
          Copy Constructor.
 
Method Summary
protected  void addChildImpl(ca.sqlpower.object.SPObject child, int index)
           
 void addDimension(WabitOlapDimension dimension)
          Adds an exclusion to this axis.
 void addDimension(WabitOlapDimension dimension, int index)
          Adds an exclusion to this axis at the given dimension.
 boolean allowsChildren()
           
 int childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)
           
 java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> getAllowedChildTypes()
           
 java.util.List<? extends WabitObject> getChildren()
           
 java.util.List<WabitObject> getDependencies()
          Olap wrapper classes only depend on the wrapped Olap4j objects
 java.util.List<WabitOlapDimension> getDimensions()
          Returns the list of dimensions
 org.olap4j.Axis getOrdinal()
           
 OlapQuery getParent()
          Returns the parent of this WabitObject.
 java.lang.String getSortEvaluationLiteral()
           
 java.lang.String getSortOrder()
           
 boolean isNonEmpty()
           
protected  boolean removeChildImpl(ca.sqlpower.object.SPObject child)
           
 void removeDependency(ca.sqlpower.object.SPObject dependency)
           
 void setNonEmpty(boolean nonEmpty)
           
 void setSortEvaluationLiteral(java.lang.String sortEvaluationLiteral)
           
 void setSortOrder(java.lang.String sortOrder)
           
 void updateChildren()
          Updates lists of children based on children of the wrapped Dimension.
 
Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject
cleanup, commit, equals, generateNewUUID, getSession, isForegroundThread, removeChild, rollback, runInBackground, runInForeground, toString
 
Methods inherited from class ca.sqlpower.object.AbstractSPObject
addChild, addSPListener, begin, fireChildAdded, fireChildRemoved, firePropertyChange, firePropertyChange, firePropertyChange, fireTransactionEnded, fireTransactionRollback, fireTransactionStarted, getChildren, getName, getUUID, removeSPListener, setName, setParent, setUUID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ca.sqlpower.object.SPObject
addChild, addSPListener, begin, getChildren, getName, getUUID, removeSPListener, setName, setParent, setUUID
 

Constructor Detail

WabitOlapAxis

public WabitOlapAxis(WabitOlapAxis axis)
Copy Constructor. Creates a deep copy of the given WabitOlapAxis and its children.


WabitOlapAxis

public WabitOlapAxis(org.olap4j.query.QueryAxis queryAxis)
Creates a WabitOlapAxis to wrap the given QueryAxis.


WabitOlapAxis

public WabitOlapAxis(org.olap4j.Axis ordinal)
Creates a WabitOlapDimension with the given name. Note that this creates an uninitialized wrapper, that is, it has no wrapped class until it is initialized. Until then, any getters will return cached values.

Method Detail

updateChildren

public void updateChildren()
Updates lists of children based on children of the wrapped Dimension. Calling this is the only way to make sure this wrapper is synchronized with the wrapped Dimension, and should be called any time something modifies the query's selections.


addDimension

public void addDimension(WabitOlapDimension dimension)
Adds an exclusion to this axis. Note that this will not affect the wrapped QueryAxis.


addDimension

public void addDimension(WabitOlapDimension dimension,
                         int index)
Adds an exclusion to this axis at the given dimension. Note that this will not affect the wrapped QueryAxis.


removeChildImpl

protected boolean removeChildImpl(ca.sqlpower.object.SPObject child)
Specified by:
removeChildImpl in class ca.sqlpower.object.AbstractSPObject

addChildImpl

protected void addChildImpl(ca.sqlpower.object.SPObject child,
                            int index)
Overrides:
addChildImpl in class ca.sqlpower.object.AbstractSPObject

allowsChildren

public boolean allowsChildren()

childPositionOffset

public int childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)

getChildren

public java.util.List<? extends WabitObject> getChildren()

getDependencies

public java.util.List<WabitObject> getDependencies()
Olap wrapper classes only depend on the wrapped Olap4j objects


removeDependency

public void removeDependency(ca.sqlpower.object.SPObject dependency)

getDimensions

public java.util.List<WabitOlapDimension> getDimensions()
Returns the list of dimensions


setNonEmpty

public void setNonEmpty(boolean nonEmpty)

isNonEmpty

public boolean isNonEmpty()

setSortOrder

public void setSortOrder(java.lang.String sortOrder)

getSortOrder

public java.lang.String getSortOrder()

setSortEvaluationLiteral

public void setSortEvaluationLiteral(java.lang.String sortEvaluationLiteral)

getSortEvaluationLiteral

public java.lang.String getSortEvaluationLiteral()

getOrdinal

public org.olap4j.Axis getOrdinal()

getParent

public OlapQuery getParent()
Description copied from interface: WabitObject
Returns the parent of this WabitObject. This will be null when the object is first created until it is added as a child to another object. If this object is never added as a child to another object this will remain null and the object may be treated as the root node of a WabitObject tree.

Specified by:
getParent in interface ca.sqlpower.object.SPObject
Specified by:
getParent in interface WabitObject
Overrides:
getParent in class AbstractWabitObject
Returns:
The parent of this object.

getAllowedChildTypes

public java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> getAllowedChildTypes()


Copyright © 2009. All Rights Reserved.