You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by br...@apache.org on 2004/11/14 12:10:22 UTC
cvs commit: db-ojb/src/test/org/apache/ojb/broker MtoNMapping.java TreeTest.java
brj 2004/11/14 03:10:22
Modified: src/test/org/apache/ojb/broker MtoNMapping.java
TreeTest.java
Log:
use collection instead of vector
Revision Changes Path
1.27 +1 -1 db-ojb/src/test/org/apache/ojb/broker/MtoNMapping.java
Index: MtoNMapping.java
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/MtoNMapping.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- MtoNMapping.java 14 Sep 2004 16:46:08 -0000 1.26
+++ MtoNMapping.java 14 Nov 2004 11:10:21 -0000 1.27
@@ -273,7 +273,7 @@
Query q = QueryFactory.newQuery(p);
p = (Person) broker.getObjectByQuery(q);
- Vector roles = (Vector) p.getRoles();
+ Collection roles = p.getRoles();
assertNotNull(roles);
//System.out.println(roles);
1.10 +20 -18 db-ojb/src/test/org/apache/ojb/broker/TreeTest.java
Index: TreeTest.java
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/TreeTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TreeTest.java 31 May 2004 22:57:21 -0000 1.9
+++ TreeTest.java 14 Nov 2004 11:10:21 -0000 1.10
@@ -1,10 +1,12 @@
package org.apache.ojb.broker;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Vector;
+
import org.apache.ojb.broker.metadata.FieldDescriptor;
import org.apache.ojb.junit.PBTestCase;
-import java.util.Vector;
-
/**
* Testing selfjoins and tree structures
*/
@@ -225,7 +227,7 @@
private int id;
private String data;
private int parentId;
- private Vector childs;
+ private List childs;
/**
* Tree constructor comment.
@@ -247,7 +249,7 @@
public void addChild(Tree newChild)
{
- if (childs == null) childs = new Vector();
+ if (childs == null) childs = new ArrayList();
childs.add(newChild);
@@ -262,9 +264,9 @@
/**
* Insert the method's description here.
* Creation date: (13.02.2001 18:33:02)
- * @return java.util.Vector
+ * @return List
*/
- public java.util.Vector getChilds()
+ public List getChilds()
{
return childs;
}
@@ -379,11 +381,11 @@
private String data;
private int parentId;
- private Vector children;
+ private List children;
private TreeGroup myParent;
private int groupId;
- private Vector groupMembers;
+ private List groupMembers;
private TreeGroup myGroup;
@@ -433,9 +435,9 @@
/**
* Insert the method's description here.
* Creation date: (13.02.2001 18:33:02)
- * @return java.util.Vector
+ * @return List
*/
- public Vector getChilds()
+ public List getChilds()
{
return children;
}
@@ -479,9 +481,9 @@
/**
* Insert the method's description here.
* Creation date: (13.02.2001 18:33:02)
- * @return java.util.Vector
+ * @return List
*/
- public Vector getMembers()
+ public List getMembers()
{
return groupMembers;
}
@@ -581,9 +583,9 @@
}
/**
* Gets the children.
- * @return Returns a Vector
+ * @return Returns a List
*/
- public Vector getChildren()
+ public List getChildren()
{
return children;
}
@@ -592,16 +594,16 @@
* Sets the children.
* @param children The children to set
*/
- public void setChildren(Vector children)
+ public void setChildren(List children)
{
this.children = children;
}
/**
* Gets the groupMembers.
- * @return Returns a Vector
+ * @return Returns a List
*/
- public Vector getGroupMembers()
+ public List getGroupMembers()
{
return groupMembers;
}
@@ -610,7 +612,7 @@
* Sets the groupMembers.
* @param groupMembers The groupMembers to set
*/
- public void setGroupMembers(Vector groupMembers)
+ public void setGroupMembers(List groupMembers)
{
this.groupMembers = groupMembers;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org