01: /*
02: * Copyright 2006 Davide Deidda
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: /*
18: * Mark.java
19: *
20: * Created on 11 November 2005, 09:28
21: *
22: * To change this template, choose Tools | Template Manager
23: * and open the template in the editor.
24: */
25:
26: package it.biobytes.ammentos.test;
27:
28: import it.biobytes.ammentos.*;
29:
30: @PersistentEntity(sourceDomain="marks",primaryKey="id")
31: public class Mark {
32:
33: /** Creates a new instance of Mark */
34: public Mark(Course course, Student student, double value) {
35: this .course = course;
36: this .student = student;
37: this .value = value;
38: this .floatValue = (float) value;
39: }
40:
41: private Mark() {
42: }
43:
44: @PersistentField(automatic=true)
45: private String id;
46:
47: @PersistentField(fieldName="course_id")
48: private Course course;
49:
50: @PersistentField(fieldName="student_id")
51: private Student student;
52:
53: @PersistentField
54: private double value;
55:
56: @PersistentField
57: private float floatValue;
58:
59: public double getValue() {
60: return value;
61: }
62:
63: public float getFloatValue() {
64: return floatValue;
65: }
66: }
|