ca.sqlpower.wabit.swingui.olap.action
Class DrillUpAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by ca.sqlpower.wabit.swingui.olap.action.OlapQueryAction
          extended by ca.sqlpower.wabit.swingui.olap.action.MemberAction
              extended by ca.sqlpower.wabit.swingui.olap.action.DrillUpAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class DrillUpAction
extends MemberAction

A Member action that replaces the root of the hierarchy of the given member with that of the given ancestor member, and all ancestor members in all levels in between the target ancestor's level and the given member's level will be added to the query selection. Note that if the given ancestor member actually is not an ancestor, then the query will not be changed.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
DrillUpAction(WabitSwingSession session, OlapQuery query, org.olap4j.metadata.Member member, org.olap4j.metadata.Member targetAncestor)
           
 
Method Summary
protected  void performMemberAction(org.olap4j.metadata.Member member, OlapQuery query)
          Subclass hook.
 
Methods inherited from class ca.sqlpower.wabit.swingui.olap.action.MemberAction
getMember, performOlapQueryAction
 
Methods inherited from class ca.sqlpower.wabit.swingui.olap.action.OlapQueryAction
actionPerformed, getQuery
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrillUpAction

public DrillUpAction(WabitSwingSession session,
                     OlapQuery query,
                     org.olap4j.metadata.Member member,
                     org.olap4j.metadata.Member targetAncestor)
Parameters:
query - The query whose selection will be modified
member - The member whose ancestor Members will be added to the query selection
targetAncestor - The ancestor Member of member that will be set as the root selection in member's hierarchy
Method Detail

performMemberAction

protected void performMemberAction(org.olap4j.metadata.Member member,
                                   OlapQuery query)
                            throws QueryInitializationException
Description copied from class: MemberAction
Subclass hook. When implementing this method, manipulate the given member in the given query in whatever way makes sense for your specific action. Do not execute the query; this will be done after you return.

Specified by:
performMemberAction in class MemberAction
Parameters:
member - The member that was selected as the subject of this action.

This is the same member as returned by MemberAction.getMember(); it's provided for your convenience.

query - The query to manipulate. Don't execute it!

This is the same query as returned by OlapQueryAction.getQuery(); it's provided for your convenience.

Throws:
QueryInitializationException - If the query failed to initialize itself as a side effect of manipulating it.


Copyright © 2009. All Rights Reserved.