KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
33  * Base class for <column> and <join-column> tag in the orm.xml
34  */

35 abstract public class AbstractColumnConfig {
36
37   // attributes
38
private String JavaDoc _name;
39   private boolean _isUnique;
40   private boolean _isNullable;
41   private boolean _isInsertable;
42   private boolean _isUpdatable;
43   private String JavaDoc _columnDefinition;
44   private String JavaDoc _table;
45
46   /**
47    * Returns the name.
48    */

49   public String JavaDoc getName()
50   {
51     return _name;
52   }
53
54   /**
55    * Sets the name.
56    */

57   public void setName(String JavaDoc name)
58   {
59     _name = name;
60   }
61
62   public boolean getUnique()
63   {
64     return _isUnique;
65   }
66
67   public boolean getNullable()
68   {
69     return _isNullable;
70   }
71
72   public boolean getInsertable()
73   {
74     return _isInsertable;
75   }
76
77   public boolean getUpdatable()
78   {
79     return _isUpdatable;
80   }
81
82   public void setUnique(boolean isUnique)
83   {
84     _isUnique = isUnique;
85   }
86
87   public void setNullable(boolean isNullable)
88   {
89     _isNullable = isNullable;
90   }
91
92   public void setInsertable(boolean isInsertable)
93   {
94     _isInsertable = isInsertable;
95   }
96
97   public void setUpdatable(boolean isUpdatable)
98   {
99     _isUpdatable = isUpdatable;
100   }
101
102   /**
103    * Returns the column definition.
104    */

105   public String JavaDoc getColumnDefinition()
106   {
107     return _columnDefinition;
108   }
109
110   /**
111    * Sets the column definition.
112    */

113   public void setColumnDefinition(String JavaDoc columnDefinition)
114   {
115     _columnDefinition = columnDefinition;
116   }
117
118   /**
119    * Returns the table.
120    */

121   public String JavaDoc getTable()
122   {
123     return _table;
124   }
125
126   /**
127    * Sets the table.
128    */

129   public void setTable(String JavaDoc table)
130   {
131     _table = table;
132   }
133 }
134
Popular Tags