|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.olap.OLAPObject
ca.sqlpower.architect.olap.OLAPSession
public class OLAPSession
The collection of objects that support editing and use of an OLAP schema. Contains the schema as its one and only child, and belongs to an OLAPRootObject.
| Field Summary |
|---|
| Fields inherited from class ca.sqlpower.architect.olap.OLAPObject |
|---|
pcs |
| Constructor Summary | |
|---|---|
OLAPSession(MondrianModel.Schema schema)
Creates the OLAP Session for the given schema. |
|
| Method Summary | |
|---|---|
void |
addChild(OLAPObject child)
Throws an exception, because you can't add or remove children from this type of OLAP Object. |
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.util.List<MondrianModel.Schema> |
getChildren()
Returns a list with exactly one entry: this session's schema. |
SQLDatabase |
getDatabase()
Returns the SQLDatabase this session's schema works with. |
MondrianModel.Schema |
getSchema()
Returns this session's schema. |
boolean |
removeChild(OLAPObject child)
Throws an exception, because you can't add or remove children from this type of OLAP Object. |
void |
setDatabase(SQLDatabase database)
Sets the SQLDatabase this session's schema works with. |
| Methods inherited from class ca.sqlpower.architect.olap.OLAPObject |
|---|
addChild, addChildListener, addCompoundEditListener, addPropertyChangeListener, endCompoundEdit, fireChildAdded, fireChildRemoved, getName, getParent, removeChildListener, removeCompoundEditListener, removePropertyChangeListener, startCompoundEdit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OLAPSession(MondrianModel.Schema schema)
schema - The schema this session owns.| Method Detail |
|---|
public SQLDatabase getDatabase()
public void setDatabase(SQLDatabase database)
Note that many parts of the OLAP model refer to tables, columns, views, and so on within one single database connection. Changing which database this session's schema works with is not possible, in general, without a lot of cleanup work. Currently, no effort is made in this method to validate that the new database has the appropriate structure.
Similarly, if the tables and columns within this database change over time, the OLAP schema may become invalid, since it will still be referencing the old objects. It would make sense for this session to attach SQLObjectPreEventListeners to the database and all its children, although this is not currently implemented.
database - The new database to use with this session's schema.public MondrianModel.Schema getSchema()
public boolean allowsChildren()
OLAPObjectOLAPObject.getChildren(), and false if getChildren() is always empty.
allowsChildren in class OLAPObjectpublic java.util.List<MondrianModel.Schema> getChildren()
getChildren in class OLAPObjectpublic void addChild(OLAPObject child)
addChild in class OLAPObjectchild - The child to add.public boolean removeChild(OLAPObject child)
removeChild in class OLAPObjectchild - The child to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||