001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class ListTypeWrapper implements ListType, ModelWrapper<ListType> {
032 public ListTypeWrapper(ListType listType) {
033 _listType = listType;
034 }
035
036 public Class<?> getModelClass() {
037 return ListType.class;
038 }
039
040 public String getModelClassName() {
041 return ListType.class.getName();
042 }
043
044 public Map<String, Object> getModelAttributes() {
045 Map<String, Object> attributes = new HashMap<String, Object>();
046
047 attributes.put("listTypeId", getListTypeId());
048 attributes.put("name", getName());
049 attributes.put("type", getType());
050
051 return attributes;
052 }
053
054 public void setModelAttributes(Map<String, Object> attributes) {
055 Integer listTypeId = (Integer)attributes.get("listTypeId");
056
057 if (listTypeId != null) {
058 setListTypeId(listTypeId);
059 }
060
061 String name = (String)attributes.get("name");
062
063 if (name != null) {
064 setName(name);
065 }
066
067 String type = (String)attributes.get("type");
068
069 if (type != null) {
070 setType(type);
071 }
072 }
073
074
079 public int getPrimaryKey() {
080 return _listType.getPrimaryKey();
081 }
082
083
088 public void setPrimaryKey(int primaryKey) {
089 _listType.setPrimaryKey(primaryKey);
090 }
091
092
097 public int getListTypeId() {
098 return _listType.getListTypeId();
099 }
100
101
106 public void setListTypeId(int listTypeId) {
107 _listType.setListTypeId(listTypeId);
108 }
109
110
115 public java.lang.String getName() {
116 return _listType.getName();
117 }
118
119
124 public void setName(java.lang.String name) {
125 _listType.setName(name);
126 }
127
128
133 public java.lang.String getType() {
134 return _listType.getType();
135 }
136
137
142 public void setType(java.lang.String type) {
143 _listType.setType(type);
144 }
145
146 public boolean isNew() {
147 return _listType.isNew();
148 }
149
150 public void setNew(boolean n) {
151 _listType.setNew(n);
152 }
153
154 public boolean isCachedModel() {
155 return _listType.isCachedModel();
156 }
157
158 public void setCachedModel(boolean cachedModel) {
159 _listType.setCachedModel(cachedModel);
160 }
161
162 public boolean isEscapedModel() {
163 return _listType.isEscapedModel();
164 }
165
166 public java.io.Serializable getPrimaryKeyObj() {
167 return _listType.getPrimaryKeyObj();
168 }
169
170 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
171 _listType.setPrimaryKeyObj(primaryKeyObj);
172 }
173
174 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
175 return _listType.getExpandoBridge();
176 }
177
178 public void setExpandoBridgeAttributes(
179 com.liferay.portal.service.ServiceContext serviceContext) {
180 _listType.setExpandoBridgeAttributes(serviceContext);
181 }
182
183 @Override
184 public java.lang.Object clone() {
185 return new ListTypeWrapper((ListType)_listType.clone());
186 }
187
188 public int compareTo(com.liferay.portal.model.ListType listType) {
189 return _listType.compareTo(listType);
190 }
191
192 @Override
193 public int hashCode() {
194 return _listType.hashCode();
195 }
196
197 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ListType> toCacheModel() {
198 return _listType.toCacheModel();
199 }
200
201 public com.liferay.portal.model.ListType toEscapedModel() {
202 return new ListTypeWrapper(_listType.toEscapedModel());
203 }
204
205 public com.liferay.portal.model.ListType toUnescapedModel() {
206 return new ListTypeWrapper(_listType.toUnescapedModel());
207 }
208
209 @Override
210 public java.lang.String toString() {
211 return _listType.toString();
212 }
213
214 public java.lang.String toXmlString() {
215 return _listType.toXmlString();
216 }
217
218 @Override
219 public boolean equals(Object obj) {
220 if (this == obj) {
221 return true;
222 }
223
224 if (!(obj instanceof ListTypeWrapper)) {
225 return false;
226 }
227
228 ListTypeWrapper listTypeWrapper = (ListTypeWrapper)obj;
229
230 if (Validator.equals(_listType, listTypeWrapper._listType)) {
231 return true;
232 }
233
234 return false;
235 }
236
237
240 public ListType getWrappedListType() {
241 return _listType;
242 }
243
244 public ListType getWrappedModel() {
245 return _listType;
246 }
247
248 public void resetOriginalValues() {
249 _listType.resetOriginalValues();
250 }
251
252 private ListType _listType;
253 }