001
014
015 package com.liferay.portlet.journal.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 JournalArticleResourceWrapper implements JournalArticleResource,
033 ModelWrapper<JournalArticleResource> {
034 public JournalArticleResourceWrapper(
035 JournalArticleResource journalArticleResource) {
036 _journalArticleResource = journalArticleResource;
037 }
038
039 public Class<?> getModelClass() {
040 return JournalArticleResource.class;
041 }
042
043 public String getModelClassName() {
044 return JournalArticleResource.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("uuid", getUuid());
051 attributes.put("resourcePrimKey", getResourcePrimKey());
052 attributes.put("groupId", getGroupId());
053 attributes.put("articleId", getArticleId());
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 resourcePrimKey = (Long)attributes.get("resourcePrimKey");
066
067 if (resourcePrimKey != null) {
068 setResourcePrimKey(resourcePrimKey);
069 }
070
071 Long groupId = (Long)attributes.get("groupId");
072
073 if (groupId != null) {
074 setGroupId(groupId);
075 }
076
077 String articleId = (String)attributes.get("articleId");
078
079 if (articleId != null) {
080 setArticleId(articleId);
081 }
082 }
083
084
089 public long getPrimaryKey() {
090 return _journalArticleResource.getPrimaryKey();
091 }
092
093
098 public void setPrimaryKey(long primaryKey) {
099 _journalArticleResource.setPrimaryKey(primaryKey);
100 }
101
102
107 public java.lang.String getUuid() {
108 return _journalArticleResource.getUuid();
109 }
110
111
116 public void setUuid(java.lang.String uuid) {
117 _journalArticleResource.setUuid(uuid);
118 }
119
120
125 public long getResourcePrimKey() {
126 return _journalArticleResource.getResourcePrimKey();
127 }
128
129
134 public void setResourcePrimKey(long resourcePrimKey) {
135 _journalArticleResource.setResourcePrimKey(resourcePrimKey);
136 }
137
138
143 public long getGroupId() {
144 return _journalArticleResource.getGroupId();
145 }
146
147
152 public void setGroupId(long groupId) {
153 _journalArticleResource.setGroupId(groupId);
154 }
155
156
161 public java.lang.String getArticleId() {
162 return _journalArticleResource.getArticleId();
163 }
164
165
170 public void setArticleId(java.lang.String articleId) {
171 _journalArticleResource.setArticleId(articleId);
172 }
173
174 public boolean isNew() {
175 return _journalArticleResource.isNew();
176 }
177
178 public void setNew(boolean n) {
179 _journalArticleResource.setNew(n);
180 }
181
182 public boolean isCachedModel() {
183 return _journalArticleResource.isCachedModel();
184 }
185
186 public void setCachedModel(boolean cachedModel) {
187 _journalArticleResource.setCachedModel(cachedModel);
188 }
189
190 public boolean isEscapedModel() {
191 return _journalArticleResource.isEscapedModel();
192 }
193
194 public java.io.Serializable getPrimaryKeyObj() {
195 return _journalArticleResource.getPrimaryKeyObj();
196 }
197
198 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
199 _journalArticleResource.setPrimaryKeyObj(primaryKeyObj);
200 }
201
202 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
203 return _journalArticleResource.getExpandoBridge();
204 }
205
206 public void setExpandoBridgeAttributes(
207 com.liferay.portal.service.ServiceContext serviceContext) {
208 _journalArticleResource.setExpandoBridgeAttributes(serviceContext);
209 }
210
211 @Override
212 public java.lang.Object clone() {
213 return new JournalArticleResourceWrapper((JournalArticleResource)_journalArticleResource.clone());
214 }
215
216 public int compareTo(
217 com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
218 return _journalArticleResource.compareTo(journalArticleResource);
219 }
220
221 @Override
222 public int hashCode() {
223 return _journalArticleResource.hashCode();
224 }
225
226 public com.liferay.portal.model.CacheModel<com.liferay.portlet.journal.model.JournalArticleResource> toCacheModel() {
227 return _journalArticleResource.toCacheModel();
228 }
229
230 public com.liferay.portlet.journal.model.JournalArticleResource toEscapedModel() {
231 return new JournalArticleResourceWrapper(_journalArticleResource.toEscapedModel());
232 }
233
234 public com.liferay.portlet.journal.model.JournalArticleResource toUnescapedModel() {
235 return new JournalArticleResourceWrapper(_journalArticleResource.toUnescapedModel());
236 }
237
238 @Override
239 public java.lang.String toString() {
240 return _journalArticleResource.toString();
241 }
242
243 public java.lang.String toXmlString() {
244 return _journalArticleResource.toXmlString();
245 }
246
247 public void persist()
248 throws com.liferay.portal.kernel.exception.SystemException {
249 _journalArticleResource.persist();
250 }
251
252 @Override
253 public boolean equals(Object obj) {
254 if (this == obj) {
255 return true;
256 }
257
258 if (!(obj instanceof JournalArticleResourceWrapper)) {
259 return false;
260 }
261
262 JournalArticleResourceWrapper journalArticleResourceWrapper = (JournalArticleResourceWrapper)obj;
263
264 if (Validator.equals(_journalArticleResource,
265 journalArticleResourceWrapper._journalArticleResource)) {
266 return true;
267 }
268
269 return false;
270 }
271
272
275 public JournalArticleResource getWrappedJournalArticleResource() {
276 return _journalArticleResource;
277 }
278
279 public JournalArticleResource getWrappedModel() {
280 return _journalArticleResource;
281 }
282
283 public void resetOriginalValues() {
284 _journalArticleResource.resetOriginalValues();
285 }
286
287 private JournalArticleResource _journalArticleResource;
288 }