test.ojb.broker
Class Tree

java.lang.Object
  |
  +--test.ojb.broker.Tree
All Implemented Interfaces:
java.io.Serializable

public class Tree
extends java.lang.Object
implements java.io.Serializable

Tree is recursive type: a Tree element contains some data and a Vector of child Tree elements. This sample demonstrates what is needed to map such a data structure on a DB table

See Also:
Serialized Form

Constructor Summary
Tree()
          Tree constructor comment.
Tree(int id, java.lang.String data, int parentid)
          Tree constructor comment.
 
Method Summary
 void addChild(Tree newChild)
           
 Tree getChild(int index)
           
 java.util.Vector getChilds()
          Insert the method's description here.
 java.lang.String getData()
          Insert the method's description here.
 int getId()
          Insert the method's description here.
 int getParentId()
          Insert the method's description here.
 void setChilds(java.util.Vector newChilds)
          Insert the method's description here.
 void setData(java.lang.String newData)
          Insert the method's description here.
 void setId(int newId)
          Insert the method's description here.
 void setParentId(int newParentId)
          Insert the method's description here.
 int size()
          Insert the method's description here.
 java.lang.String toString()
          Insert the method's description here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tree

public Tree()
Tree constructor comment.


Tree

public Tree(int id,
            java.lang.String data,
            int parentid)
Tree constructor comment.

Method Detail

addChild

public void addChild(Tree newChild)

getChild

public Tree getChild(int index)

getChilds

public java.util.Vector getChilds()
Insert the method's description here. Creation date: (13.02.2001 18:33:02)

Returns:
java.util.Vector

getData

public java.lang.String getData()
Insert the method's description here. Creation date: (13.02.2001 18:33:02)

Returns:
java.lang.String

getId

public int getId()
Insert the method's description here. Creation date: (13.02.2001 18:33:02)

Returns:
int

getParentId

public int getParentId()
Insert the method's description here. Creation date: (13.02.2001 18:33:02)

Returns:
int

setChilds

public void setChilds(java.util.Vector newChilds)
Insert the method's description here. Creation date: (13.02.2001 18:33:02)

Parameters:
newChilds - java.util.Vector

setData

public void setData(java.lang.String newData)
Insert the method's description here. Creation date: (13.02.2001 18:33:02)

Parameters:
newData - java.lang.String

setId

public void setId(int newId)
Insert the method's description here. Creation date: (13.02.2001 18:33:02)

Parameters:
newId - int

setParentId

public void setParentId(int newParentId)
Insert the method's description here. Creation date: (13.02.2001 18:33:02)

Parameters:
newParentId - int

size

public int size()
Insert the method's description here. Creation date: (14.02.2001 19:51:23)

Returns:
int

toString

public java.lang.String toString()
Insert the method's description here. Creation date: (13.02.2001 18:33:41)

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String


Authors: Thomas Mahler and others. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.8.375, 2002-04-04