org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel
Class OjbMetaJdbcConnectionDescriptorNode

java.lang.Object
  extended byorg.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
      extended byorg.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaTreeNode
          extended byorg.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode
All Implemented Interfaces:
ActionTarget, java.lang.Comparable, PropertyEditorTarget, java.io.Serializable, javax.swing.tree.TreeNode

public class OjbMetaJdbcConnectionDescriptorNode
extends OjbMetaTreeNode

Author:
Administrator
See Also:
Serialized Form

Field Summary
static java.lang.String ATT_DATASOURCE_NAME
           
static java.lang.String ATT_DBALIAS
          Key for accessing the schema name in the attributes Map
static java.lang.String ATT_DBMS
           
static java.lang.String ATT_DESCRIPTOR_PBKEY
           
static java.lang.String ATT_DRIVER
           
static java.lang.String ATT_JDBC_LEVEL
           
static java.lang.String ATT_PASSWORD
           
static java.lang.String ATT_PROTOCOL
           
static java.lang.String ATT_SUBPROTOCOL
           
static java.lang.String ATT_USERNAME
           
 
Fields inherited from class org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaTreeNode
alChildren
 
Fields inherited from class org.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
propertyChangeDelegate
 
Constructor Summary
OjbMetaJdbcConnectionDescriptorNode(DescriptorRepository pRepository, OjbMetaDataTreeModel pTreeModel, OjbMetaTreeNode pparent, JdbcConnectionDescriptor pConnDescriptor)
          Creates a new instance of OjbMetaJdbcConnectionDescriptorNode
 
Method Summary
protected  boolean _load()
          Purpose of this method is to fill the children of the node.
 boolean actionListCachable()
          Some objects may alter the list of actions they present depending on the state they are in.
 boolean actionListStatic()
          Some objects may return a list of actions depending on the state they are in or the way they have been created.
 java.util.Iterator getActions()
          Get a bunch of java.util.Action objects that this object wants to offer in a context-menu.
 boolean getAllowsChildren()
           
 java.lang.Object getAssociatedDescriptor()
          Return the descriptor object this node is associated with.
 java.lang.Object getAttribute(java.lang.String key)
          Get an attribute of this node as Object.
 java.lang.Class getPropertyEditorClass()
          Return the property editor class for this PropertyEditorTarget.
 boolean isLeaf()
           
 void setAttribute(java.lang.String key, java.lang.Object value)
          Set an attribute of this node as Object.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaTreeNode
children, compareTo, getChildAt, getChildCount, getIndex, getOjbMetaTreeModel, getParent, getRepository, load
 
Methods inherited from class org.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATT_DBALIAS

public static final java.lang.String ATT_DBALIAS
Key for accessing the schema name in the attributes Map

See Also:
Constant Field Values

ATT_DBMS

public static final java.lang.String ATT_DBMS
See Also:
Constant Field Values

ATT_DATASOURCE_NAME

public static final java.lang.String ATT_DATASOURCE_NAME
See Also:
Constant Field Values

ATT_DRIVER

public static final java.lang.String ATT_DRIVER
See Also:
Constant Field Values

ATT_DESCRIPTOR_PBKEY

public static final java.lang.String ATT_DESCRIPTOR_PBKEY
See Also:
Constant Field Values

ATT_JDBC_LEVEL

public static final java.lang.String ATT_JDBC_LEVEL
See Also:
Constant Field Values

ATT_PASSWORD

public static final java.lang.String ATT_PASSWORD
See Also:
Constant Field Values

ATT_PROTOCOL

public static final java.lang.String ATT_PROTOCOL
See Also:
Constant Field Values

ATT_SUBPROTOCOL

public static final java.lang.String ATT_SUBPROTOCOL
See Also:
Constant Field Values

ATT_USERNAME

public static final java.lang.String ATT_USERNAME
See Also:
Constant Field Values
Constructor Detail

OjbMetaJdbcConnectionDescriptorNode

public OjbMetaJdbcConnectionDescriptorNode(DescriptorRepository pRepository,
                                           OjbMetaDataTreeModel pTreeModel,
                                           OjbMetaTreeNode pparent,
                                           JdbcConnectionDescriptor pConnDescriptor)
Creates a new instance of OjbMetaJdbcConnectionDescriptorNode

Method Detail

_load

protected boolean _load()
Purpose of this method is to fill the children of the node. It should replace all children in alChildren (the arraylist containing the children) of this node and notify the TreeModel that a change has occurred.

Specified by:
_load in class OjbMetaTreeNode

getAllowsChildren

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

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Description copied from class: EditableTreeNodeWithProperties
Get an attribute of this node as Object. This method is backed by a HashMap, so all rules of HashMap apply to this method.

Specified by:
getAttribute in interface PropertyEditorTarget
Overrides:
getAttribute in class EditableTreeNodeWithProperties

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.


isLeaf

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

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Description copied from class: EditableTreeNodeWithProperties
Set an attribute of this node as Object. This method is backed by a HashMap, so all rules of HashMap apply to this method. Fires a PropertyChangeEvent.

Specified by:
setAttribute in interface PropertyEditorTarget
Overrides:
setAttribute in class EditableTreeNodeWithProperties

toString

public java.lang.String toString()

getActions

public java.util.Iterator getActions()
Description copied from interface: ActionTarget
Get a bunch of java.util.Action objects that this object wants to offer in a context-menu.

Returns:
an Iterator containing all the actions.
See Also:
ActionTarget#getActions()

actionListCachable

public boolean actionListCachable()
Description copied from interface: ActionTarget
Some objects may alter the list of actions they present depending on the state they are in. If this method returns true, the list of actions can be cached (i.e. the resulting GUI object can be cached and doesn't have to be regenerated all the time)

Returns:
true if the result of getActions() may be cached.
See Also:
ActionTarget#actionListCacheable()

actionListStatic

public boolean actionListStatic()
Description copied from interface: ActionTarget
Some objects may return a list of actions depending on the state they are in or the way they have been created. Others always return the same list of actions without any dependency on the state. If this is the case, this method should return true. Other objects may cache the list of actions and the depending GUI objects on a per-class basis instead of a per-object basis. If this method returns true, actionListCacheable has to return true as well, otherwise it would not make any sense to cache the information here.


getAssociatedDescriptor

public java.lang.Object getAssociatedDescriptor()
Return the descriptor object this node is associated with. E.g. if the node displays a class descriptor, the ClassDescriptor describing the class should be returned. Used for creating a Transferable.

Specified by:
getAssociatedDescriptor in class OjbMetaTreeNode


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