KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > deployment > annotations > impl > JavaxPersistenceUnit


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: JavaxPersistenceUnit.java 443 2006-05-10 14:56:52Z benoitf $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.deployment.annotations.impl;
27
28
29 /**
30  * This class allow to set informations on javax.persistence.PersistenceUnit
31  * annotation.
32  * @author Florent Benoit
33  */

34 public class JavaxPersistenceUnit {
35
36     /**
37      * Name of this persistence unit.
38      */

39     private String JavaDoc name = null;
40
41     /**
42      * Unit name of this persistence context.
43      */

44     private String JavaDoc unitName = null;
45
46     /**
47      * Build new object with default values.
48      */

49     public JavaxPersistenceUnit() {
50         // default values
51
this.unitName = "";
52         this.name = "";
53     }
54
55     /**
56      * @return the unit name used by this persistence context.
57      */

58     public String JavaDoc getName() {
59         return name;
60     }
61
62     /**
63      * sets the name of this persistence context.
64      * @param name the name of the persistence context
65      */

66     public void setName(final String JavaDoc name) {
67         this.name = name;
68     }
69
70     /**
71      * @return the unit name used by this persistence context.
72      */

73     public String JavaDoc getUnitName() {
74         return unitName;
75     }
76
77     /**
78      * sets the unit name of this persistence context.
79      * @param unitName the name of the persistence unit
80      */

81     public void setUnitName(final String JavaDoc unitName) {
82         this.unitName = unitName;
83     }
84
85 }
86
Popular Tags