ca.sqlpower.wabit.rs.olap
Class WabitOlapSelection

java.lang.Object
  extended by ca.sqlpower.object.AbstractSPObject
      extended by ca.sqlpower.wabit.AbstractWabitObject
          extended by ca.sqlpower.wabit.rs.olap.WabitOlapSelection
All Implemented Interfaces:
ca.sqlpower.object.SPObject, WabitObject
Direct Known Subclasses:
WabitOlapExclusion, WabitOlapInclusion

public abstract class WabitOlapSelection
extends AbstractWabitObject

Wrapper class to wrap an Olap4j Selection, that is, an Inclusion or Exclusion.


Field Summary
protected  boolean initialized
           
protected  org.olap4j.query.Selection.Operator operator
           
protected  org.olap4j.query.Selection selection
          The Selection this class wraps.
protected  java.lang.String uniqueMemberName
           
 
Fields inherited from class ca.sqlpower.object.AbstractSPObject
uuid
 
Constructor Summary
WabitOlapSelection(org.olap4j.query.Selection.Operator operator, java.lang.String uniqueMemberName)
          Creates a new WabitOlapSelection with the given properties.
WabitOlapSelection(org.olap4j.query.Selection selection)
          Creates a new WabitOlapSelection to wrap the given Selection.
WabitOlapSelection(WabitOlapSelection selection)
          Copy Constructor.
 
Method Summary
 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()
          Selections are leaf nodes.
 java.util.List<WabitObject> getDependencies()
          Olap wrapper classes only depend on the wrapped Olap4j objects
 org.olap4j.query.Selection.Operator getOperator()
          Returns the Selection.Operator associated with the wrapped Selection, or the cached Operator if this object hasn't been initialized.
 java.lang.String getUniqueMemberName()
          Returns the unique member name associated with the wrapped Selection, or the cached Operator if this object hasn't been initialized.
 boolean isInitialized()
           
protected  boolean removeChildImpl(ca.sqlpower.object.SPObject child)
           
 void removeDependency(ca.sqlpower.object.SPObject dependency)
           
 
Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject
cleanup, commit, equals, generateNewUUID, getParent, getSession, isForegroundThread, removeChild, rollback, runInBackground, runInForeground, toString
 
Methods inherited from class ca.sqlpower.object.AbstractSPObject
addChild, addChildImpl, 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
 

Field Detail

selection

protected org.olap4j.query.Selection selection
The Selection this class wraps. Should not be leaked out of the wabit.olap package.


operator

protected final org.olap4j.query.Selection.Operator operator

uniqueMemberName

protected final java.lang.String uniqueMemberName

initialized

protected boolean initialized
Constructor Detail

WabitOlapSelection

public WabitOlapSelection(WabitOlapSelection selection)
Copy Constructor. Creates a new WabitOlapSelection with the same properties as the parameter.


WabitOlapSelection

public WabitOlapSelection(org.olap4j.query.Selection selection)
Creates a new WabitOlapSelection to wrap the given Selection.


WabitOlapSelection

public WabitOlapSelection(org.olap4j.query.Selection.Operator operator,
                          java.lang.String uniqueMemberName)
Creates a new WabitOlapSelection with the given properties. 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

removeChildImpl

protected boolean removeChildImpl(ca.sqlpower.object.SPObject child)
Specified by:
removeChildImpl 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()
Selections are leaf nodes.


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)

getOperator

public org.olap4j.query.Selection.Operator getOperator()
Returns the Selection.Operator associated with the wrapped Selection, or the cached Operator if this object hasn't been initialized.


getUniqueMemberName

public java.lang.String getUniqueMemberName()
Returns the unique member name associated with the wrapped Selection, or the cached Operator if this object hasn't been initialized.


isInitialized

public boolean isInitialized()

getAllowedChildTypes

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


Copyright © 2009. All Rights Reserved.