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 DDMStructureLinkWrapper implements DDMStructureLink,
033 ModelWrapper<DDMStructureLink> {
034 public DDMStructureLinkWrapper(DDMStructureLink ddmStructureLink) {
035 _ddmStructureLink = ddmStructureLink;
036 }
037
038 public Class<?> getModelClass() {
039 return DDMStructureLink.class;
040 }
041
042 public String getModelClassName() {
043 return DDMStructureLink.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("structureLinkId", getStructureLinkId());
050 attributes.put("classNameId", getClassNameId());
051 attributes.put("classPK", getClassPK());
052 attributes.put("structureId", getStructureId());
053
054 return attributes;
055 }
056
057 public void setModelAttributes(Map<String, Object> attributes) {
058 Long structureLinkId = (Long)attributes.get("structureLinkId");
059
060 if (structureLinkId != null) {
061 setStructureLinkId(structureLinkId);
062 }
063
064 Long classNameId = (Long)attributes.get("classNameId");
065
066 if (classNameId != null) {
067 setClassNameId(classNameId);
068 }
069
070 Long classPK = (Long)attributes.get("classPK");
071
072 if (classPK != null) {
073 setClassPK(classPK);
074 }
075
076 Long structureId = (Long)attributes.get("structureId");
077
078 if (structureId != null) {
079 setStructureId(structureId);
080 }
081 }
082
083
088 public long getPrimaryKey() {
089 return _ddmStructureLink.getPrimaryKey();
090 }
091
092
097 public void setPrimaryKey(long primaryKey) {
098 _ddmStructureLink.setPrimaryKey(primaryKey);
099 }
100
101
106 public long getStructureLinkId() {
107 return _ddmStructureLink.getStructureLinkId();
108 }
109
110
115 public void setStructureLinkId(long structureLinkId) {
116 _ddmStructureLink.setStructureLinkId(structureLinkId);
117 }
118
119
124 public java.lang.String getClassName() {
125 return _ddmStructureLink.getClassName();
126 }
127
128 public void setClassName(java.lang.String className) {
129 _ddmStructureLink.setClassName(className);
130 }
131
132
137 public long getClassNameId() {
138 return _ddmStructureLink.getClassNameId();
139 }
140
141
146 public void setClassNameId(long classNameId) {
147 _ddmStructureLink.setClassNameId(classNameId);
148 }
149
150
155 public long getClassPK() {
156 return _ddmStructureLink.getClassPK();
157 }
158
159
164 public void setClassPK(long classPK) {
165 _ddmStructureLink.setClassPK(classPK);
166 }
167
168
173 public long getStructureId() {
174 return _ddmStructureLink.getStructureId();
175 }
176
177
182 public void setStructureId(long structureId) {
183 _ddmStructureLink.setStructureId(structureId);
184 }
185
186 public boolean isNew() {
187 return _ddmStructureLink.isNew();
188 }
189
190 public void setNew(boolean n) {
191 _ddmStructureLink.setNew(n);
192 }
193
194 public boolean isCachedModel() {
195 return _ddmStructureLink.isCachedModel();
196 }
197
198 public void setCachedModel(boolean cachedModel) {
199 _ddmStructureLink.setCachedModel(cachedModel);
200 }
201
202 public boolean isEscapedModel() {
203 return _ddmStructureLink.isEscapedModel();
204 }
205
206 public java.io.Serializable getPrimaryKeyObj() {
207 return _ddmStructureLink.getPrimaryKeyObj();
208 }
209
210 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
211 _ddmStructureLink.setPrimaryKeyObj(primaryKeyObj);
212 }
213
214 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
215 return _ddmStructureLink.getExpandoBridge();
216 }
217
218 public void setExpandoBridgeAttributes(
219 com.liferay.portal.service.ServiceContext serviceContext) {
220 _ddmStructureLink.setExpandoBridgeAttributes(serviceContext);
221 }
222
223 @Override
224 public java.lang.Object clone() {
225 return new DDMStructureLinkWrapper((DDMStructureLink)_ddmStructureLink.clone());
226 }
227
228 public int compareTo(
229 com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink ddmStructureLink) {
230 return _ddmStructureLink.compareTo(ddmStructureLink);
231 }
232
233 @Override
234 public int hashCode() {
235 return _ddmStructureLink.hashCode();
236 }
237
238 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink> toCacheModel() {
239 return _ddmStructureLink.toCacheModel();
240 }
241
242 public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink toEscapedModel() {
243 return new DDMStructureLinkWrapper(_ddmStructureLink.toEscapedModel());
244 }
245
246 public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink toUnescapedModel() {
247 return new DDMStructureLinkWrapper(_ddmStructureLink.toUnescapedModel());
248 }
249
250 @Override
251 public java.lang.String toString() {
252 return _ddmStructureLink.toString();
253 }
254
255 public java.lang.String toXmlString() {
256 return _ddmStructureLink.toXmlString();
257 }
258
259 public void persist()
260 throws com.liferay.portal.kernel.exception.SystemException {
261 _ddmStructureLink.persist();
262 }
263
264 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure()
265 throws com.liferay.portal.kernel.exception.PortalException,
266 com.liferay.portal.kernel.exception.SystemException {
267 return _ddmStructureLink.getStructure();
268 }
269
270 @Override
271 public boolean equals(Object obj) {
272 if (this == obj) {
273 return true;
274 }
275
276 if (!(obj instanceof DDMStructureLinkWrapper)) {
277 return false;
278 }
279
280 DDMStructureLinkWrapper ddmStructureLinkWrapper = (DDMStructureLinkWrapper)obj;
281
282 if (Validator.equals(_ddmStructureLink,
283 ddmStructureLinkWrapper._ddmStructureLink)) {
284 return true;
285 }
286
287 return false;
288 }
289
290
293 public DDMStructureLink getWrappedDDMStructureLink() {
294 return _ddmStructureLink;
295 }
296
297 public DDMStructureLink getWrappedModel() {
298 return _ddmStructureLink;
299 }
300
301 public void resetOriginalValues() {
302 _ddmStructureLink.resetOriginalValues();
303 }
304
305 private DDMStructureLink _ddmStructureLink;
306 }