org.apache.ojb.broker
Class TreeTest.TreeGroup

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

public static class TreeTest.TreeGroup
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.TreeGroup()
          Tree constructor comment.
TreeTest.TreeGroup(int id, java.lang.String data, int parentid, int groupid)
          Tree constructor comment.
 
Method Summary
 void addChild(TreeTest.TreeGroup newChild)
           
 void addMember(TreeTest.TreeGroup newMember)
           
 TreeTest.TreeGroup getChild(int index)
           
 java.util.Vector getChildren()
          Gets the children.
 java.util.Vector getChilds()
          Insert the method's description here.
 java.lang.String getData()
          Insert the method's description here.
 int getGroupId()
          Insert the method's description here.
 java.util.Vector getGroupMembers()
          Gets the groupMembers.
 int getId()
          Insert the method's description here.
 TreeTest.TreeGroup getMember(int index)
           
 java.util.Vector getMembers()
          Insert the method's description here.
 TreeTest.TreeGroup getMyGroup()
          Gets the myGroup.
 TreeTest.TreeGroup getMyParent()
          Gets the myParent.
 int getParentId()
          Insert the method's description here.
 void setChildren(java.util.Vector children)
          Sets the children.
 void setChilds(java.util.Vector newChilds)
          Insert the method's description here.
 void setData(java.lang.String data)
          Sets the data.
 void setGroupId(int groupId)
          Sets the groupId.
 void setGroupMembers(java.util.Vector groupMembers)
          Sets the groupMembers.
 void setId(int id)
          Sets the id.
 void setMembers(java.util.Vector newMembers)
          Insert the method's description here.
 void setMyGroup(TreeTest.TreeGroup myGroup)
          Sets the myGroup.
 void setMyParent(TreeTest.TreeGroup myParent)
          Sets the myParent.
 void setParentId(int parentId)
          Sets the parentId.
 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.TreeGroup

public TreeTest.TreeGroup()
Tree constructor comment.


TreeTest.TreeGroup

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

Method Detail

addChild

public void addChild(TreeTest.TreeGroup newChild)

addMember

public void addMember(TreeTest.TreeGroup newMember)

getChild

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

getGroupId

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

Returns:
int

getId

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

Returns:
int

getMember

public TreeTest.TreeGroup getMember(int index)

getMembers

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

Returns:
java.util.Vector

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 data)
Sets the data.

Parameters:
data - The data to set

setGroupId

public void setGroupId(int groupId)
Sets the groupId.

Parameters:
groupId - The groupId to set

setId

public void setId(int id)
Sets the id.

Parameters:
id - The id to set

setMembers

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

Parameters:
newMembers - java.util.Vector

setParentId

public void setParentId(int parentId)
Sets the parentId.

Parameters:
parentId - The parentId to set

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

getChildren

public java.util.Vector getChildren()
Gets the children.

Returns:
Returns a Vector

setChildren

public void setChildren(java.util.Vector children)
Sets the children.

Parameters:
children - The children to set

getGroupMembers

public java.util.Vector getGroupMembers()
Gets the groupMembers.

Returns:
Returns a Vector

setGroupMembers

public void setGroupMembers(java.util.Vector groupMembers)
Sets the groupMembers.

Parameters:
groupMembers - The groupMembers to set

getMyGroup

public TreeTest.TreeGroup getMyGroup()
Gets the myGroup.

Returns:
Returns a TreeGroup

setMyGroup

public void setMyGroup(TreeTest.TreeGroup myGroup)
Sets the myGroup.

Parameters:
myGroup - The myGroup to set

getMyParent

public TreeTest.TreeGroup getMyParent()
Gets the myParent.

Returns:
Returns a TreeGroup

setMyParent

public void setMyParent(TreeTest.TreeGroup myParent)
Sets the myParent.

Parameters:
myParent - The myParent to set


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