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.AnnouncementsDelivery;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="AnnouncementsDeliveryUtil.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       AnnouncementsDeliveryPersistence
35   * @see       AnnouncementsDeliveryPersistenceImpl
36   * @generated
37   */
38  public class AnnouncementsDeliveryUtil {
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 AnnouncementsDelivery remove(
66          AnnouncementsDelivery announcementsDelivery) throws SystemException {
67          return getPersistence().remove(announcementsDelivery);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static AnnouncementsDelivery update(
74          AnnouncementsDelivery announcementsDelivery, boolean merge)
75          throws SystemException {
76          return getPersistence().update(announcementsDelivery, merge);
77      }
78  
79      public static void cacheResult(
80          com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery) {
81          getPersistence().cacheResult(announcementsDelivery);
82      }
83  
84      public static void cacheResult(
85          java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDeliveries) {
86          getPersistence().cacheResult(announcementsDeliveries);
87      }
88  
89      public static com.liferay.portlet.announcements.model.AnnouncementsDelivery create(
90          long deliveryId) {
91          return getPersistence().create(deliveryId);
92      }
93  
94      public static com.liferay.portlet.announcements.model.AnnouncementsDelivery remove(
95          long deliveryId)
96          throws com.liferay.portal.SystemException,
97              com.liferay.portlet.announcements.NoSuchDeliveryException {
98          return getPersistence().remove(deliveryId);
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.AnnouncementsDelivery update(
105         com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery)
106         throws com.liferay.portal.SystemException {
107         return getPersistence().update(announcementsDelivery);
108     }
109 
110     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery updateImpl(
111         com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery,
112         boolean merge) throws com.liferay.portal.SystemException {
113         return getPersistence().updateImpl(announcementsDelivery, merge);
114     }
115 
116     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByPrimaryKey(
117         long deliveryId)
118         throws com.liferay.portal.SystemException,
119             com.liferay.portlet.announcements.NoSuchDeliveryException {
120         return getPersistence().findByPrimaryKey(deliveryId);
121     }
122 
123     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByPrimaryKey(
124         long deliveryId) throws com.liferay.portal.SystemException {
125         return getPersistence().fetchByPrimaryKey(deliveryId);
126     }
127 
128     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
129         long userId) throws com.liferay.portal.SystemException {
130         return getPersistence().findByUserId(userId);
131     }
132 
133     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
134         long userId, int start, int end)
135         throws com.liferay.portal.SystemException {
136         return getPersistence().findByUserId(userId, start, end);
137     }
138 
139     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
140         long userId, int start, int end,
141         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142         throws com.liferay.portal.SystemException {
143         return getPersistence()
144                    .findByUserId(userId, start, end, orderByComparator);
145     }
146 
147     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_First(
148         long userId,
149         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portlet.announcements.NoSuchDeliveryException {
152         return getPersistence().findByUserId_First(userId, orderByComparator);
153     }
154 
155     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_Last(
156         long userId,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.SystemException,
159             com.liferay.portlet.announcements.NoSuchDeliveryException {
160         return getPersistence().findByUserId_Last(userId, orderByComparator);
161     }
162 
163     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery[] findByUserId_PrevAndNext(
164         long deliveryId, long userId,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.SystemException,
167             com.liferay.portlet.announcements.NoSuchDeliveryException {
168         return getPersistence()
169                    .findByUserId_PrevAndNext(deliveryId, userId,
170             orderByComparator);
171     }
172 
173     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByU_T(
174         long userId, java.lang.String type)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.announcements.NoSuchDeliveryException {
177         return getPersistence().findByU_T(userId, type);
178     }
179 
180     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
181         long userId, java.lang.String type)
182         throws com.liferay.portal.SystemException {
183         return getPersistence().fetchByU_T(userId, type);
184     }
185 
186     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
187         long userId, java.lang.String type, boolean retrieveFromCache)
188         throws com.liferay.portal.SystemException {
189         return getPersistence().fetchByU_T(userId, type, retrieveFromCache);
190     }
191 
192     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll()
193         throws com.liferay.portal.SystemException {
194         return getPersistence().findAll();
195     }
196 
197     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(
198         int start, int end) throws com.liferay.portal.SystemException {
199         return getPersistence().findAll(start, end);
200     }
201 
202     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(
203         int start, int end,
204         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().findAll(start, end, orderByComparator);
207     }
208 
209     public static void removeByUserId(long userId)
210         throws com.liferay.portal.SystemException {
211         getPersistence().removeByUserId(userId);
212     }
213 
214     public static void removeByU_T(long userId, java.lang.String type)
215         throws com.liferay.portal.SystemException,
216             com.liferay.portlet.announcements.NoSuchDeliveryException {
217         getPersistence().removeByU_T(userId, type);
218     }
219 
220     public static void removeAll() throws com.liferay.portal.SystemException {
221         getPersistence().removeAll();
222     }
223 
224     public static int countByUserId(long userId)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().countByUserId(userId);
227     }
228 
229     public static int countByU_T(long userId, java.lang.String type)
230         throws com.liferay.portal.SystemException {
231         return getPersistence().countByU_T(userId, type);
232     }
233 
234     public static int countAll() throws com.liferay.portal.SystemException {
235         return getPersistence().countAll();
236     }
237 
238     public static AnnouncementsDeliveryPersistence getPersistence() {
239         if (_persistence == null) {
240             _persistence = (AnnouncementsDeliveryPersistence)PortalBeanLocatorUtil.locate(AnnouncementsDeliveryPersistence.class.getName());
241         }
242 
243         return _persistence;
244     }
245 
246     public void setPersistence(AnnouncementsDeliveryPersistence persistence) {
247         _persistence = persistence;
248     }
249 
250     private static AnnouncementsDeliveryPersistence _persistence;
251 }