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  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  
22  import com.liferay.portlet.announcements.model.AnnouncementsFlag;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="AnnouncementsFlagUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       AnnouncementsFlagPersistence
36   * @see       AnnouncementsFlagPersistenceImpl
37   * @generated
38   */
39  public class AnnouncementsFlagUtil {
40      /**
41       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
42       */
43      public static void clearCache() {
44          getPersistence().clearCache();
45      }
46  
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(AnnouncementsFlag)
49       */
50      public static void clearCache(AnnouncementsFlag announcementsFlag) {
51          getPersistence().clearCache(announcementsFlag);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
56       */
57      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().countWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
66          throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
72       */
73      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
74          int start, int end) throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static AnnouncementsFlag remove(AnnouncementsFlag announcementsFlag)
82          throws SystemException {
83          return getPersistence().remove(announcementsFlag);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static AnnouncementsFlag update(
90          AnnouncementsFlag announcementsFlag, boolean merge)
91          throws SystemException {
92          return getPersistence().update(announcementsFlag, merge);
93      }
94  
95      public static void cacheResult(
96          com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag) {
97          getPersistence().cacheResult(announcementsFlag);
98      }
99  
100     public static void cacheResult(
101         java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> announcementsFlags) {
102         getPersistence().cacheResult(announcementsFlags);
103     }
104 
105     public static com.liferay.portlet.announcements.model.AnnouncementsFlag create(
106         long flagId) {
107         return getPersistence().create(flagId);
108     }
109 
110     public static com.liferay.portlet.announcements.model.AnnouncementsFlag remove(
111         long flagId)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.announcements.NoSuchFlagException {
114         return getPersistence().remove(flagId);
115     }
116 
117     /**
118      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
119      */
120     public static com.liferay.portlet.announcements.model.AnnouncementsFlag update(
121         com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag)
122         throws com.liferay.portal.SystemException {
123         return getPersistence().update(announcementsFlag);
124     }
125 
126     public static com.liferay.portlet.announcements.model.AnnouncementsFlag updateImpl(
127         com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag,
128         boolean merge) throws com.liferay.portal.SystemException {
129         return getPersistence().updateImpl(announcementsFlag, merge);
130     }
131 
132     public static com.liferay.portlet.announcements.model.AnnouncementsFlag findByPrimaryKey(
133         long flagId)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.announcements.NoSuchFlagException {
136         return getPersistence().findByPrimaryKey(flagId);
137     }
138 
139     public static com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByPrimaryKey(
140         long flagId) throws com.liferay.portal.SystemException {
141         return getPersistence().fetchByPrimaryKey(flagId);
142     }
143 
144     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId(
145         long entryId) throws com.liferay.portal.SystemException {
146         return getPersistence().findByEntryId(entryId);
147     }
148 
149     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId(
150         long entryId, int start, int end)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByEntryId(entryId, start, end);
153     }
154 
155     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId(
156         long entryId, int start, int end,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.SystemException {
159         return getPersistence()
160                    .findByEntryId(entryId, start, end, orderByComparator);
161     }
162 
163     public static com.liferay.portlet.announcements.model.AnnouncementsFlag findByEntryId_First(
164         long entryId,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.SystemException,
167             com.liferay.portlet.announcements.NoSuchFlagException {
168         return getPersistence().findByEntryId_First(entryId, orderByComparator);
169     }
170 
171     public static com.liferay.portlet.announcements.model.AnnouncementsFlag findByEntryId_Last(
172         long entryId,
173         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174         throws com.liferay.portal.SystemException,
175             com.liferay.portlet.announcements.NoSuchFlagException {
176         return getPersistence().findByEntryId_Last(entryId, orderByComparator);
177     }
178 
179     public static com.liferay.portlet.announcements.model.AnnouncementsFlag[] findByEntryId_PrevAndNext(
180         long flagId, long entryId,
181         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.announcements.NoSuchFlagException {
184         return getPersistence()
185                    .findByEntryId_PrevAndNext(flagId, entryId, orderByComparator);
186     }
187 
188     public static com.liferay.portlet.announcements.model.AnnouncementsFlag findByU_E_V(
189         long userId, long entryId, int value)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.announcements.NoSuchFlagException {
192         return getPersistence().findByU_E_V(userId, entryId, value);
193     }
194 
195     public static com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByU_E_V(
196         long userId, long entryId, int value)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().fetchByU_E_V(userId, entryId, value);
199     }
200 
201     public static com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByU_E_V(
202         long userId, long entryId, int value, boolean retrieveFromCache)
203         throws com.liferay.portal.SystemException {
204         return getPersistence()
205                    .fetchByU_E_V(userId, entryId, value, retrieveFromCache);
206     }
207 
208     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll()
209         throws com.liferay.portal.SystemException {
210         return getPersistence().findAll();
211     }
212 
213     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll(
214         int start, int end) throws com.liferay.portal.SystemException {
215         return getPersistence().findAll(start, end);
216     }
217 
218     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll(
219         int start, int end,
220         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
221         throws com.liferay.portal.SystemException {
222         return getPersistence().findAll(start, end, orderByComparator);
223     }
224 
225     public static void removeByEntryId(long entryId)
226         throws com.liferay.portal.SystemException {
227         getPersistence().removeByEntryId(entryId);
228     }
229 
230     public static void removeByU_E_V(long userId, long entryId, int value)
231         throws com.liferay.portal.SystemException,
232             com.liferay.portlet.announcements.NoSuchFlagException {
233         getPersistence().removeByU_E_V(userId, entryId, value);
234     }
235 
236     public static void removeAll() throws com.liferay.portal.SystemException {
237         getPersistence().removeAll();
238     }
239 
240     public static int countByEntryId(long entryId)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().countByEntryId(entryId);
243     }
244 
245     public static int countByU_E_V(long userId, long entryId, int value)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().countByU_E_V(userId, entryId, value);
248     }
249 
250     public static int countAll() throws com.liferay.portal.SystemException {
251         return getPersistence().countAll();
252     }
253 
254     public static AnnouncementsFlagPersistence getPersistence() {
255         if (_persistence == null) {
256             _persistence = (AnnouncementsFlagPersistence)PortalBeanLocatorUtil.locate(AnnouncementsFlagPersistence.class.getName());
257 
258             ReferenceRegistry.registerReference(AnnouncementsFlagUtil.class,
259                 "_persistence");
260         }
261 
262         return _persistence;
263     }
264 
265     public void setPersistence(AnnouncementsFlagPersistence persistence) {
266         _persistence = persistence;
267 
268         ReferenceRegistry.registerReference(AnnouncementsFlagUtil.class,
269             "_persistence");
270     }
271 
272     private static AnnouncementsFlagPersistence _persistence;
273 }