001
014
015 package com.liferay.portlet.journal.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 JournalArticleResourceWrapper implements JournalArticleResource,
036 ModelWrapper<JournalArticleResource> {
037 public JournalArticleResourceWrapper(
038 JournalArticleResource journalArticleResource) {
039 _journalArticleResource = journalArticleResource;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return JournalArticleResource.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return JournalArticleResource.class.getName();
050 }
051
052 @Override
053 public Map<String, Object> getModelAttributes() {
054 Map<String, Object> attributes = new HashMap<String, Object>();
055
056 attributes.put("uuid", getUuid());
057 attributes.put("resourcePrimKey", getResourcePrimKey());
058 attributes.put("groupId", getGroupId());
059 attributes.put("articleId", getArticleId());
060
061 return attributes;
062 }
063
064 @Override
065 public void setModelAttributes(Map<String, Object> attributes) {
066 String uuid = (String)attributes.get("uuid");
067
068 if (uuid != null) {
069 setUuid(uuid);
070 }
071
072 Long resourcePrimKey = (Long)attributes.get("resourcePrimKey");
073
074 if (resourcePrimKey != null) {
075 setResourcePrimKey(resourcePrimKey);
076 }
077
078 Long groupId = (Long)attributes.get("groupId");
079
080 if (groupId != null) {
081 setGroupId(groupId);
082 }
083
084 String articleId = (String)attributes.get("articleId");
085
086 if (articleId != null) {
087 setArticleId(articleId);
088 }
089 }
090
091
096 @Override
097 public long getPrimaryKey() {
098 return _journalArticleResource.getPrimaryKey();
099 }
100
101
106 @Override
107 public void setPrimaryKey(long primaryKey) {
108 _journalArticleResource.setPrimaryKey(primaryKey);
109 }
110
111
116 @Override
117 public java.lang.String getUuid() {
118 return _journalArticleResource.getUuid();
119 }
120
121
126 @Override
127 public void setUuid(java.lang.String uuid) {
128 _journalArticleResource.setUuid(uuid);
129 }
130
131
136 @Override
137 public long getResourcePrimKey() {
138 return _journalArticleResource.getResourcePrimKey();
139 }
140
141
146 @Override
147 public void setResourcePrimKey(long resourcePrimKey) {
148 _journalArticleResource.setResourcePrimKey(resourcePrimKey);
149 }
150
151
156 @Override
157 public long getGroupId() {
158 return _journalArticleResource.getGroupId();
159 }
160
161
166 @Override
167 public void setGroupId(long groupId) {
168 _journalArticleResource.setGroupId(groupId);
169 }
170
171
176 @Override
177 public java.lang.String getArticleId() {
178 return _journalArticleResource.getArticleId();
179 }
180
181
186 @Override
187 public void setArticleId(java.lang.String articleId) {
188 _journalArticleResource.setArticleId(articleId);
189 }
190
191 @Override
192 public boolean isNew() {
193 return _journalArticleResource.isNew();
194 }
195
196 @Override
197 public void setNew(boolean n) {
198 _journalArticleResource.setNew(n);
199 }
200
201 @Override
202 public boolean isCachedModel() {
203 return _journalArticleResource.isCachedModel();
204 }
205
206 @Override
207 public void setCachedModel(boolean cachedModel) {
208 _journalArticleResource.setCachedModel(cachedModel);
209 }
210
211 @Override
212 public boolean isEscapedModel() {
213 return _journalArticleResource.isEscapedModel();
214 }
215
216 @Override
217 public java.io.Serializable getPrimaryKeyObj() {
218 return _journalArticleResource.getPrimaryKeyObj();
219 }
220
221 @Override
222 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
223 _journalArticleResource.setPrimaryKeyObj(primaryKeyObj);
224 }
225
226 @Override
227 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
228 return _journalArticleResource.getExpandoBridge();
229 }
230
231 @Override
232 public void setExpandoBridgeAttributes(
233 com.liferay.portal.model.BaseModel<?> baseModel) {
234 _journalArticleResource.setExpandoBridgeAttributes(baseModel);
235 }
236
237 @Override
238 public void setExpandoBridgeAttributes(
239 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
240 _journalArticleResource.setExpandoBridgeAttributes(expandoBridge);
241 }
242
243 @Override
244 public void setExpandoBridgeAttributes(
245 com.liferay.portal.service.ServiceContext serviceContext) {
246 _journalArticleResource.setExpandoBridgeAttributes(serviceContext);
247 }
248
249 @Override
250 public java.lang.Object clone() {
251 return new JournalArticleResourceWrapper((JournalArticleResource)_journalArticleResource.clone());
252 }
253
254 @Override
255 public int compareTo(
256 com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
257 return _journalArticleResource.compareTo(journalArticleResource);
258 }
259
260 @Override
261 public int hashCode() {
262 return _journalArticleResource.hashCode();
263 }
264
265 @Override
266 public com.liferay.portal.model.CacheModel<com.liferay.portlet.journal.model.JournalArticleResource> toCacheModel() {
267 return _journalArticleResource.toCacheModel();
268 }
269
270 @Override
271 public com.liferay.portlet.journal.model.JournalArticleResource toEscapedModel() {
272 return new JournalArticleResourceWrapper(_journalArticleResource.toEscapedModel());
273 }
274
275 @Override
276 public com.liferay.portlet.journal.model.JournalArticleResource toUnescapedModel() {
277 return new JournalArticleResourceWrapper(_journalArticleResource.toUnescapedModel());
278 }
279
280 @Override
281 public java.lang.String toString() {
282 return _journalArticleResource.toString();
283 }
284
285 @Override
286 public java.lang.String toXmlString() {
287 return _journalArticleResource.toXmlString();
288 }
289
290 @Override
291 public void persist()
292 throws com.liferay.portal.kernel.exception.SystemException {
293 _journalArticleResource.persist();
294 }
295
296 @Override
297 public boolean equals(Object obj) {
298 if (this == obj) {
299 return true;
300 }
301
302 if (!(obj instanceof JournalArticleResourceWrapper)) {
303 return false;
304 }
305
306 JournalArticleResourceWrapper journalArticleResourceWrapper = (JournalArticleResourceWrapper)obj;
307
308 if (Validator.equals(_journalArticleResource,
309 journalArticleResourceWrapper._journalArticleResource)) {
310 return true;
311 }
312
313 return false;
314 }
315
316
319 public JournalArticleResource getWrappedJournalArticleResource() {
320 return _journalArticleResource;
321 }
322
323 @Override
324 public JournalArticleResource getWrappedModel() {
325 return _journalArticleResource;
326 }
327
328 @Override
329 public void resetOriginalValues() {
330 _journalArticleResource.resetOriginalValues();
331 }
332
333 private JournalArticleResource _journalArticleResource;
334 }