01: /**
02: * EasyBeans
03: * Copyright (C) 2006 Bull S.A.S.
04: * Contact: easybeans@ow2.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or 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
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: Program.java 1970 2007-10-16 11:49:25Z benoitf $
23: * --------------------------------------------------------------------------
24: */package org.ow2.easybeans.tests.common.ejbs.entity.entitytest02;
25:
26: import javax.persistence.GeneratedValue;
27: import javax.persistence.GenerationType;
28: import javax.persistence.Id;
29: import javax.persistence.MappedSuperclass;
30: import javax.persistence.TableGenerator;
31:
32: /**
33: * The study program.
34: * @author Gisele Pinheiro Souza
35: * @author Eduardo Studzinski Estima de Castro
36: *
37: */
38: @MappedSuperclass
39: @TableGenerator(name="PROGRAM_SEQ",allocationSize=1)
40: public class Program {
41:
42: /**
43: * The program identifier.
44: */
45: private Long programId;
46:
47: /**
48: * The program name.
49: */
50: private String name;
51:
52: /**
53: * Returns the program name.
54: * @return the name.
55: */
56: public String getName() {
57: return name;
58: }
59:
60: /**
61: * Sets the program name.
62: * @param name the name.
63: */
64: public void setName(final String name) {
65: this .name = name;
66: }
67:
68: /**
69: * Returns the program identifier.
70: * @return the identifier.
71: */
72: @Id
73: @GeneratedValue(strategy=GenerationType.TABLE,generator="PROGRAM_SEQ")
74: public Long getProgramId() {
75: return programId;
76: }
77:
78: /**
79: * Sets the program identifier.
80: * @param programId the program identifier.
81: */
82: public void setProgramId(final Long programId) {
83: this.programId = programId;
84: }
85:
86: }
|