com.sas.iquery.metadata.business
Class Drill

com.sas.iquery.metadata.business.Drill
All Implemented Interfaces:
Base, ModelItem, UsabilityInterface, PropertyChangeListenee, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener

public class Drill
implements java.lang.Cloneable

Stores drill history information for a cube inside a data selection.


Field Summary
 
Fields inherited from interface com.sas.iquery.metadata.business.ModelItem
EVENT_OBJECT_PROPERTY_CHANGED
 
Fields inherited from interface com.sas.iquery.metadata.business.Base
EVENT_OBJECT_DEFINITION_CHANGED
 
Constructor Summary
Drill(SelectedItem item, java.lang.String levelName, java.lang.String memberName, java.lang.String uniqueName)
          Construct a new drill object with the specified selected item and hierarchy information.
 
Method Summary
protected  void accumulateDirectlyReferencedItemsInDownwardDefinition(java.util.List intoList)
          Accumulates the AbstractModelItem items that this object directly references that make up it's "downward definition" into the given list.
protected  java.lang.String getDefinitionElementName()
          Every non-abstract object type that is persistable must be able to surface it's unique element name used for holding the object's definition.
 java.lang.String getLevelName()
           
 java.lang.String getMemberName()
           
 java.lang.String getUniqueName()
           
protected  void replaceDirectReferences(java.lang.Object oldObject, java.lang.Object newObject)
          IQ internal use only -- API users should not use.
 java.lang.String toString()
           
 
Methods inherited from interface com.sas.iquery.metadata.PropertyChangeListenee
addListener, getListeners, removeListener
 

Constructor Detail

Drill

public Drill(@Nonnull
             SelectedItem item,
             @Nonnull
             java.lang.String levelName,
             @Nonnull
             java.lang.String memberName,
             @Nonnull
             java.lang.String uniqueName)
Construct a new drill object with the specified selected item and hierarchy information.

Parameters:
item - SelectedItem
levelName - String
memberName - String
uniqueName - String
Method Detail

getLevelName

@Nonnull
public java.lang.String getLevelName()
Returns:
Returns the levelName.

getMemberName

@Nonnull
public java.lang.String getMemberName()
Returns:
Returns the memberName.

getUniqueName

@Nonnull
public java.lang.String getUniqueName()
Returns:
Returns the uniqueName.

getDefinitionElementName

protected java.lang.String getDefinitionElementName()
Every non-abstract object type that is persistable must be able to surface it's unique element name used for holding the object's definition.

Specified by:
getDefinitionElementName in class com.sas.iquery.metadata.business.impl.AbstractBase
Returns:
the element name to hold the definition of an object of this type.

accumulateDirectlyReferencedItemsInDownwardDefinition

protected void accumulateDirectlyReferencedItemsInDownwardDefinition(java.util.List intoList)
Description copied from class: AbstractBase
Accumulates the AbstractModelItem items that this object directly references that make up it's "downward definition" into the given list. This method is a key method in recursing down an object's definition as done via the getResources() and getReasonsUnusable() methods among others.

For this method, no objects should be added that cause an "upward reference" ... such as a column adding it's owning table or any other reference that may cause the interpretation of cycles within an object's definition. Duplicate object references should be accumulated by implementors of this method. It is OK to accumulate null references. One should only accumulate objects of type AbstractModelItem.

See the class documentation above for a definition and discussion on what encompasses an object's downward definition.

Specified by:
accumulateDirectlyReferencedItemsInDownwardDefinition in class com.sas.iquery.metadata.business.impl.AbstractBase

replaceDirectReferences

protected void replaceDirectReferences(java.lang.Object oldObject,
                                       java.lang.Object newObject)
Description copied from class: AbstractBase
IQ internal use only -- API users should not use.

When called, this object replaces any direct references it has to oldItem with newItem. The oldItem object should be compared using the == operator with any instance variables the object has and if oldItem is directly referenced, it should replace that reference with a reference to newItem.

Generally speaking, both items should be of the same type of class, though the implementation of this method does not check that. Note that there are cases where resource replacement logic temporarily sets proxy objects with this method and sets the real intended object quickly after that.

Implementors of this method should provide replacement to all objects that it references.

This is considered somewhat of a "raw" method in that it does just as it's advertised. If special replacement logic is needed for certain scenarios (e.g. replacing only a portion of the objects referenced at model reading time or resource replacement time, etc.) it's typically best to implement logic around this raw method either calling it conditionally or defining a new method for objects like replaceWhenReading() that by default calls into this method and can be overridden for certain specific uses.

Subclasses are encouraged to use the utility methods replace, replaceInList and replaceInJavaMap for replacing direct references to their instance variables.

Specified by:
replaceDirectReferences in class com.sas.iquery.metadata.business.impl.AbstractBase

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object



Copyright © 2009 SAS Institute Inc. All Rights Reserved.