Source Code Cross Referenced for Class.java in  » J2EE » ow2-easybeans » org » ow2 » easybeans » tests » common » ejbs » entity » entitytest03 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » ow2 easybeans » org.ow2.easybeans.tests.common.ejbs.entity.entitytest03 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * EasyBeans
003:         * Copyright (C) 2006 Bull S.A.S.
004:         * Contact: easybeans@ow2.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * --------------------------------------------------------------------------
022:         * $Id: Class.java 1970 2007-10-16 11:49:25Z benoitf $
023:         * --------------------------------------------------------------------------
024:         */package org.ow2.easybeans.tests.common.ejbs.entity.entitytest03;
025:
026:        import java.util.Collection;
027:        import java.util.Date;
028:
029:        import javax.persistence.Entity;
030:        import javax.persistence.Id;
031:        import javax.persistence.IdClass;
032:        import javax.persistence.ManyToMany;
033:        import javax.persistence.ManyToOne;
034:        import javax.persistence.PrimaryKeyJoinColumn;
035:        import javax.persistence.Temporal;
036:        import javax.persistence.TemporalType;
037:
038:        /**
039:         * Contains the information about the class. Each course can have more than one class.
040:         * @author Gisele Pinheiro Souza
041:         * @author Eduardo Studzinski Estima de Castro
042:         *
043:         */
044:        /**
045:         * @author Gisele Pinheiro Souza
046:         * @author Eduardo Studzinski Estima de Castro
047:         *
048:         */
049:        @IdClass(ClassPK.class)
050:        @Entity
051:        @PrimaryKeyJoinColumn(name="course",referencedColumnName="courseId")
052:        public class Class {
053:
054:            /**
055:             * The course identifier.
056:             */
057:            private Course course;
058:
059:            /**
060:             * The class year.
061:             */
062:            private String classYear;
063:
064:            /**
065:             * The class name.
066:             */
067:            private String className;
068:
069:            /**
070:             * The class room.
071:             */
072:            private ClassRoom classRoom;
073:
074:            /**
075:             * The professor identifier.
076:             */
077:            private Professor professor;
078:
079:            /**
080:             * The class students.
081:             */
082:            private Collection<Student> students;
083:
084:            /**
085:             * The begin date for the class.
086:             */
087:            private Date startDate;
088:
089:            /**
090:             * The end date for the class.
091:             */
092:            private Date endDate;
093:
094:            /**
095:             * Returns the end date for the classes.
096:             * @return the date.
097:             */
098:            @Temporal(TemporalType.DATE)
099:            public Date getEndDate() {
100:                return endDate;
101:            }
102:
103:            /**
104:             * Sets the end date for the classes.
105:             * @param endDate the date.
106:             */
107:            public void setEndDate(final Date endDate) {
108:                this .endDate = endDate;
109:            }
110:
111:            /**
112:             * Returns the start date for the classes.
113:             * @return the date.
114:             */
115:            @Temporal(TemporalType.DATE)
116:            public Date getStartDate() {
117:                return startDate;
118:            }
119:
120:            /**
121:             * Sets the start date for the classes.
122:             * @param startDate the date.
123:             */
124:            public void setStartDate(final Date startDate) {
125:                this .startDate = startDate;
126:            }
127:
128:            /**
129:             * Returns the class room.
130:             * @return the room.
131:             */
132:            @ManyToOne
133:            public ClassRoom getClassRoom() {
134:                return classRoom;
135:            }
136:
137:            /**
138:             * Sets the class room.
139:             * @param classRoom the room.
140:             */
141:            public void setClassRoom(final ClassRoom classRoom) {
142:                this .classRoom = classRoom;
143:            }
144:
145:            /**
146:             * Sets the students that are in this class.
147:             * @param students the students.
148:             */
149:            public void setStudents(final Collection<Student> students) {
150:                this .students = students;
151:            }
152:
153:            /**
154:             * Returns the class name.
155:             * @return the name.
156:             */
157:            @Id
158:            public String getClassName() {
159:                return className;
160:            }
161:
162:            /**
163:             * Sets the class name.
164:             * @param className the name.
165:             */
166:            public void setClassName(final String className) {
167:                this .className = className;
168:            }
169:
170:            /**
171:             * Returns the class year.
172:             * @return the year.
173:             */
174:            @Id
175:            public String getClassYear() {
176:                return classYear;
177:            }
178:
179:            /**
180:             * Sets the class year.
181:             * @param classYear the year.
182:             */
183:            public void setClassYear(final String classYear) {
184:                this .classYear = classYear;
185:            }
186:
187:            /**
188:             * Returns the class course.
189:             * @return the course.
190:             */
191:            @ManyToOne
192:            public Course getCourse() {
193:                return course;
194:            }
195:
196:            /**
197:             * Sets the course.
198:             * @param course the course.
199:             */
200:            public void setCourse(final Course course) {
201:                this .course = course;
202:            }
203:
204:            /**
205:             * Returns the class professor.
206:             * @return the professor.
207:             */
208:            @ManyToOne
209:            public Professor getProfessor() {
210:                return professor;
211:            }
212:
213:            /**
214:             * Sets the class professor.
215:             * @param professor the professor.
216:             */
217:            public void setProfessor(final Professor professor) {
218:                this .professor = professor;
219:            }
220:
221:            /**
222:             * Returns the class students.
223:             * @return the students.
224:             */
225:            @ManyToMany(mappedBy="currentCours")
226:            public Collection<Student> getStudents() {
227:                return students;
228:            }
229:
230:        }
ww_w___.__j___a__v__a2___s__._co__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.