org.apache.ojb.broker
Class TreeTest.Tree

java.lang.Object
  extended byorg.apache.ojb.broker.TreeTest.Tree
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
TreeTest

public static class TreeTest.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

Author:
Thomas Mahler
See Also:
Serialized Form

Constructor Summary
TreeTest.Tree()
          Tree constructor comment.
TreeTest.Tree(int id, java.lang.String data, int parentid)
          Tree constructor comment.
 
Method Summary
 void addChild(TreeTest.Tree newChild)
           
 TreeTest.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

TreeTest.Tree

public TreeTest.Tree()
Tree constructor comment.


TreeTest.Tree

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

Method Detail

addChild

public void addChild(TreeTest.Tree newChild)

getChild

public TreeTest.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)

Returns:
java.lang.String


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