KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > amber > cfg > BasicConfig


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  *
23  * Free Software Foundation, Inc.
24  * 59 Temple Place, Suite 330
25  * Boston, MA 02111-1307 USA
26  *
27  * @author Rodrigo Westrupp
28  */

29
30 package com.caucho.amber.cfg;
31
32 import javax.persistence.EnumType;
33 import javax.persistence.FetchType;
34 import javax.persistence.TemporalType;
35
36
37 /**
38  * <basic> tag in the orm.xml
39  */

40 public class BasicConfig {
41
42   // attributes
43
private String JavaDoc _name;
44   private FetchType _fetch;
45   private boolean _optional;
46
47   // elements
48
private ColumnConfig _column;
49   // XXX: lob type?
50
private String JavaDoc _lob;
51   private TemporalType _temporal;
52   private EnumType _enumerated;
53
54   /**
55    * Returns the name.
56    */

57   public String JavaDoc getName()
58   {
59     return _name;
60   }
61
62   /**
63    * Sets the name.
64    */

65   public void setName(String JavaDoc name)
66   {
67     _name = name;
68   }
69
70   /**
71    * Returns the fetch type.
72    */

73   public FetchType getFetch()
74   {
75     return _fetch;
76   }
77
78   /**
79    * Sets the fetch type.
80    */

81   public void setFetch(String JavaDoc fetch)
82   {
83     _fetch = FetchType.valueOf(fetch);
84   }
85
86   /**
87    * Returns the optional.
88    */

89   public boolean getOptional()
90   {
91     return _optional;
92   }
93
94   /**
95    * Sets the optional.
96    */

97   public void setOptional(boolean optional)
98   {
99     _optional = optional;
100   }
101
102   /**
103    * Returns the column.
104    */

105   public ColumnConfig getColumn()
106   {
107     return _column;
108   }
109
110   /**
111    * Sets the column.
112    */

113   public void setColumn(ColumnConfig column)
114   {
115     _column = column;
116   }
117
118   /**
119    * Returns the lob.
120    */

121   public String JavaDoc getLob()
122   {
123     return _lob;
124   }
125
126   /**
127    * Sets the lob.
128    */

129   public void setLob(String JavaDoc lob)
130   {
131     _lob = lob;
132   }
133
134   /**
135    * Returns the temporal.
136    */

137   public TemporalType getTemporal()
138   {
139     return _temporal;
140   }
141
142   /**
143    * Sets the temporal.
144    */

145   public void setTemporal(String JavaDoc temporal)
146   {
147     _temporal = TemporalType.valueOf(temporal);
148   }
149
150   /**
151    * Returns the enumerated.
152    */

153   public EnumType getEnumerated()
154   {
155     return _enumerated;
156   }
157
158   /**
159    * Sets the enumerated.
160    */

161   public void setEnumerated(String JavaDoc enumerated)
162   {
163     _enumerated = EnumType.valueOf(enumerated);
164   }
165 }
166
Popular Tags