001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.announcements.model;
016    
017    import com.liferay.portal.model.ModelWrapper;
018    
019    import java.util.Date;
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link AnnouncementsFlag}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       AnnouncementsFlag
030     * @generated
031     */
032    public class AnnouncementsFlagWrapper implements AnnouncementsFlag,
033            ModelWrapper<AnnouncementsFlag> {
034            public AnnouncementsFlagWrapper(AnnouncementsFlag announcementsFlag) {
035                    _announcementsFlag = announcementsFlag;
036            }
037    
038            public Class<?> getModelClass() {
039                    return AnnouncementsFlag.class;
040            }
041    
042            public String getModelClassName() {
043                    return AnnouncementsFlag.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("flagId", getFlagId());
050                    attributes.put("userId", getUserId());
051                    attributes.put("createDate", getCreateDate());
052                    attributes.put("entryId", getEntryId());
053                    attributes.put("value", getValue());
054    
055                    return attributes;
056            }
057    
058            public void setModelAttributes(Map<String, Object> attributes) {
059                    Long flagId = (Long)attributes.get("flagId");
060    
061                    if (flagId != null) {
062                            setFlagId(flagId);
063                    }
064    
065                    Long userId = (Long)attributes.get("userId");
066    
067                    if (userId != null) {
068                            setUserId(userId);
069                    }
070    
071                    Date createDate = (Date)attributes.get("createDate");
072    
073                    if (createDate != null) {
074                            setCreateDate(createDate);
075                    }
076    
077                    Long entryId = (Long)attributes.get("entryId");
078    
079                    if (entryId != null) {
080                            setEntryId(entryId);
081                    }
082    
083                    Integer value = (Integer)attributes.get("value");
084    
085                    if (value != null) {
086                            setValue(value);
087                    }
088            }
089    
090            /**
091            * Returns the primary key of this announcements flag.
092            *
093            * @return the primary key of this announcements flag
094            */
095            public long getPrimaryKey() {
096                    return _announcementsFlag.getPrimaryKey();
097            }
098    
099            /**
100            * Sets the primary key of this announcements flag.
101            *
102            * @param primaryKey the primary key of this announcements flag
103            */
104            public void setPrimaryKey(long primaryKey) {
105                    _announcementsFlag.setPrimaryKey(primaryKey);
106            }
107    
108            /**
109            * Returns the flag ID of this announcements flag.
110            *
111            * @return the flag ID of this announcements flag
112            */
113            public long getFlagId() {
114                    return _announcementsFlag.getFlagId();
115            }
116    
117            /**
118            * Sets the flag ID of this announcements flag.
119            *
120            * @param flagId the flag ID of this announcements flag
121            */
122            public void setFlagId(long flagId) {
123                    _announcementsFlag.setFlagId(flagId);
124            }
125    
126            /**
127            * Returns the user ID of this announcements flag.
128            *
129            * @return the user ID of this announcements flag
130            */
131            public long getUserId() {
132                    return _announcementsFlag.getUserId();
133            }
134    
135            /**
136            * Sets the user ID of this announcements flag.
137            *
138            * @param userId the user ID of this announcements flag
139            */
140            public void setUserId(long userId) {
141                    _announcementsFlag.setUserId(userId);
142            }
143    
144            /**
145            * Returns the user uuid of this announcements flag.
146            *
147            * @return the user uuid of this announcements flag
148            * @throws SystemException if a system exception occurred
149            */
150            public java.lang.String getUserUuid()
151                    throws com.liferay.portal.kernel.exception.SystemException {
152                    return _announcementsFlag.getUserUuid();
153            }
154    
155            /**
156            * Sets the user uuid of this announcements flag.
157            *
158            * @param userUuid the user uuid of this announcements flag
159            */
160            public void setUserUuid(java.lang.String userUuid) {
161                    _announcementsFlag.setUserUuid(userUuid);
162            }
163    
164            /**
165            * Returns the create date of this announcements flag.
166            *
167            * @return the create date of this announcements flag
168            */
169            public java.util.Date getCreateDate() {
170                    return _announcementsFlag.getCreateDate();
171            }
172    
173            /**
174            * Sets the create date of this announcements flag.
175            *
176            * @param createDate the create date of this announcements flag
177            */
178            public void setCreateDate(java.util.Date createDate) {
179                    _announcementsFlag.setCreateDate(createDate);
180            }
181    
182            /**
183            * Returns the entry ID of this announcements flag.
184            *
185            * @return the entry ID of this announcements flag
186            */
187            public long getEntryId() {
188                    return _announcementsFlag.getEntryId();
189            }
190    
191            /**
192            * Sets the entry ID of this announcements flag.
193            *
194            * @param entryId the entry ID of this announcements flag
195            */
196            public void setEntryId(long entryId) {
197                    _announcementsFlag.setEntryId(entryId);
198            }
199    
200            /**
201            * Returns the value of this announcements flag.
202            *
203            * @return the value of this announcements flag
204            */
205            public int getValue() {
206                    return _announcementsFlag.getValue();
207            }
208    
209            /**
210            * Sets the value of this announcements flag.
211            *
212            * @param value the value of this announcements flag
213            */
214            public void setValue(int value) {
215                    _announcementsFlag.setValue(value);
216            }
217    
218            public boolean isNew() {
219                    return _announcementsFlag.isNew();
220            }
221    
222            public void setNew(boolean n) {
223                    _announcementsFlag.setNew(n);
224            }
225    
226            public boolean isCachedModel() {
227                    return _announcementsFlag.isCachedModel();
228            }
229    
230            public void setCachedModel(boolean cachedModel) {
231                    _announcementsFlag.setCachedModel(cachedModel);
232            }
233    
234            public boolean isEscapedModel() {
235                    return _announcementsFlag.isEscapedModel();
236            }
237    
238            public java.io.Serializable getPrimaryKeyObj() {
239                    return _announcementsFlag.getPrimaryKeyObj();
240            }
241    
242            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
243                    _announcementsFlag.setPrimaryKeyObj(primaryKeyObj);
244            }
245    
246            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
247                    return _announcementsFlag.getExpandoBridge();
248            }
249    
250            public void setExpandoBridgeAttributes(
251                    com.liferay.portal.service.ServiceContext serviceContext) {
252                    _announcementsFlag.setExpandoBridgeAttributes(serviceContext);
253            }
254    
255            @Override
256            public java.lang.Object clone() {
257                    return new AnnouncementsFlagWrapper((AnnouncementsFlag)_announcementsFlag.clone());
258            }
259    
260            public int compareTo(
261                    com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag) {
262                    return _announcementsFlag.compareTo(announcementsFlag);
263            }
264    
265            @Override
266            public int hashCode() {
267                    return _announcementsFlag.hashCode();
268            }
269    
270            public com.liferay.portal.model.CacheModel<com.liferay.portlet.announcements.model.AnnouncementsFlag> toCacheModel() {
271                    return _announcementsFlag.toCacheModel();
272            }
273    
274            public com.liferay.portlet.announcements.model.AnnouncementsFlag toEscapedModel() {
275                    return new AnnouncementsFlagWrapper(_announcementsFlag.toEscapedModel());
276            }
277    
278            @Override
279            public java.lang.String toString() {
280                    return _announcementsFlag.toString();
281            }
282    
283            public java.lang.String toXmlString() {
284                    return _announcementsFlag.toXmlString();
285            }
286    
287            public void persist()
288                    throws com.liferay.portal.kernel.exception.SystemException {
289                    _announcementsFlag.persist();
290            }
291    
292            /**
293             * @deprecated Renamed to {@link #getWrappedModel}
294             */
295            public AnnouncementsFlag getWrappedAnnouncementsFlag() {
296                    return _announcementsFlag;
297            }
298    
299            public AnnouncementsFlag getWrappedModel() {
300                    return _announcementsFlag;
301            }
302    
303            public void resetOriginalValues() {
304                    _announcementsFlag.resetOriginalValues();
305            }
306    
307            private AnnouncementsFlag _announcementsFlag;
308    }