KickJava   Java API By Example, From Geeks To Geeks.

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


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: Square.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.ExcludeSuperclassListeners;
29 import javax.persistence.TableGenerator;
30
31 /**
32  * Represents a square. Uses the annotation ExccludeSuperclassListeners, so the
33  * container cannot call any lifecycle event for this entity.
34  * @author Gisele Pinheiro Souza
35  * @author Eduardo Studzinski Estima de Castro
36  */

37 @Entity
38 @ExcludeSuperclassListeners
39 @TableGenerator(name = "ID_SEQ", allocationSize = 1)
40 public class Square extends Form {
41
42     /**
43      * The square side.
44      */

45     private float side;
46
47
48     /**
49      * Gets the square side.
50      * @return the side.
51      */

52     public float getSide() {
53         return side;
54     }
55
56     /**
57      * Sets the square side.
58      * @param side the side.
59      */

60     public void setSide(final float side) {
61         this.side = side;
62     }
63 }
64
Popular Tags