001
014
015 package com.liferay.portlet.dynamicdatamapping.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class DDMStructureLinkWrapper implements DDMStructureLink,
036 ModelWrapper<DDMStructureLink> {
037 public DDMStructureLinkWrapper(DDMStructureLink ddmStructureLink) {
038 _ddmStructureLink = ddmStructureLink;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return DDMStructureLink.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return DDMStructureLink.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("structureLinkId", getStructureLinkId());
056 attributes.put("classNameId", getClassNameId());
057 attributes.put("classPK", getClassPK());
058 attributes.put("structureId", getStructureId());
059
060 return attributes;
061 }
062
063 @Override
064 public void setModelAttributes(Map<String, Object> attributes) {
065 Long structureLinkId = (Long)attributes.get("structureLinkId");
066
067 if (structureLinkId != null) {
068 setStructureLinkId(structureLinkId);
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 @Override
096 public long getPrimaryKey() {
097 return _ddmStructureLink.getPrimaryKey();
098 }
099
100
105 @Override
106 public void setPrimaryKey(long primaryKey) {
107 _ddmStructureLink.setPrimaryKey(primaryKey);
108 }
109
110
115 @Override
116 public long getStructureLinkId() {
117 return _ddmStructureLink.getStructureLinkId();
118 }
119
120
125 @Override
126 public void setStructureLinkId(long structureLinkId) {
127 _ddmStructureLink.setStructureLinkId(structureLinkId);
128 }
129
130
135 @Override
136 public java.lang.String getClassName() {
137 return _ddmStructureLink.getClassName();
138 }
139
140 @Override
141 public void setClassName(java.lang.String className) {
142 _ddmStructureLink.setClassName(className);
143 }
144
145
150 @Override
151 public long getClassNameId() {
152 return _ddmStructureLink.getClassNameId();
153 }
154
155
160 @Override
161 public void setClassNameId(long classNameId) {
162 _ddmStructureLink.setClassNameId(classNameId);
163 }
164
165
170 @Override
171 public long getClassPK() {
172 return _ddmStructureLink.getClassPK();
173 }
174
175
180 @Override
181 public void setClassPK(long classPK) {
182 _ddmStructureLink.setClassPK(classPK);
183 }
184
185
190 @Override
191 public long getStructureId() {
192 return _ddmStructureLink.getStructureId();
193 }
194
195
200 @Override
201 public void setStructureId(long structureId) {
202 _ddmStructureLink.setStructureId(structureId);
203 }
204
205 @Override
206 public boolean isNew() {
207 return _ddmStructureLink.isNew();
208 }
209
210 @Override
211 public void setNew(boolean n) {
212 _ddmStructureLink.setNew(n);
213 }
214
215 @Override
216 public boolean isCachedModel() {
217 return _ddmStructureLink.isCachedModel();
218 }
219
220 @Override
221 public void setCachedModel(boolean cachedModel) {
222 _ddmStructureLink.setCachedModel(cachedModel);
223 }
224
225 @Override
226 public boolean isEscapedModel() {
227 return _ddmStructureLink.isEscapedModel();
228 }
229
230 @Override
231 public java.io.Serializable getPrimaryKeyObj() {
232 return _ddmStructureLink.getPrimaryKeyObj();
233 }
234
235 @Override
236 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
237 _ddmStructureLink.setPrimaryKeyObj(primaryKeyObj);
238 }
239
240 @Override
241 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
242 return _ddmStructureLink.getExpandoBridge();
243 }
244
245 @Override
246 public void setExpandoBridgeAttributes(
247 com.liferay.portal.model.BaseModel<?> baseModel) {
248 _ddmStructureLink.setExpandoBridgeAttributes(baseModel);
249 }
250
251 @Override
252 public void setExpandoBridgeAttributes(
253 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
254 _ddmStructureLink.setExpandoBridgeAttributes(expandoBridge);
255 }
256
257 @Override
258 public void setExpandoBridgeAttributes(
259 com.liferay.portal.service.ServiceContext serviceContext) {
260 _ddmStructureLink.setExpandoBridgeAttributes(serviceContext);
261 }
262
263 @Override
264 public java.lang.Object clone() {
265 return new DDMStructureLinkWrapper((DDMStructureLink)_ddmStructureLink.clone());
266 }
267
268 @Override
269 public int compareTo(
270 com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink ddmStructureLink) {
271 return _ddmStructureLink.compareTo(ddmStructureLink);
272 }
273
274 @Override
275 public int hashCode() {
276 return _ddmStructureLink.hashCode();
277 }
278
279 @Override
280 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> toCacheModel() {
281 return _ddmStructureLink.toCacheModel();
282 }
283
284 @Override
285 public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink toEscapedModel() {
286 return new DDMStructureLinkWrapper(_ddmStructureLink.toEscapedModel());
287 }
288
289 @Override
290 public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink toUnescapedModel() {
291 return new DDMStructureLinkWrapper(_ddmStructureLink.toUnescapedModel());
292 }
293
294 @Override
295 public java.lang.String toString() {
296 return _ddmStructureLink.toString();
297 }
298
299 @Override
300 public java.lang.String toXmlString() {
301 return _ddmStructureLink.toXmlString();
302 }
303
304 @Override
305 public void persist()
306 throws com.liferay.portal.kernel.exception.SystemException {
307 _ddmStructureLink.persist();
308 }
309
310 @Override
311 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure()
312 throws com.liferay.portal.kernel.exception.PortalException,
313 com.liferay.portal.kernel.exception.SystemException {
314 return _ddmStructureLink.getStructure();
315 }
316
317 @Override
318 public boolean equals(Object obj) {
319 if (this == obj) {
320 return true;
321 }
322
323 if (!(obj instanceof DDMStructureLinkWrapper)) {
324 return false;
325 }
326
327 DDMStructureLinkWrapper ddmStructureLinkWrapper = (DDMStructureLinkWrapper)obj;
328
329 if (Validator.equals(_ddmStructureLink,
330 ddmStructureLinkWrapper._ddmStructureLink)) {
331 return true;
332 }
333
334 return false;
335 }
336
337
340 public DDMStructureLink getWrappedDDMStructureLink() {
341 return _ddmStructureLink;
342 }
343
344 @Override
345 public DDMStructureLink getWrappedModel() {
346 return _ddmStructureLink;
347 }
348
349 @Override
350 public void resetOriginalValues() {
351 _ddmStructureLink.resetOriginalValues();
352 }
353
354 private DDMStructureLink _ddmStructureLink;
355 }