ca.sqlpower.architect.olap
Class MondrianModel.Hierarchy

java.lang.Object
  extended by ca.sqlpower.architect.olap.OLAPObject
      extended by ca.sqlpower.architect.olap.MondrianModel.Hierarchy
Enclosing class:
MondrianModel

public static class MondrianModel.Hierarchy
extends OLAPObject

Defines a hierarchy. You must specify at most one or memberReaderClass. If you specify none, the hierarchy is assumed to come from the same fact table of the current cube.


Field Summary
 
Fields inherited from class ca.sqlpower.architect.olap.OLAPObject
pcs
 
Constructor Summary
MondrianModel.Hierarchy()
          Creates a new Hierarchy with all attributes set to their defaults.
MondrianModel.Hierarchy(MondrianModel.Hierarchy original)
          Creates a new Hierarchy with all attributes copied from the given Hierarchy.
 
Method Summary
 void addChild(int index, OLAPObject child)
          Adds the given child or sets the appropriate property on this OLAPObject, allowing the overall target index to be specified.
 void addChild(OLAPObject child)
          Adds the given child or sets the appropriate property on this OLAPObject, if this type of OLAPObject has the applicable addXXX() or setXXX() method for the given object's type.
 void addLevel(int pos, MondrianModel.Level newChild)
          Adds the given child object at the specified position, firing an OLAPChildEvent.
 void addLevel(MondrianModel.Level newChild)
          Adds the given child object at the end of the child list, firing an OLAPChildEvent.
 void addMemberReaderParameter(int pos, MondrianModel.MemberReaderParameter newChild)
          Adds the given child object at the specified position, firing an OLAPChildEvent.
 void addMemberReaderParameter(MondrianModel.MemberReaderParameter newChild)
          Adds the given child object at the end of the child list, firing an OLAPChildEvent.
 boolean allowsChildren()
          Returns true if this type of OLAPObject can ever return a non-empty list from OLAPObject.getChildren(), and false if getChildren() is always empty.
 java.lang.String getAllLevelName()
           
 java.lang.String getAllMemberCaption()
           
 java.lang.String getAllMemberName()
           
 java.lang.String getCaption()
           
 java.util.List<OLAPObject> getChildren()
          Returns a read-only unified list of all children of this OLAPObject.
 java.lang.String getDefaultMember()
           
 java.lang.Boolean getHasAll()
           
 java.util.List<MondrianModel.Level> getLevels()
           
 java.lang.String getMemberReaderClass()
           
 java.util.List<MondrianModel.MemberReaderParameter> getMemberReaderParameters()
           
 java.lang.String getName()
          Default implementation.
 java.lang.String getPrimaryKey()
           
 java.lang.String getPrimaryKeyTable()
           
 MondrianModel.RelationOrJoin getRelation()
           
 boolean removeChild(OLAPObject child)
          Removes the given child on this OLAPObject if this type of OLAPObject has the applicable removeXXX() or setXXX(null) method for the given object's type.
 MondrianModel.Level removeLevel(int pos)
          Removes the child object at the given position, firing an OLAPChildEvent.
 boolean removeLevel(MondrianModel.Level removeChild)
          Removes the given child object, firing an OLAPChildEvent if the child was found.
 MondrianModel.MemberReaderParameter removeMemberReaderParameter(int pos)
          Removes the child object at the given position, firing an OLAPChildEvent.
 boolean removeMemberReaderParameter(MondrianModel.MemberReaderParameter removeChild)
          Removes the given child object, firing an OLAPChildEvent if the child was found.
 void setAllLevelName(java.lang.String newval)
           
 void setAllMemberCaption(java.lang.String newval)
           
 void setAllMemberName(java.lang.String newval)
           
 void setCaption(java.lang.String newval)
           
 void setDefaultMember(java.lang.String newval)
           
 void setHasAll(java.lang.Boolean newval)
           
 void setMemberReaderClass(java.lang.String newval)
           
 void setName(java.lang.String newval)
           
 void setPrimaryKey(java.lang.String newval)
           
 void setPrimaryKeyTable(java.lang.String newval)
           
 void setRelation(MondrianModel.RelationOrJoin newval)
           
 java.lang.String toString()
           
 
Methods inherited from class ca.sqlpower.architect.olap.OLAPObject
addChildListener, addCompoundEditListener, addPropertyChangeListener, endCompoundEdit, fireChildAdded, fireChildRemoved, getParent, removeChildListener, removeCompoundEditListener, removePropertyChangeListener, startCompoundEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MondrianModel.Hierarchy

public MondrianModel.Hierarchy()
Creates a new Hierarchy with all attributes set to their defaults.


MondrianModel.Hierarchy

public MondrianModel.Hierarchy(MondrianModel.Hierarchy original)
Creates a new Hierarchy with all attributes copied from the given Hierarchy.

Method Detail

toString

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

getName

public java.lang.String getName()
Description copied from class: OLAPObject
Default implementation. Subclasses that have actual names will override this method.

Overrides:
getName in class OLAPObject

setName

public void setName(java.lang.String newval)

getHasAll

public java.lang.Boolean getHasAll()

setHasAll

public void setHasAll(java.lang.Boolean newval)

getAllMemberName

public java.lang.String getAllMemberName()

setAllMemberName

public void setAllMemberName(java.lang.String newval)

getAllMemberCaption

public java.lang.String getAllMemberCaption()

setAllMemberCaption

public void setAllMemberCaption(java.lang.String newval)

getAllLevelName

public java.lang.String getAllLevelName()

setAllLevelName

public void setAllLevelName(java.lang.String newval)

getPrimaryKey

public java.lang.String getPrimaryKey()

setPrimaryKey

public void setPrimaryKey(java.lang.String newval)

getPrimaryKeyTable

public java.lang.String getPrimaryKeyTable()

setPrimaryKeyTable

public void setPrimaryKeyTable(java.lang.String newval)

getDefaultMember

public java.lang.String getDefaultMember()

setDefaultMember

public void setDefaultMember(java.lang.String newval)

getMemberReaderClass

public java.lang.String getMemberReaderClass()

setMemberReaderClass

public void setMemberReaderClass(java.lang.String newval)

getCaption

public java.lang.String getCaption()

setCaption

public void setCaption(java.lang.String newval)

getRelation

public MondrianModel.RelationOrJoin getRelation()

setRelation

public void setRelation(MondrianModel.RelationOrJoin newval)

addLevel

public void addLevel(int pos,
                     MondrianModel.Level newChild)
Adds the given child object at the specified position, firing an OLAPChildEvent.


addLevel

public void addLevel(MondrianModel.Level newChild)
Adds the given child object at the end of the child list, firing an OLAPChildEvent.


removeLevel

public boolean removeLevel(MondrianModel.Level removeChild)
Removes the given child object, firing an OLAPChildEvent if the child was found.

Returns:
true if the item was removed (because it was in the list); false if the item was not removed.

removeLevel

public MondrianModel.Level removeLevel(int pos)
Removes the child object at the given position, firing an OLAPChildEvent.

Returns:
The item that was removed.

getLevels

public java.util.List<MondrianModel.Level> getLevels()

addMemberReaderParameter

public void addMemberReaderParameter(int pos,
                                     MondrianModel.MemberReaderParameter newChild)
Adds the given child object at the specified position, firing an OLAPChildEvent.


addMemberReaderParameter

public void addMemberReaderParameter(MondrianModel.MemberReaderParameter newChild)
Adds the given child object at the end of the child list, firing an OLAPChildEvent.


removeMemberReaderParameter

public boolean removeMemberReaderParameter(MondrianModel.MemberReaderParameter removeChild)
Removes the given child object, firing an OLAPChildEvent if the child was found.

Returns:
true if the item was removed (because it was in the list); false if the item was not removed.

removeMemberReaderParameter

public MondrianModel.MemberReaderParameter removeMemberReaderParameter(int pos)
Removes the child object at the given position, firing an OLAPChildEvent.

Returns:
The item that was removed.

getMemberReaderParameters

public java.util.List<MondrianModel.MemberReaderParameter> getMemberReaderParameters()

getChildren

public java.util.List<OLAPObject> getChildren()
Description copied from class: OLAPObject
Returns a read-only unified list of all children of this OLAPObject. If this object doesn't have any children, returns an empty list.

Specified by:
getChildren in class OLAPObject

allowsChildren

public boolean allowsChildren()
Description copied from class: OLAPObject
Returns true if this type of OLAPObject can ever return a non-empty list from OLAPObject.getChildren(), and false if getChildren() is always empty.

Specified by:
allowsChildren in class OLAPObject

addChild

public void addChild(OLAPObject child)
Description copied from class: OLAPObject
Adds the given child or sets the appropriate property on this OLAPObject, if this type of OLAPObject has the applicable addXXX() or setXXX() method for the given object's type.

This method in the abstract base class always throws the IllegalArgumentException because no children or properties are defined at this level.

This method isn't compile-time type safe, so it is recommended not to use it on "by-hand" usage of this API. This method is used during XML parsing, which can't be made compile-time type safe anyway.

Overrides:
addChild in class OLAPObject
Parameters:
child - The child to add.

addChild

public void addChild(int index,
                     OLAPObject child)
Description copied from class: OLAPObject
Adds the given child or sets the appropriate property on this OLAPObject, allowing the overall target index to be specified.

This method in the abstract base class always throws IllegalArgumentException because no children or properties are defined at this level.

This method isn't compile-time type safe, so it is recommended not to use it on "by-hand" usage of this API. This method is used for undo and redo, which can't be compile-time type safe anyway.

Overrides:
addChild in class OLAPObject
Parameters:
index - The overall index (same index as would be in OLAPObject.getChildren()) at which to add the child.
child - The child to add.

removeChild

public boolean removeChild(OLAPObject child)
Description copied from class: OLAPObject
Removes the given child on this OLAPObject if this type of OLAPObject has the applicable removeXXX() or setXXX(null) method for the given object's type.

This method in the abstract base class always throws the IllegalArgumentException because no children or properties are defined at this level.

Overrides:
removeChild in class OLAPObject
Parameters:
child - The child to remove.


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca