001
014
015 package com.liferay.portlet.dynamicdatamapping.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class DDMStorageLinkWrapper implements DDMStorageLink,
033 ModelWrapper<DDMStorageLink> {
034 public DDMStorageLinkWrapper(DDMStorageLink ddmStorageLink) {
035 _ddmStorageLink = ddmStorageLink;
036 }
037
038 public Class<?> getModelClass() {
039 return DDMStorageLink.class;
040 }
041
042 public String getModelClassName() {
043 return DDMStorageLink.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("uuid", getUuid());
050 attributes.put("storageLinkId", getStorageLinkId());
051 attributes.put("classNameId", getClassNameId());
052 attributes.put("classPK", getClassPK());
053 attributes.put("structureId", getStructureId());
054
055 return attributes;
056 }
057
058 public void setModelAttributes(Map<String, Object> attributes) {
059 String uuid = (String)attributes.get("uuid");
060
061 if (uuid != null) {
062 setUuid(uuid);
063 }
064
065 Long storageLinkId = (Long)attributes.get("storageLinkId");
066
067 if (storageLinkId != null) {
068 setStorageLinkId(storageLinkId);
069 }
070
071 Long classNameId = (Long)attributes.get("classNameId");
072
073 if (classNameId != null) {
074 setClassNameId(classNameId);
075 }
076
077 Long classPK = (Long)attributes.get("classPK");
078
079 if (classPK != null) {
080 setClassPK(classPK);
081 }
082
083 Long structureId = (Long)attributes.get("structureId");
084
085 if (structureId != null) {
086 setStructureId(structureId);
087 }
088 }
089
090
095 public long getPrimaryKey() {
096 return _ddmStorageLink.getPrimaryKey();
097 }
098
099
104 public void setPrimaryKey(long primaryKey) {
105 _ddmStorageLink.setPrimaryKey(primaryKey);
106 }
107
108
113 public java.lang.String getUuid() {
114 return _ddmStorageLink.getUuid();
115 }
116
117
122 public void setUuid(java.lang.String uuid) {
123 _ddmStorageLink.setUuid(uuid);
124 }
125
126
131 public long getStorageLinkId() {
132 return _ddmStorageLink.getStorageLinkId();
133 }
134
135
140 public void setStorageLinkId(long storageLinkId) {
141 _ddmStorageLink.setStorageLinkId(storageLinkId);
142 }
143
144
149 public java.lang.String getClassName() {
150 return _ddmStorageLink.getClassName();
151 }
152
153 public void setClassName(java.lang.String className) {
154 _ddmStorageLink.setClassName(className);
155 }
156
157
162 public long getClassNameId() {
163 return _ddmStorageLink.getClassNameId();
164 }
165
166
171 public void setClassNameId(long classNameId) {
172 _ddmStorageLink.setClassNameId(classNameId);
173 }
174
175
180 public long getClassPK() {
181 return _ddmStorageLink.getClassPK();
182 }
183
184
189 public void setClassPK(long classPK) {
190 _ddmStorageLink.setClassPK(classPK);
191 }
192
193
198 public long getStructureId() {
199 return _ddmStorageLink.getStructureId();
200 }
201
202
207 public void setStructureId(long structureId) {
208 _ddmStorageLink.setStructureId(structureId);
209 }
210
211 public boolean isNew() {
212 return _ddmStorageLink.isNew();
213 }
214
215 public void setNew(boolean n) {
216 _ddmStorageLink.setNew(n);
217 }
218
219 public boolean isCachedModel() {
220 return _ddmStorageLink.isCachedModel();
221 }
222
223 public void setCachedModel(boolean cachedModel) {
224 _ddmStorageLink.setCachedModel(cachedModel);
225 }
226
227 public boolean isEscapedModel() {
228 return _ddmStorageLink.isEscapedModel();
229 }
230
231 public java.io.Serializable getPrimaryKeyObj() {
232 return _ddmStorageLink.getPrimaryKeyObj();
233 }
234
235 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
236 _ddmStorageLink.setPrimaryKeyObj(primaryKeyObj);
237 }
238
239 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
240 return _ddmStorageLink.getExpandoBridge();
241 }
242
243 public void setExpandoBridgeAttributes(
244 com.liferay.portal.service.ServiceContext serviceContext) {
245 _ddmStorageLink.setExpandoBridgeAttributes(serviceContext);
246 }
247
248 @Override
249 public java.lang.Object clone() {
250 return new DDMStorageLinkWrapper((DDMStorageLink)_ddmStorageLink.clone());
251 }
252
253 public int compareTo(
254 com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink ddmStorageLink) {
255 return _ddmStorageLink.compareTo(ddmStorageLink);
256 }
257
258 @Override
259 public int hashCode() {
260 return _ddmStorageLink.hashCode();
261 }
262
263 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink> toCacheModel() {
264 return _ddmStorageLink.toCacheModel();
265 }
266
267 public com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink toEscapedModel() {
268 return new DDMStorageLinkWrapper(_ddmStorageLink.toEscapedModel());
269 }
270
271 public com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink toUnescapedModel() {
272 return new DDMStorageLinkWrapper(_ddmStorageLink.toUnescapedModel());
273 }
274
275 @Override
276 public java.lang.String toString() {
277 return _ddmStorageLink.toString();
278 }
279
280 public java.lang.String toXmlString() {
281 return _ddmStorageLink.toXmlString();
282 }
283
284 public void persist()
285 throws com.liferay.portal.kernel.exception.SystemException {
286 _ddmStorageLink.persist();
287 }
288
289 public java.lang.String getStorageType()
290 throws com.liferay.portal.kernel.exception.PortalException,
291 com.liferay.portal.kernel.exception.SystemException {
292 return _ddmStorageLink.getStorageType();
293 }
294
295 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure()
296 throws com.liferay.portal.kernel.exception.PortalException,
297 com.liferay.portal.kernel.exception.SystemException {
298 return _ddmStorageLink.getStructure();
299 }
300
301 @Override
302 public boolean equals(Object obj) {
303 if (this == obj) {
304 return true;
305 }
306
307 if (!(obj instanceof DDMStorageLinkWrapper)) {
308 return false;
309 }
310
311 DDMStorageLinkWrapper ddmStorageLinkWrapper = (DDMStorageLinkWrapper)obj;
312
313 if (Validator.equals(_ddmStorageLink,
314 ddmStorageLinkWrapper._ddmStorageLink)) {
315 return true;
316 }
317
318 return false;
319 }
320
321
324 public DDMStorageLink getWrappedDDMStorageLink() {
325 return _ddmStorageLink;
326 }
327
328 public DDMStorageLink getWrappedModel() {
329 return _ddmStorageLink;
330 }
331
332 public void resetOriginalValues() {
333 _ddmStorageLink.resetOriginalValues();
334 }
335
336 private DDMStorageLink _ddmStorageLink;
337 }