KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > entity > geometricforms > Rectangle


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
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.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: Rectangle.java 1102 2006-08-16 13:07:26Z benoitf $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.entity.geometricforms;
26
27 import javax.persistence.Entity;
28 import javax.persistence.EntityListeners;
29 import javax.persistence.TableGenerator;
30
31 import org.objectweb.easybeans.tests.common.listeners.FormsListener01;
32 import org.objectweb.easybeans.tests.common.listeners.FormsListener02;
33
34 /**
35  * Representas a rectangle.
36  * @author Gisele Pinheiro Souza
37  * @author Eduardo Studzinski Estima de Castro
38  *
39  */

40 @Entity
41 @EntityListeners({FormsListener01.class, FormsListener02.class })
42 @TableGenerator(name = "ID_SEQ", allocationSize = 1)
43 public class Rectangle extends Form {
44
45     /**
46      * A retangle side.
47      */

48     private float side1;
49
50     /**
51      * A retangle side.
52      */

53     private float side2;
54
55     /**
56      * Gets a retangle side.
57      * @return the side.
58      */

59     public float getSide1() {
60         return side1;
61     }
62
63     /**
64      * Sets a retangle side.
65      * @param side1 the side.
66      */

67     public void setSide1(final float side1) {
68         this.side1 = side1;
69     }
70
71     /**
72      * Gets a retangle side.
73      * @return the side.
74      */

75     public float getSide2() {
76         return side2;
77     }
78
79     /**
80      * Sets a retangle side.
81      * @param side2 the side.
82      */

83     public void setSide2(final float side2) {
84         this.side2 = side2;
85     }
86
87 }
88
Popular Tags