001 package com.sptci.rwt.webui.tree;
002
003 import com.sptci.rwt.TableMetaData;
004
005 /**
006 * A {@link echopointng.tree.TreeNode} that contains nodes that represent
007 * the various types of constraints defined on tables.
008 * This node uses a {@link TableMetaData} object as its model.
009 *
010 * <p>© Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
011 * @author Rakesh Vidyadharan 2007-09-28
012 * @version $Id: ConstraintsNode.java 4123 2008-05-25 21:49:01Z rakesh $
013 */
014 public class ConstraintsNode extends ContainerNode<TableMetaData>
015 {
016 /**
017 * Create a new tree node using the specified metadata object. The
018 * object represents a table in the database.
019 *
020 * @param metadata The metadata object to use as the model for this node.
021 */
022 public ConstraintsNode( final TableMetaData metadata )
023 {
024 super( metadata );
025 }
026
027 /**
028 * Create the child nodes for this node. Child nodes are instances of
029 * {@link ContainerNode}.
030 *
031 * @see PrimaryKeysNode
032 * @see ForeignKeysNode
033 */
034 protected void createChildren()
035 {
036 initialised = true;
037 add( new PrimaryKeysNode( metadata ) );
038 add( new ForeignKeysNode( metadata ) );
039 }
040 }