001
014
015 package com.liferay.portal.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 @ProviderType
034 public class ListTypeWrapper implements ListType, ModelWrapper<ListType> {
035 public ListTypeWrapper(ListType listType) {
036 _listType = listType;
037 }
038
039 @Override
040 public Class<?> getModelClass() {
041 return ListType.class;
042 }
043
044 @Override
045 public String getModelClassName() {
046 return ListType.class.getName();
047 }
048
049 @Override
050 public Map<String, Object> getModelAttributes() {
051 Map<String, Object> attributes = new HashMap<String, Object>();
052
053 attributes.put("mvccVersion", getMvccVersion());
054 attributes.put("listTypeId", getListTypeId());
055 attributes.put("name", getName());
056 attributes.put("type", getType());
057
058 return attributes;
059 }
060
061 @Override
062 public void setModelAttributes(Map<String, Object> attributes) {
063 Long mvccVersion = (Long)attributes.get("mvccVersion");
064
065 if (mvccVersion != null) {
066 setMvccVersion(mvccVersion);
067 }
068
069 Long listTypeId = (Long)attributes.get("listTypeId");
070
071 if (listTypeId != null) {
072 setListTypeId(listTypeId);
073 }
074
075 String name = (String)attributes.get("name");
076
077 if (name != null) {
078 setName(name);
079 }
080
081 String type = (String)attributes.get("type");
082
083 if (type != null) {
084 setType(type);
085 }
086 }
087
088 @Override
089 public java.lang.Object clone() {
090 return new ListTypeWrapper((ListType)_listType.clone());
091 }
092
093 @Override
094 public int compareTo(com.liferay.portal.model.ListType listType) {
095 return _listType.compareTo(listType);
096 }
097
098 @Override
099 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
100 return _listType.getExpandoBridge();
101 }
102
103
108 @Override
109 public long getListTypeId() {
110 return _listType.getListTypeId();
111 }
112
113
118 @Override
119 public long getMvccVersion() {
120 return _listType.getMvccVersion();
121 }
122
123
128 @Override
129 public java.lang.String getName() {
130 return _listType.getName();
131 }
132
133
138 @Override
139 public long getPrimaryKey() {
140 return _listType.getPrimaryKey();
141 }
142
143 @Override
144 public java.io.Serializable getPrimaryKeyObj() {
145 return _listType.getPrimaryKeyObj();
146 }
147
148
153 @Override
154 public java.lang.String getType() {
155 return _listType.getType();
156 }
157
158 @Override
159 public int hashCode() {
160 return _listType.hashCode();
161 }
162
163 @Override
164 public boolean isCachedModel() {
165 return _listType.isCachedModel();
166 }
167
168 @Override
169 public boolean isEscapedModel() {
170 return _listType.isEscapedModel();
171 }
172
173 @Override
174 public boolean isNew() {
175 return _listType.isNew();
176 }
177
178 @Override
179 public void persist() {
180 _listType.persist();
181 }
182
183 @Override
184 public void setCachedModel(boolean cachedModel) {
185 _listType.setCachedModel(cachedModel);
186 }
187
188 @Override
189 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
190 _listType.setExpandoBridgeAttributes(baseModel);
191 }
192
193 @Override
194 public void setExpandoBridgeAttributes(
195 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
196 _listType.setExpandoBridgeAttributes(expandoBridge);
197 }
198
199 @Override
200 public void setExpandoBridgeAttributes(
201 com.liferay.portal.service.ServiceContext serviceContext) {
202 _listType.setExpandoBridgeAttributes(serviceContext);
203 }
204
205
210 @Override
211 public void setListTypeId(long listTypeId) {
212 _listType.setListTypeId(listTypeId);
213 }
214
215
220 @Override
221 public void setMvccVersion(long mvccVersion) {
222 _listType.setMvccVersion(mvccVersion);
223 }
224
225
230 @Override
231 public void setName(java.lang.String name) {
232 _listType.setName(name);
233 }
234
235 @Override
236 public void setNew(boolean n) {
237 _listType.setNew(n);
238 }
239
240
245 @Override
246 public void setPrimaryKey(long primaryKey) {
247 _listType.setPrimaryKey(primaryKey);
248 }
249
250 @Override
251 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
252 _listType.setPrimaryKeyObj(primaryKeyObj);
253 }
254
255
260 @Override
261 public void setType(java.lang.String type) {
262 _listType.setType(type);
263 }
264
265 @Override
266 public CacheModel<com.liferay.portal.model.ListType> toCacheModel() {
267 return _listType.toCacheModel();
268 }
269
270 @Override
271 public com.liferay.portal.model.ListType toEscapedModel() {
272 return new ListTypeWrapper(_listType.toEscapedModel());
273 }
274
275 @Override
276 public java.lang.String toString() {
277 return _listType.toString();
278 }
279
280 @Override
281 public com.liferay.portal.model.ListType toUnescapedModel() {
282 return new ListTypeWrapper(_listType.toUnescapedModel());
283 }
284
285 @Override
286 public java.lang.String toXmlString() {
287 return _listType.toXmlString();
288 }
289
290 @Override
291 public boolean equals(Object obj) {
292 if (this == obj) {
293 return true;
294 }
295
296 if (!(obj instanceof ListTypeWrapper)) {
297 return false;
298 }
299
300 ListTypeWrapper listTypeWrapper = (ListTypeWrapper)obj;
301
302 if (Validator.equals(_listType, listTypeWrapper._listType)) {
303 return true;
304 }
305
306 return false;
307 }
308
309 @Override
310 public ListType getWrappedModel() {
311 return _listType;
312 }
313
314 @Override
315 public boolean isEntityCacheEnabled() {
316 return _listType.isEntityCacheEnabled();
317 }
318
319 @Override
320 public boolean isFinderCacheEnabled() {
321 return _listType.isFinderCacheEnabled();
322 }
323
324 @Override
325 public void resetOriginalValues() {
326 _listType.resetOriginalValues();
327 }
328
329 private final ListType _listType;
330 }