ca.sqlpower.architect
Class SQLObjectRoot

java.lang.Object
  extended by ca.sqlpower.architect.SQLObject
      extended by ca.sqlpower.architect.SQLObjectRoot
All Implemented Interfaces:
java.io.Serializable

public class SQLObjectRoot
extends SQLObject

This is normally an invisible root node that contains SQLDatabase objects.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ca.sqlpower.architect.SQLObject
children, magicDisableCount, populated, undoEventListeners
 
Constructor Summary
SQLObjectRoot()
           
 
Method Summary
 boolean allowsChildren()
          Returns true if and only if this object can have child SQLObjects.
 java.lang.Class<? extends SQLObject> getChildType()
           
 java.lang.String getName()
          This is the name of the object.
 SQLObject getParent()
          Returns the parent of this SQLObject or null if it is a root object such as SQLDatabase.
 java.lang.String getShortDisplayName()
          Returns a short string that should be displayed to the user for representing this SQLObject as a label.
 boolean isPopulated()
          Tells if this object has already been filled with children, or if that operation is still pending.
 void populate()
          Causes this SQLObject to load its children (if any exist).
protected  void setParent(SQLObject newParent)
          Parents call this on their children to update parent pointers during addChild and removeChild requests.
 java.lang.String toString()
           
 
Methods inherited from class ca.sqlpower.architect.SQLObject
addChild, addChild, addChildImpl, addSQLObjectListener, addSQLObjectPreEventListener, addUndoEventListener, endCompoundEdit, fireDbChildInserted, fireDbChildPreRemove, fireDbChildRemoved, fireDbChildrenInserted, fireDbChildrenPreRemove, fireDbChildrenRemoved, fireDbObjectChanged, fireDbStructureChanged, getChild, getChildByName, getChildByNameIgnoreCase, getChildCount, getChildren, getIndexOfChildByName, getPhysicalName, getSQLObjectListeners, getSQLObjectPreEventListeners, getUndoEventListeners, isMagicEnabled, removeChild, removeChild, removeImpl, removeSQLObjectListener, removeSQLObjectPreEventListener, removeUndoEventListener, setMagicEnabled, setName, setPhysicalName, setPopulated, startCompoundEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLObjectRoot

public SQLObjectRoot()
Method Detail

getParent

public SQLObject getParent()
Description copied from class: SQLObject
Returns the parent of this SQLObject or null if it is a root object such as SQLDatabase.

Specified by:
getParent in class SQLObject

setParent

protected void setParent(SQLObject newParent)
Description copied from class: SQLObject
Parents call this on their children to update parent pointers during addChild and removeChild requests.

Specified by:
setParent in class SQLObject

getName

public java.lang.String getName()
Description copied from class: SQLObject
This is the name of the object. For tables, it returns the table name; for catalogs, the catalog name, and so on.

Overrides:
getName in class SQLObject

getShortDisplayName

public java.lang.String getShortDisplayName()
Description copied from class: SQLObject
Returns a short string that should be displayed to the user for representing this SQLObject as a label.

Specified by:
getShortDisplayName in class SQLObject

allowsChildren

public boolean allowsChildren()
Description copied from class: SQLObject
Returns true if and only if this object can have child SQLObjects. Your implementation of this method must not cause JDBC activity, or the lazy loading properties of your SQLObjects will be wasted! Typically, you will implement this with a hardcoded "return true" or "return false" depending on object type.

Specified by:
allowsChildren in class SQLObject

populate

public void populate()
              throws ArchitectException
Description copied from class: SQLObject
Causes this SQLObject to load its children (if any exist). This method will be called lots of times, so track whether or not you need to do anything and return right away whenever possible.

Specified by:
populate in class SQLObject
Throws:
ArchitectException

isPopulated

public boolean isPopulated()
Description copied from class: SQLObject
Tells if this object has already been filled with children, or if that operation is still pending.

Overrides:
isPopulated in class SQLObject

toString

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

getChildType

public java.lang.Class<? extends SQLObject> getChildType()
Specified by:
getChildType in class SQLObject


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