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 Integer listTypeId = (Integer)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 int 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 int 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 setCachedModel(boolean cachedModel) {
180 _listType.setCachedModel(cachedModel);
181 }
182
183 @Override
184 public void setExpandoBridgeAttributes(
185 com.liferay.portal.model.BaseModel<?> baseModel) {
186 _listType.setExpandoBridgeAttributes(baseModel);
187 }
188
189 @Override
190 public void setExpandoBridgeAttributes(
191 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
192 _listType.setExpandoBridgeAttributes(expandoBridge);
193 }
194
195 @Override
196 public void setExpandoBridgeAttributes(
197 com.liferay.portal.service.ServiceContext serviceContext) {
198 _listType.setExpandoBridgeAttributes(serviceContext);
199 }
200
201
206 @Override
207 public void setListTypeId(int listTypeId) {
208 _listType.setListTypeId(listTypeId);
209 }
210
211
216 @Override
217 public void setMvccVersion(long mvccVersion) {
218 _listType.setMvccVersion(mvccVersion);
219 }
220
221
226 @Override
227 public void setName(java.lang.String name) {
228 _listType.setName(name);
229 }
230
231 @Override
232 public void setNew(boolean n) {
233 _listType.setNew(n);
234 }
235
236
241 @Override
242 public void setPrimaryKey(int primaryKey) {
243 _listType.setPrimaryKey(primaryKey);
244 }
245
246 @Override
247 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
248 _listType.setPrimaryKeyObj(primaryKeyObj);
249 }
250
251
256 @Override
257 public void setType(java.lang.String type) {
258 _listType.setType(type);
259 }
260
261 @Override
262 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ListType> toCacheModel() {
263 return _listType.toCacheModel();
264 }
265
266 @Override
267 public com.liferay.portal.model.ListType toEscapedModel() {
268 return new ListTypeWrapper(_listType.toEscapedModel());
269 }
270
271 @Override
272 public java.lang.String toString() {
273 return _listType.toString();
274 }
275
276 @Override
277 public com.liferay.portal.model.ListType toUnescapedModel() {
278 return new ListTypeWrapper(_listType.toUnescapedModel());
279 }
280
281 @Override
282 public java.lang.String toXmlString() {
283 return _listType.toXmlString();
284 }
285
286 @Override
287 public boolean equals(Object obj) {
288 if (this == obj) {
289 return true;
290 }
291
292 if (!(obj instanceof ListTypeWrapper)) {
293 return false;
294 }
295
296 ListTypeWrapper listTypeWrapper = (ListTypeWrapper)obj;
297
298 if (Validator.equals(_listType, listTypeWrapper._listType)) {
299 return true;
300 }
301
302 return false;
303 }
304
305
308 @Deprecated
309 public ListType getWrappedListType() {
310 return _listType;
311 }
312
313 @Override
314 public ListType getWrappedModel() {
315 return _listType;
316 }
317
318 @Override
319 public boolean isEntityCacheEnabled() {
320 return _listType.isEntityCacheEnabled();
321 }
322
323 @Override
324 public boolean isFinderCacheEnabled() {
325 return _listType.isFinderCacheEnabled();
326 }
327
328 @Override
329 public void resetOriginalValues() {
330 _listType.resetOriginalValues();
331 }
332
333 private final ListType _listType;
334 }