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 obc)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findByUserId(userId, start, end, obc);
144     }
145 
146     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_First(
147         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.announcements.NoSuchDeliveryException {
150         return getPersistence().findByUserId_First(userId, obc);
151     }
152 
153     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_Last(
154         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.announcements.NoSuchDeliveryException {
157         return getPersistence().findByUserId_Last(userId, obc);
158     }
159 
160     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery[] findByUserId_PrevAndNext(
161         long deliveryId, long userId,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException,
164             com.liferay.portlet.announcements.NoSuchDeliveryException {
165         return getPersistence().findByUserId_PrevAndNext(deliveryId, userId, obc);
166     }
167 
168     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByU_T(
169         long userId, java.lang.String type)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.announcements.NoSuchDeliveryException {
172         return getPersistence().findByU_T(userId, type);
173     }
174 
175     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
176         long userId, java.lang.String type)
177         throws com.liferay.portal.SystemException {
178         return getPersistence().fetchByU_T(userId, type);
179     }
180 
181     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
182         long userId, java.lang.String type, boolean retrieveFromCache)
183         throws com.liferay.portal.SystemException {
184         return getPersistence().fetchByU_T(userId, type, retrieveFromCache);
185     }
186 
187     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll()
188         throws com.liferay.portal.SystemException {
189         return getPersistence().findAll();
190     }
191 
192     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(
193         int start, int end) throws com.liferay.portal.SystemException {
194         return getPersistence().findAll(start, end);
195     }
196 
197     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(
198         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().findAll(start, end, obc);
201     }
202 
203     public static void removeByUserId(long userId)
204         throws com.liferay.portal.SystemException {
205         getPersistence().removeByUserId(userId);
206     }
207 
208     public static void removeByU_T(long userId, java.lang.String type)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portlet.announcements.NoSuchDeliveryException {
211         getPersistence().removeByU_T(userId, type);
212     }
213 
214     public static void removeAll() throws com.liferay.portal.SystemException {
215         getPersistence().removeAll();
216     }
217 
218     public static int countByUserId(long userId)
219         throws com.liferay.portal.SystemException {
220         return getPersistence().countByUserId(userId);
221     }
222 
223     public static int countByU_T(long userId, java.lang.String type)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().countByU_T(userId, type);
226     }
227 
228     public static int countAll() throws com.liferay.portal.SystemException {
229         return getPersistence().countAll();
230     }
231 
232     public static AnnouncementsDeliveryPersistence getPersistence() {
233         if (_persistence == null) {
234             _persistence = (AnnouncementsDeliveryPersistence)PortalBeanLocatorUtil.locate(AnnouncementsDeliveryPersistence.class.getName());
235         }
236 
237         return _persistence;
238     }
239 
240     public void setPersistence(AnnouncementsDeliveryPersistence persistence) {
241         _persistence = persistence;
242     }
243 
244     private static AnnouncementsDeliveryPersistence _persistence;
245 }