1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.announcements.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  
21  import com.liferay.portlet.announcements.model.AnnouncementsFlag;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="AnnouncementsFlagUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       AnnouncementsFlagPersistence
35   * @see       AnnouncementsFlagPersistenceImpl
36   * @generated
37   */
38  public class AnnouncementsFlagUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
48       */
49      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50          throws SystemException {
51          return getPersistence().findWithDynamicQuery(dynamicQuery);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58          int start, int end) throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
64       */
65      public static AnnouncementsFlag remove(AnnouncementsFlag announcementsFlag)
66          throws SystemException {
67          return getPersistence().remove(announcementsFlag);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static AnnouncementsFlag update(
74          AnnouncementsFlag announcementsFlag, boolean merge)
75          throws SystemException {
76          return getPersistence().update(announcementsFlag, merge);
77      }
78  
79      public static void cacheResult(
80          com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag) {
81          getPersistence().cacheResult(announcementsFlag);
82      }
83  
84      public static void cacheResult(
85          java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> announcementsFlags) {
86          getPersistence().cacheResult(announcementsFlags);
87      }
88  
89      public static com.liferay.portlet.announcements.model.AnnouncementsFlag create(
90          long flagId) {
91          return getPersistence().create(flagId);
92      }
93  
94      public static com.liferay.portlet.announcements.model.AnnouncementsFlag remove(
95          long flagId)
96          throws com.liferay.portal.SystemException,
97              com.liferay.portlet.announcements.NoSuchFlagException {
98          return getPersistence().remove(flagId);
99      }
100 
101     /**
102      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
103      */
104     public static com.liferay.portlet.announcements.model.AnnouncementsFlag update(
105         com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag)
106         throws com.liferay.portal.SystemException {
107         return getPersistence().update(announcementsFlag);
108     }
109 
110     public static com.liferay.portlet.announcements.model.AnnouncementsFlag updateImpl(
111         com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag,
112         boolean merge) throws com.liferay.portal.SystemException {
113         return getPersistence().updateImpl(announcementsFlag, merge);
114     }
115 
116     public static com.liferay.portlet.announcements.model.AnnouncementsFlag findByPrimaryKey(
117         long flagId)
118         throws com.liferay.portal.SystemException,
119             com.liferay.portlet.announcements.NoSuchFlagException {
120         return getPersistence().findByPrimaryKey(flagId);
121     }
122 
123     public static com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByPrimaryKey(
124         long flagId) throws com.liferay.portal.SystemException {
125         return getPersistence().fetchByPrimaryKey(flagId);
126     }
127 
128     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId(
129         long entryId) throws com.liferay.portal.SystemException {
130         return getPersistence().findByEntryId(entryId);
131     }
132 
133     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId(
134         long entryId, int start, int end)
135         throws com.liferay.portal.SystemException {
136         return getPersistence().findByEntryId(entryId, start, end);
137     }
138 
139     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId(
140         long entryId, int start, int end,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findByEntryId(entryId, start, end, obc);
144     }
145 
146     public static com.liferay.portlet.announcements.model.AnnouncementsFlag findByEntryId_First(
147         long entryId, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.announcements.NoSuchFlagException {
150         return getPersistence().findByEntryId_First(entryId, obc);
151     }
152 
153     public static com.liferay.portlet.announcements.model.AnnouncementsFlag findByEntryId_Last(
154         long entryId, com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.announcements.NoSuchFlagException {
157         return getPersistence().findByEntryId_Last(entryId, obc);
158     }
159 
160     public static com.liferay.portlet.announcements.model.AnnouncementsFlag[] findByEntryId_PrevAndNext(
161         long flagId, long entryId,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException,
164             com.liferay.portlet.announcements.NoSuchFlagException {
165         return getPersistence().findByEntryId_PrevAndNext(flagId, entryId, obc);
166     }
167 
168     public static com.liferay.portlet.announcements.model.AnnouncementsFlag findByU_E_V(
169         long userId, long entryId, int value)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.announcements.NoSuchFlagException {
172         return getPersistence().findByU_E_V(userId, entryId, value);
173     }
174 
175     public static com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByU_E_V(
176         long userId, long entryId, int value)
177         throws com.liferay.portal.SystemException {
178         return getPersistence().fetchByU_E_V(userId, entryId, value);
179     }
180 
181     public static com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByU_E_V(
182         long userId, long entryId, int value, boolean retrieveFromCache)
183         throws com.liferay.portal.SystemException {
184         return getPersistence()
185                    .fetchByU_E_V(userId, entryId, value, retrieveFromCache);
186     }
187 
188     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll()
189         throws com.liferay.portal.SystemException {
190         return getPersistence().findAll();
191     }
192 
193     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll(
194         int start, int end) throws com.liferay.portal.SystemException {
195         return getPersistence().findAll(start, end);
196     }
197 
198     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll(
199         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
200         throws com.liferay.portal.SystemException {
201         return getPersistence().findAll(start, end, obc);
202     }
203 
204     public static void removeByEntryId(long entryId)
205         throws com.liferay.portal.SystemException {
206         getPersistence().removeByEntryId(entryId);
207     }
208 
209     public static void removeByU_E_V(long userId, long entryId, int value)
210         throws com.liferay.portal.SystemException,
211             com.liferay.portlet.announcements.NoSuchFlagException {
212         getPersistence().removeByU_E_V(userId, entryId, value);
213     }
214 
215     public static void removeAll() throws com.liferay.portal.SystemException {
216         getPersistence().removeAll();
217     }
218 
219     public static int countByEntryId(long entryId)
220         throws com.liferay.portal.SystemException {
221         return getPersistence().countByEntryId(entryId);
222     }
223 
224     public static int countByU_E_V(long userId, long entryId, int value)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().countByU_E_V(userId, entryId, value);
227     }
228 
229     public static int countAll() throws com.liferay.portal.SystemException {
230         return getPersistence().countAll();
231     }
232 
233     public static AnnouncementsFlagPersistence getPersistence() {
234         if (_persistence == null) {
235             _persistence = (AnnouncementsFlagPersistence)PortalBeanLocatorUtil.locate(AnnouncementsFlagPersistence.class.getName());
236         }
237 
238         return _persistence;
239     }
240 
241     public void setPersistence(AnnouncementsFlagPersistence persistence) {
242         _persistence = persistence;
243     }
244 
245     private static AnnouncementsFlagPersistence _persistence;
246 }