KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jorm > runtime > multitable > Primitive_MT


1 /**
2  * JORM: an implementation of a generic mapping system for persistent Java
3  * objects. Two mapping are supported: to RDBMS and to binary files.
4  * Copyright (C) 2001-2003 France Telecom R&D - INRIA
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * Contact: jorm-team@objectweb.org
21  *
22  */

23
24 package org.objectweb.jorm.runtime.multitable;
25
26 import org.objectweb.jorm.pobject.multitable.Primitive_CN_MTAccessor;
27 import org.objectweb.jorm.pobject.multitable.Primitive_SN_MTAccessor;
28 import org.objectweb.jorm.api.PException;
29
30 /**
31  * @author S.Chassande-Barrioz
32  */

33
34 public class Primitive_MT
35     implements
36     Primitive_SN_MTAccessor,
37     Primitive_CN_MTAccessor {
38
39     public long f1 = 0;
40     public long f2 = 0;
41     public long f3 = 0;
42     public long f4 = 0;
43     public long f5 = 0;
44     public long f6 = 0;
45     public long f7 = 0;
46     public long f8 = 0;
47
48     public Primitive_MT() {
49     }
50
51     public void setFx(long f1, long f2, long f3, long f4, long f5, long f6,
52         long f7, long f8) {
53         this.f1 = f1;
54         this.f2 = f2;
55         this.f3 = f3;
56         this.f4 = f4;
57         this.f5 = f5;
58         this.f6 = f6;
59         this.f7 = f7;
60         this.f8 = f8;
61     }
62
63     public boolean equals(Object JavaDoc obj) {
64         Primitive_MT p = null;
65         return (obj instanceof Primitive_MT)
66             && (p = ((Primitive_MT) obj)) != null
67             && p.f1 == f1
68             && p.f2 == f2
69             && p.f3 == f3
70             && p.f4 == f4
71             && p.f5 == f5
72             && p.f6 == f6
73             && p.f7 == f7
74             && p.f8 == f8;
75     }
76
77     public String JavaDoc toString() {
78         return "Primitive_MT(" + f1 + ", " + f2 + ", " + f3 + ", " + f4
79             + ", " + f5 + ", " + f6 + ", " + f7 + ", " + f8 + ")";
80     }
81
82     //Accessors to the f5 field
83
public void paSetF5(long val) throws PException {
84         f5 = val;
85     }
86
87     public long paGetF5() throws PException {
88         return f5;
89     }
90
91     //Accessors to the f4 field
92
public void paSetF4(long val) throws PException {
93         f4 = val;
94     }
95
96     public long paGetF4() throws PException {
97         return f4;
98     }
99
100     //Accessors to the f3 field
101
public void paSetF3(long val) throws PException {
102         f3 = val;
103     }
104
105     public long paGetF3() throws PException {
106         return f3;
107     }
108
109     //Accessors to the f2 field
110
public void paSetF2(long val) throws PException {
111         f2 = val;
112     }
113
114     public long paGetF2() throws PException {
115         return f2;
116     }
117
118     //Accessors to the f1 field
119
public void paSetF1(long val) throws PException {
120         f1 = val;
121     }
122
123     public long paGetF1() throws PException {
124         return f1;
125     }
126
127     //Accessors to the f8 field
128
public void paSetF8(long val) throws PException {
129         f8 = val;
130     }
131
132     public long paGetF8() throws PException {
133         return f8;
134     }
135
136     //Accessors to the f7 field
137
public void paSetF7(long val) throws PException {
138         f7 = val;
139     }
140
141     public long paGetF7() throws PException {
142         return f7;
143     }
144
145     //Accessors to the f6 field
146
public void paSetF6(long val) throws PException {
147         f6 = val;
148     }
149
150     public long paGetF6() throws PException {
151         return f6;
152     }
153
154     public Object JavaDoc getMemoryInstance() {
155         return this;
156     }
157 }
158
Popular Tags