org.apache.ojb.tools.mapping.reversedb2.dbmetatreemodel
Class DBMetaCatalogNode

java.lang.Object
  extended byorg.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
      extended byorg.apache.ojb.tools.mapping.reversedb2.dbmetatreemodel.ReverseDbTreeNode
          extended byorg.apache.ojb.tools.mapping.reversedb2.dbmetatreemodel.DBMetaCatalogNode
All Implemented Interfaces:
PropertyEditorTarget, java.io.Serializable, javax.swing.tree.TreeNode

public class DBMetaCatalogNode
extends ReverseDbTreeNode
implements java.io.Serializable

This node represents a catalog of the database. Its children are DBMetaSchemaNode objects.

Version:
$Id: DBMetaCatalogNode.java,v 1.4 2004/01/07 11:41:20 thma Exp $
Author:
Florian Bruckner
See Also:
Serialized Form

Field Summary
static java.lang.String ATT_CATALOG_NAME
          Attribute key for the accessing the catalog name
(package private) static long serialVersionUID
           
 
Fields inherited from class org.apache.ojb.tools.mapping.reversedb2.dbmetatreemodel.ReverseDbTreeNode
alChildren
 
Fields inherited from class org.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
propertyChangeDelegate
 
Constructor Summary
DBMetaCatalogNode(java.sql.DatabaseMetaData pdbMeta, DatabaseMetaDataTreeModel pdbMetaTreeModel, DBMetaRootNode prootNode, java.lang.String pstrCatalogName)
          Creates a new instance of DBMetaCatalogNode.
 
Method Summary
protected  boolean _load()
          Loads the schemas associated to this catalog.
 boolean getAllowsChildren()
           
 java.lang.String getCatalogName()
          Convenience access method for the catalog name.
 java.lang.Class getPropertyEditorClass()
          Return the property editor class for this PropertyEditorTarget.
 boolean isLeaf()
           
 java.lang.String toString()
          If the catalog name is specified, returns the catalog name, otherwise a constant string indicating that the catalog name is emtpy (which is legal for some databases, e.g.
 
Methods inherited from class org.apache.ojb.tools.mapping.reversedb2.dbmetatreemodel.ReverseDbTreeNode
children, getChildAt, getChildCount, getDbMeta, getDbMetaTreeModel, getIndex, getParent, load, loadWait
 
Methods inherited from class org.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
addPropertyChangeListener, addPropertyChangeListener, getAttribute, removePropertyChangeListener, removePropertyChangeListener, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

ATT_CATALOG_NAME

public static final java.lang.String ATT_CATALOG_NAME
Attribute key for the accessing the catalog name

See Also:
Constant Field Values
Constructor Detail

DBMetaCatalogNode

public DBMetaCatalogNode(java.sql.DatabaseMetaData pdbMeta,
                         DatabaseMetaDataTreeModel pdbMetaTreeModel,
                         DBMetaRootNode prootNode,
                         java.lang.String pstrCatalogName)
Creates a new instance of DBMetaCatalogNode.

Parameters:
pdbMeta - DatabaseMetaData implementation where this node gets its data from.
pdbMetaTreeModel - The TreeModel this node is associated to.
prootNode - The parent node for this node.
pstrCatalogName - The name of the catalog this node is representing. Some databases do not supports catalogs, therefore null values are allowed for this parameter
Method Detail

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Specified by:
isLeaf in class ReverseDbTreeNode
See Also:
ReverseDbTreeNode.isLeaf()

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
Specified by:
getAllowsChildren in class ReverseDbTreeNode
See Also:
ReverseDbTreeNode.getAllowsChildren()

getCatalogName

public java.lang.String getCatalogName()
Convenience access method for the catalog name. Accesses the attributes HashMap to retrieve the value.


toString

public java.lang.String toString()
If the catalog name is specified, returns the catalog name, otherwise a constant string indicating that the catalog name is emtpy (which is legal for some databases, e.g. Oracle)

See Also:
Object.toString()

getPropertyEditorClass

public java.lang.Class getPropertyEditorClass()
Description copied from interface: PropertyEditorTarget
Return the property editor class for this PropertyEditorTarget. Depending on the GUI implementation this could for example be an extension of JPanel. The Property editor is responsible for the layout, so the property editor has to know which properties this target has.

Specified by:
getPropertyEditorClass in interface PropertyEditorTarget

_load

protected boolean _load()
Loads the schemas associated to this catalog.

Specified by:
_load in class ReverseDbTreeNode


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14