01: /*
02: * Lesson.java
03: *
04: * Created on Jul 13, 2007, 9:17:25 AM
05: *
06: * To change this template, choose Tools | Templates
07: * and open the template in the editor.
08: */
09:
10: package it.biobytes.ammentos.test;
11:
12: import it.biobytes.ammentos.PersistentEntity;
13: import it.biobytes.ammentos.PersistentField;
14:
15: /**
16: *
17: * @author davide
18: */
19: @PersistentEntity(sourceDomain="lessons",primaryKey="teacher_id, course_id")
20: public class Lesson {
21: @PersistentField(fieldName="teacher_id")
22: private Teacher teacher;
23:
24: @PersistentField(fieldName="course_id")
25: private Course course;
26:
27: @PersistentField
28: private String topic;
29:
30: private Lesson() {
31: }
32:
33: public Lesson(Teacher teacher, Course course) {
34: this .teacher = teacher;
35: this .course = course;
36: }
37:
38: public Course getCourse() {
39: return course;
40: }
41:
42: public void setCourse(Course course) {
43: this .course = course;
44: }
45:
46: public String getTopic() {
47: return topic;
48: }
49:
50: public void setTopic(String topic) {
51: this .topic = topic;
52: }
53:
54: public Teacher getTeacher() {
55: return teacher;
56: }
57:
58: public void setTeacher(Teacher teacher) {
59: this.teacher = teacher;
60: }
61: }
|