org.palo.api.ext.favoriteviews.impl
Class FavoriteViewImpl

java.lang.Object
  extended by org.palo.api.ext.favoriteviews.impl.FavoriteViewImpl
All Implemented Interfaces:
FavoriteView, FavoriteViewObject, NamedEntity

public class FavoriteViewImpl
extends java.lang.Object
implements FavoriteView

FavoriteViewImpl This class describes a favorite view. A favorite view has a name and a CubeView object attached. It also stores (for convenience) the identifying attributes of its cube view (database id, cube id and cube view name). In addition, a favorite view holds its own position in relation to its parent, so that the user can directly modify it (move it up or down).

Version:
$Id: FavoriteViewImpl.html,v 1.8 2009/07/09 11:01:47 ArndHouben Exp $

Constructor Summary
FavoriteViewImpl(java.lang.String name, CubeView view)
          Creates a new FavoriteView with a name and an attached cube view.
FavoriteViewImpl(java.lang.String name, CubeView view, int position)
          Creates a new FavoriteView with a name, an attached cube view, and a position.
 
Method Summary
 Connection getConnection()
          Returns the connection that belongs to the attached cube view.
 java.lang.String getCubeId()
          Returns the cube id of the attached cube view.
 CubeView getCubeView()
          Returns the cube view that is attached to this favorite view.
 java.lang.String getCubeViewName()
          Returns the name of the attached cube view.
 java.lang.String getDatabaseId()
          Returns the database id of the attached cube view.
 java.lang.String getName()
          Returns the name of this favorite view.
 int getPosition()
          Returns the position of this favorite view in relation to its parent.
 void setName(java.lang.String newName)
          Sets a new name for this favorite view.
 void setPosition(int newPosition)
          Sets a new position for this favorite view.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FavoriteViewImpl

public FavoriteViewImpl(java.lang.String name,
                        CubeView view)
Creates a new FavoriteView with a name and an attached cube view.

Parameters:
name - the name of the favorite view.
query - the attached cube view.

FavoriteViewImpl

public FavoriteViewImpl(java.lang.String name,
                        CubeView view,
                        int position)
Creates a new FavoriteView with a name, an attached cube view, and a position.

Parameters:
name - the name of the favorite view.
query - the attached cube view.
position - the position of this favorite view (the index to the array of children of its parent).
Method Detail

getName

public java.lang.String getName()
Returns the name of this favorite view.

Specified by:
getName in interface NamedEntity
Returns:
the name of the entity.

setName

public void setName(java.lang.String newName)
Sets a new name for this favorite view.

Specified by:
setName in interface FavoriteView
Parameters:
newName - the new name for this favorite view.

getPosition

public int getPosition()
Returns the position of this favorite view in relation to its parent.

Specified by:
getPosition in interface FavoriteView
Returns:
the position of this favorite view in relation to its parent.

setPosition

public void setPosition(int newPosition)
Sets a new position for this favorite view.

Specified by:
setPosition in interface FavoriteView
Parameters:
newPosition - the new position for this favorite view.

getCubeView

public CubeView getCubeView()
Returns the cube view that is attached to this favorite view.

Specified by:
getCubeView in interface FavoriteView
Returns:
the cube view that is attached to this favorite view.

getCubeId

public java.lang.String getCubeId()
Returns the cube id of the attached cube view.

Returns:
the cube id of the attached cube view.

getDatabaseId

public java.lang.String getDatabaseId()
Returns the database id of the attached cube view.

Returns:
the database id of the attached cube view.

getCubeViewName

public java.lang.String getCubeViewName()
Returns the name of the attached cube view.

Returns:
the name of the attached cube view.

getConnection

public Connection getConnection()
Returns the connection that belongs to the attached cube view.

Specified by:
getConnection in interface FavoriteViewObject
Returns:
the attached Connection object.