KickJava   Java API By Example, From Geeks To Geeks.

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


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  * @author garsombke.franz
20  * @author sullins.ben
21  * @author tierney.matt
22  *
23  */

24 public class DozerClass implements Cloneable JavaDoc {
25   private String JavaDoc name;
26   private Class JavaDoc classToMap;
27   private String JavaDoc beanFactory;
28   private String JavaDoc factoryBeanId;
29   private String JavaDoc mapGetMethod;
30   private String JavaDoc mapSetMethod;
31   private boolean isCustomMap;
32   private String JavaDoc createMethod;
33   private Boolean JavaDoc mapNull;
34   private Boolean JavaDoc mapEmptyString;
35
36   public DozerClass() {
37   }
38
39   public DozerClass(String JavaDoc name, Class JavaDoc classToMap, String JavaDoc beanFactory, String JavaDoc factoryBeanId,
40                     String JavaDoc mapGetMethod, String JavaDoc mapSetMethod, Boolean JavaDoc mapNull, Boolean JavaDoc mapEmptyString) {
41     this.name = name;
42     this.classToMap = classToMap;
43     this.beanFactory = beanFactory;
44     this.factoryBeanId = factoryBeanId;
45     this.mapGetMethod = mapGetMethod;
46     this.mapSetMethod = mapSetMethod;
47     this.mapNull = mapNull;
48     this.mapEmptyString = mapEmptyString;
49   }
50
51   public String JavaDoc getBeanFactory() {
52     return beanFactory;
53   }
54
55   public void setBeanFactory(String JavaDoc beanFactory) {
56     this.beanFactory = beanFactory;
57   }
58
59   public Class JavaDoc getClassToMap() {
60     return classToMap;
61   }
62
63   public void setClassToMap(Class JavaDoc classToMap) {
64     this.classToMap = classToMap;
65   }
66
67   public String JavaDoc getName() {
68     return name;
69   }
70
71   public void setName(String JavaDoc name) throws ClassNotFoundException JavaDoc {
72     this.name = name;
73     classToMap = Thread.currentThread().getContextClassLoader().loadClass(name);
74   }
75
76   public String JavaDoc getFactoryBeanId() {
77     return factoryBeanId;
78   }
79
80   public void setFactoryBeanId(String JavaDoc factoryBeanId) {
81     this.factoryBeanId = factoryBeanId;
82   }
83
84   public Object JavaDoc clone() throws CloneNotSupportedException JavaDoc {
85     return super.clone();
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 isCustomMap() {
105     return isCustomMap;
106   }
107
108   public void setCustomMap(boolean isCustomMap) {
109     this.isCustomMap = isCustomMap;
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 Boolean JavaDoc getMapNull() {
121     return mapNull;
122   }
123
124   public void setMapNull(Boolean JavaDoc mapNull) {
125     this.mapNull = mapNull;
126   }
127
128   public Boolean JavaDoc getMapEmptyString() {
129     return mapEmptyString;
130   }
131
132   public void setMapEmptyString(Boolean JavaDoc mapEmptyString) {
133     this.mapEmptyString = mapEmptyString;
134   }
135
136 }
Popular Tags