KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > dozer > util > mapping > fieldmap > Field


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

16 package net.sf.dozer.util.mapping.fieldmap;
17
18
19 /**
20  * @author garsombke.franz
21  * @author sullins.ben
22  * @author tierney.matt
23  *
24  */

25 public class Field implements Cloneable JavaDoc {
26   private final String JavaDoc type;
27   private final String JavaDoc name;
28   private String JavaDoc dateFormat;
29   private String JavaDoc theGetMethod;
30   private String JavaDoc theSetMethod;
31   private String JavaDoc key;
32   private String JavaDoc mapSetMethod;
33   private String JavaDoc mapGetMethod;
34   private boolean isAccessible;
35   private String JavaDoc createMethod;
36   private boolean isIndexed;
37   private int index = -1;
38
39   public Field(String JavaDoc name, String JavaDoc type) {
40     this.type = type;
41     this.name = name;
42   }
43
44   public String JavaDoc getType() {
45     return type;
46   }
47
48   public String JavaDoc getName() {
49     return name;
50   }
51
52   public String JavaDoc getDateFormat() {
53     return dateFormat;
54   }
55
56   public void setDateFormat(String JavaDoc dateFormat) {
57     this.dateFormat = dateFormat;
58   }
59
60   public String JavaDoc toString() {
61     return getName() + " : " + getType();
62   }
63
64   public String JavaDoc getTheGetMethod() {
65     return theGetMethod;
66   }
67
68   public void setTheGetMethod(String JavaDoc theGetMethod) {
69     this.theGetMethod = theGetMethod;
70   }
71
72   public String JavaDoc getTheSetMethod() {
73     return theSetMethod;
74   }
75
76   public void setTheSetMethod(String JavaDoc theSetMethod) {
77     this.theSetMethod = theSetMethod;
78   }
79
80   public String JavaDoc getKey() {
81     return key;
82   }
83
84   public void setKey(String JavaDoc key) {
85     this.key = key;
86   }
87
88   public String JavaDoc getMapGetMethod() {
89     return mapGetMethod;
90   }
91
92   public void setMapGetMethod(String JavaDoc mapGetMethod) {
93     this.mapGetMethod = mapGetMethod;
94   }
95
96   public String JavaDoc getMapSetMethod() {
97     return mapSetMethod;
98   }
99
100   public void setMapSetMethod(String JavaDoc mapSetMethod) {
101     this.mapSetMethod = mapSetMethod;
102   }
103
104   public boolean isAccessible() {
105     return isAccessible;
106   }
107
108   public void setAccessible(boolean isAccessible) {
109     this.isAccessible = isAccessible;
110   }
111
112   public String JavaDoc getCreateMethod() {
113     return createMethod;
114   }
115
116   public void setCreateMethod(String JavaDoc createMethod) {
117     this.createMethod = createMethod;
118   }
119
120   public int getIndex() {
121     return index;
122   }
123
124   public void setIndex(int index) {
125     this.index = index;
126   }
127
128   public boolean isIndexed() {
129     return isIndexed;
130   }
131
132   public void setIndexed(boolean isIndexed) {
133     this.isIndexed = isIndexed;
134   }
135
136 }
Popular Tags