001    package com.sptci.rwt.webui.tree;
002    
003    import com.sptci.rwt.CatalogueMetaData;
004    
005    /**
006     * A {@link echopointng.tree.TreeNode} that represents a catalogue in the
007     * active database connection.  This class uses the {@link
008     * com.sptci.rwt.CatalogueMetaData} value object as the model.
009     *
010     * <p>&copy; Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
011     * @author Rakesh Vidyadharan 2007-10-23
012     * @version $Id: CatalogueNode.java 4123 2008-05-25 21:49:01Z rakesh $
013     * @since Version 1.1
014     */
015    public class CatalogueNode extends AbstractNode<CatalogueMetaData>
016    {
017      /**
018       * Create a new tree node using the specified metadata object.  The
019       * object represents a catalogue in the database.
020       *
021       * @param metadata The metadata object to use as the model for this node.
022       */
023      public CatalogueNode( final CatalogueMetaData metadata )
024      {
025        super( metadata );
026      }
027      
028      /**
029       * Create the child nodes for this node.  Child nodes are instances of
030       * {@link SchemaNode}.
031       *
032       * @see SchemaNode
033       * @see TablesNode
034       * @see ViewsNode
035       * @see ProceduresNode
036       * @see TriggersNode
037       */
038      protected void createChildren()
039      {
040        initialised = true;
041        add( new SchemasNode( getUserObject() ) );
042        add( new TablesNode( getUserObject() ) );
043        add( new ViewsNode( getUserObject() ) );
044        add( new ProceduresNode( getUserObject() ) );
045        add( new TriggersNode<CatalogueMetaData>( getUserObject() ) );
046        add( new SequencesNode( getUserObject() ) );
047      }
048    }