001
014
015 package com.liferay.portlet.announcements.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.Date;
023 import java.util.HashMap;
024 import java.util.Map;
025
026
035 @ProviderType
036 public class AnnouncementsFlagWrapper implements AnnouncementsFlag,
037 ModelWrapper<AnnouncementsFlag> {
038 public AnnouncementsFlagWrapper(AnnouncementsFlag announcementsFlag) {
039 _announcementsFlag = announcementsFlag;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return AnnouncementsFlag.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return AnnouncementsFlag.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("flagId", getFlagId());
057 attributes.put("userId", getUserId());
058 attributes.put("createDate", getCreateDate());
059 attributes.put("entryId", getEntryId());
060 attributes.put("value", getValue());
061
062 return attributes;
063 }
064
065 @Override
066 public void setModelAttributes(Map<String, Object> attributes) {
067 Long flagId = (Long)attributes.get("flagId");
068
069 if (flagId != null) {
070 setFlagId(flagId);
071 }
072
073 Long userId = (Long)attributes.get("userId");
074
075 if (userId != null) {
076 setUserId(userId);
077 }
078
079 Date createDate = (Date)attributes.get("createDate");
080
081 if (createDate != null) {
082 setCreateDate(createDate);
083 }
084
085 Long entryId = (Long)attributes.get("entryId");
086
087 if (entryId != null) {
088 setEntryId(entryId);
089 }
090
091 Integer value = (Integer)attributes.get("value");
092
093 if (value != null) {
094 setValue(value);
095 }
096 }
097
098
103 @Override
104 public long getPrimaryKey() {
105 return _announcementsFlag.getPrimaryKey();
106 }
107
108
113 @Override
114 public void setPrimaryKey(long primaryKey) {
115 _announcementsFlag.setPrimaryKey(primaryKey);
116 }
117
118
123 @Override
124 public long getFlagId() {
125 return _announcementsFlag.getFlagId();
126 }
127
128
133 @Override
134 public void setFlagId(long flagId) {
135 _announcementsFlag.setFlagId(flagId);
136 }
137
138
143 @Override
144 public long getUserId() {
145 return _announcementsFlag.getUserId();
146 }
147
148
153 @Override
154 public void setUserId(long userId) {
155 _announcementsFlag.setUserId(userId);
156 }
157
158
164 @Override
165 public java.lang.String getUserUuid()
166 throws com.liferay.portal.kernel.exception.SystemException {
167 return _announcementsFlag.getUserUuid();
168 }
169
170
175 @Override
176 public void setUserUuid(java.lang.String userUuid) {
177 _announcementsFlag.setUserUuid(userUuid);
178 }
179
180
185 @Override
186 public java.util.Date getCreateDate() {
187 return _announcementsFlag.getCreateDate();
188 }
189
190
195 @Override
196 public void setCreateDate(java.util.Date createDate) {
197 _announcementsFlag.setCreateDate(createDate);
198 }
199
200
205 @Override
206 public long getEntryId() {
207 return _announcementsFlag.getEntryId();
208 }
209
210
215 @Override
216 public void setEntryId(long entryId) {
217 _announcementsFlag.setEntryId(entryId);
218 }
219
220
225 @Override
226 public int getValue() {
227 return _announcementsFlag.getValue();
228 }
229
230
235 @Override
236 public void setValue(int value) {
237 _announcementsFlag.setValue(value);
238 }
239
240 @Override
241 public boolean isNew() {
242 return _announcementsFlag.isNew();
243 }
244
245 @Override
246 public void setNew(boolean n) {
247 _announcementsFlag.setNew(n);
248 }
249
250 @Override
251 public boolean isCachedModel() {
252 return _announcementsFlag.isCachedModel();
253 }
254
255 @Override
256 public void setCachedModel(boolean cachedModel) {
257 _announcementsFlag.setCachedModel(cachedModel);
258 }
259
260 @Override
261 public boolean isEscapedModel() {
262 return _announcementsFlag.isEscapedModel();
263 }
264
265 @Override
266 public java.io.Serializable getPrimaryKeyObj() {
267 return _announcementsFlag.getPrimaryKeyObj();
268 }
269
270 @Override
271 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
272 _announcementsFlag.setPrimaryKeyObj(primaryKeyObj);
273 }
274
275 @Override
276 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
277 return _announcementsFlag.getExpandoBridge();
278 }
279
280 @Override
281 public void setExpandoBridgeAttributes(
282 com.liferay.portal.model.BaseModel<?> baseModel) {
283 _announcementsFlag.setExpandoBridgeAttributes(baseModel);
284 }
285
286 @Override
287 public void setExpandoBridgeAttributes(
288 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
289 _announcementsFlag.setExpandoBridgeAttributes(expandoBridge);
290 }
291
292 @Override
293 public void setExpandoBridgeAttributes(
294 com.liferay.portal.service.ServiceContext serviceContext) {
295 _announcementsFlag.setExpandoBridgeAttributes(serviceContext);
296 }
297
298 @Override
299 public java.lang.Object clone() {
300 return new AnnouncementsFlagWrapper((AnnouncementsFlag)_announcementsFlag.clone());
301 }
302
303 @Override
304 public int compareTo(
305 com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag) {
306 return _announcementsFlag.compareTo(announcementsFlag);
307 }
308
309 @Override
310 public int hashCode() {
311 return _announcementsFlag.hashCode();
312 }
313
314 @Override
315 public com.liferay.portal.model.CacheModel<com.liferay.portlet.announcements.model.AnnouncementsFlag> toCacheModel() {
316 return _announcementsFlag.toCacheModel();
317 }
318
319 @Override
320 public com.liferay.portlet.announcements.model.AnnouncementsFlag toEscapedModel() {
321 return new AnnouncementsFlagWrapper(_announcementsFlag.toEscapedModel());
322 }
323
324 @Override
325 public com.liferay.portlet.announcements.model.AnnouncementsFlag toUnescapedModel() {
326 return new AnnouncementsFlagWrapper(_announcementsFlag.toUnescapedModel());
327 }
328
329 @Override
330 public java.lang.String toString() {
331 return _announcementsFlag.toString();
332 }
333
334 @Override
335 public java.lang.String toXmlString() {
336 return _announcementsFlag.toXmlString();
337 }
338
339 @Override
340 public void persist()
341 throws com.liferay.portal.kernel.exception.SystemException {
342 _announcementsFlag.persist();
343 }
344
345 @Override
346 public boolean equals(Object obj) {
347 if (this == obj) {
348 return true;
349 }
350
351 if (!(obj instanceof AnnouncementsFlagWrapper)) {
352 return false;
353 }
354
355 AnnouncementsFlagWrapper announcementsFlagWrapper = (AnnouncementsFlagWrapper)obj;
356
357 if (Validator.equals(_announcementsFlag,
358 announcementsFlagWrapper._announcementsFlag)) {
359 return true;
360 }
361
362 return false;
363 }
364
365
368 public AnnouncementsFlag getWrappedAnnouncementsFlag() {
369 return _announcementsFlag;
370 }
371
372 @Override
373 public AnnouncementsFlag getWrappedModel() {
374 return _announcementsFlag;
375 }
376
377 @Override
378 public void resetOriginalValues() {
379 _announcementsFlag.resetOriginalValues();
380 }
381
382 private AnnouncementsFlag _announcementsFlag;
383 }