01: /* Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com
02:
03: This file is part of the db4o open source object database.
04:
05: db4o is free software; you can redistribute it and/or modify it under
06: the terms of version 2 of the GNU General Public License as published
07: by the Free Software Foundation and as clarified by db4objects' GPL
08: interpretation policy, available at
09: http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
10: Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
11: Suite 350, San Mateo, CA 94403, USA.
12:
13: db4o is distributed in the hope that it will be useful, but WITHOUT ANY
14: WARRANTY; without even the implied warranty of MERCHANTABILITY or
15: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16: for more details.
17:
18: You should have received a copy of the GNU General Public License along
19: with this program; if not, write to the Free Software Foundation, Inc.,
20: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21: package com.db4o.test.replication.old;
22:
23: import com.db4o.*;
24:
25: class R0Linker {
26:
27: R0 r0;
28: R1 r1;
29: R2 r2;
30: R3 r3;
31: R4 r4;
32:
33: R0Linker() {
34: r0 = new R0();
35: r1 = new R1();
36: r2 = new R2();
37: r3 = new R3();
38: r4 = new R4();
39: }
40:
41: void setNames(String name) {
42: r0.name = "0" + name;
43: r1.name = "1" + name;
44: r2.name = "2" + name;
45: r3.name = "3" + name;
46: r4.name = "4" + name;
47: }
48:
49: void linkCircles() {
50: linkList();
51: r1.circle1 = r0;
52: r2.circle2 = r0;
53: r3.circle3 = r0;
54: r4.circle4 = r0;
55: }
56:
57: void linkList() {
58: r0.r1 = r1;
59: r1.r2 = r2;
60: r2.r3 = r3;
61: r3.r4 = r4;
62: }
63:
64: void linkThis() {
65: r0.r0 = r0;
66: r1.r1 = r1;
67: r2.r2 = r2;
68: r3.r3 = r3;
69: r4.r4 = r4;
70: }
71:
72: void linkBack() {
73: r1.r0 = r0;
74: r2.r1 = r1;
75: r3.r2 = r2;
76: r4.r3 = r3;
77: }
78:
79: public void store(ObjectContainer oc) {
80: oc.set(r4);
81: oc.set(r3);
82: oc.set(r2);
83: oc.set(r1);
84: oc.set(r0);
85: }
86:
87: }
|