001
014
015 package com.liferay.portlet.announcements.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class AnnouncementsFlagWrapper implements AnnouncementsFlag,
034 ModelWrapper<AnnouncementsFlag> {
035 public AnnouncementsFlagWrapper(AnnouncementsFlag announcementsFlag) {
036 _announcementsFlag = announcementsFlag;
037 }
038
039 public Class<?> getModelClass() {
040 return AnnouncementsFlag.class;
041 }
042
043 public String getModelClassName() {
044 return AnnouncementsFlag.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("flagId", getFlagId());
051 attributes.put("userId", getUserId());
052 attributes.put("createDate", getCreateDate());
053 attributes.put("entryId", getEntryId());
054 attributes.put("value", getValue());
055
056 return attributes;
057 }
058
059 public void setModelAttributes(Map<String, Object> attributes) {
060 Long flagId = (Long)attributes.get("flagId");
061
062 if (flagId != null) {
063 setFlagId(flagId);
064 }
065
066 Long userId = (Long)attributes.get("userId");
067
068 if (userId != null) {
069 setUserId(userId);
070 }
071
072 Date createDate = (Date)attributes.get("createDate");
073
074 if (createDate != null) {
075 setCreateDate(createDate);
076 }
077
078 Long entryId = (Long)attributes.get("entryId");
079
080 if (entryId != null) {
081 setEntryId(entryId);
082 }
083
084 Integer value = (Integer)attributes.get("value");
085
086 if (value != null) {
087 setValue(value);
088 }
089 }
090
091
096 public long getPrimaryKey() {
097 return _announcementsFlag.getPrimaryKey();
098 }
099
100
105 public void setPrimaryKey(long primaryKey) {
106 _announcementsFlag.setPrimaryKey(primaryKey);
107 }
108
109
114 public long getFlagId() {
115 return _announcementsFlag.getFlagId();
116 }
117
118
123 public void setFlagId(long flagId) {
124 _announcementsFlag.setFlagId(flagId);
125 }
126
127
132 public long getUserId() {
133 return _announcementsFlag.getUserId();
134 }
135
136
141 public void setUserId(long userId) {
142 _announcementsFlag.setUserId(userId);
143 }
144
145
151 public java.lang.String getUserUuid()
152 throws com.liferay.portal.kernel.exception.SystemException {
153 return _announcementsFlag.getUserUuid();
154 }
155
156
161 public void setUserUuid(java.lang.String userUuid) {
162 _announcementsFlag.setUserUuid(userUuid);
163 }
164
165
170 public java.util.Date getCreateDate() {
171 return _announcementsFlag.getCreateDate();
172 }
173
174
179 public void setCreateDate(java.util.Date createDate) {
180 _announcementsFlag.setCreateDate(createDate);
181 }
182
183
188 public long getEntryId() {
189 return _announcementsFlag.getEntryId();
190 }
191
192
197 public void setEntryId(long entryId) {
198 _announcementsFlag.setEntryId(entryId);
199 }
200
201
206 public int getValue() {
207 return _announcementsFlag.getValue();
208 }
209
210
215 public void setValue(int value) {
216 _announcementsFlag.setValue(value);
217 }
218
219 public boolean isNew() {
220 return _announcementsFlag.isNew();
221 }
222
223 public void setNew(boolean n) {
224 _announcementsFlag.setNew(n);
225 }
226
227 public boolean isCachedModel() {
228 return _announcementsFlag.isCachedModel();
229 }
230
231 public void setCachedModel(boolean cachedModel) {
232 _announcementsFlag.setCachedModel(cachedModel);
233 }
234
235 public boolean isEscapedModel() {
236 return _announcementsFlag.isEscapedModel();
237 }
238
239 public java.io.Serializable getPrimaryKeyObj() {
240 return _announcementsFlag.getPrimaryKeyObj();
241 }
242
243 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
244 _announcementsFlag.setPrimaryKeyObj(primaryKeyObj);
245 }
246
247 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
248 return _announcementsFlag.getExpandoBridge();
249 }
250
251 public void setExpandoBridgeAttributes(
252 com.liferay.portal.service.ServiceContext serviceContext) {
253 _announcementsFlag.setExpandoBridgeAttributes(serviceContext);
254 }
255
256 @Override
257 public java.lang.Object clone() {
258 return new AnnouncementsFlagWrapper((AnnouncementsFlag)_announcementsFlag.clone());
259 }
260
261 public int compareTo(
262 com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag) {
263 return _announcementsFlag.compareTo(announcementsFlag);
264 }
265
266 @Override
267 public int hashCode() {
268 return _announcementsFlag.hashCode();
269 }
270
271 public com.liferay.portal.model.CacheModel<com.liferay.portlet.announcements.model.AnnouncementsFlag> toCacheModel() {
272 return _announcementsFlag.toCacheModel();
273 }
274
275 public com.liferay.portlet.announcements.model.AnnouncementsFlag toEscapedModel() {
276 return new AnnouncementsFlagWrapper(_announcementsFlag.toEscapedModel());
277 }
278
279 public com.liferay.portlet.announcements.model.AnnouncementsFlag toUnescapedModel() {
280 return new AnnouncementsFlagWrapper(_announcementsFlag.toUnescapedModel());
281 }
282
283 @Override
284 public java.lang.String toString() {
285 return _announcementsFlag.toString();
286 }
287
288 public java.lang.String toXmlString() {
289 return _announcementsFlag.toXmlString();
290 }
291
292 public void persist()
293 throws com.liferay.portal.kernel.exception.SystemException {
294 _announcementsFlag.persist();
295 }
296
297 @Override
298 public boolean equals(Object obj) {
299 if (this == obj) {
300 return true;
301 }
302
303 if (!(obj instanceof AnnouncementsFlagWrapper)) {
304 return false;
305 }
306
307 AnnouncementsFlagWrapper announcementsFlagWrapper = (AnnouncementsFlagWrapper)obj;
308
309 if (Validator.equals(_announcementsFlag,
310 announcementsFlagWrapper._announcementsFlag)) {
311 return true;
312 }
313
314 return false;
315 }
316
317
320 public AnnouncementsFlag getWrappedAnnouncementsFlag() {
321 return _announcementsFlag;
322 }
323
324 public AnnouncementsFlag getWrappedModel() {
325 return _announcementsFlag;
326 }
327
328 public void resetOriginalValues() {
329 _announcementsFlag.resetOriginalValues();
330 }
331
332 private AnnouncementsFlag _announcementsFlag;
333 }