KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > schema > impl > AttributeModelImpl


1 // Copyright 2004, 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.hivemind.schema.impl;
16
17 import org.apache.hivemind.parse.BaseAnnotationHolder;
18 import org.apache.hivemind.schema.AttributeModel;
19
20 /**
21  * Implementation of {@link org.apache.hivemind.schema.AttributeModel}.
22  *
23  * @author Howard Lewis Ship
24  */

25 public final class AttributeModelImpl extends BaseAnnotationHolder implements AttributeModel
26 {
27     private String JavaDoc _name;
28
29     private String JavaDoc _default;
30
31     private boolean _required;
32
33     private boolean _unique;
34
35     private String JavaDoc _translator;
36
37     public String JavaDoc getName()
38     {
39         return _name;
40     }
41
42     public String JavaDoc getDefault()
43     {
44         return _default;
45     }
46
47     public boolean isRequired()
48     {
49         return _required;
50     }
51
52     public void setName(String JavaDoc string)
53     {
54         _name = string;
55     }
56
57     public void setDefault(String JavaDoc string)
58     {
59         _default = string;
60     }
61
62     public void setRequired(boolean b)
63     {
64         _required = b;
65     }
66
67     public void setUnique(boolean b)
68     {
69         _unique = b;
70     }
71
72     public boolean isUnique()
73     {
74         return _unique;
75     }
76
77     public String JavaDoc getTranslator()
78     {
79         return _translator;
80     }
81
82     public void setTranslator(String JavaDoc string)
83     {
84         _translator = string;
85     }
86
87 }
88
Popular Tags