1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.announcements.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
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.kernel.exception.SystemException,
97              com.liferay.portlet.announcements.NoSuchDeliveryException {
98          return getPersistence().remove(deliveryId);
99      }
100 
101     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery updateImpl(
102         com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery,
103         boolean merge)
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getPersistence().updateImpl(announcementsDelivery, merge);
106     }
107 
108     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByPrimaryKey(
109         long deliveryId)
110         throws com.liferay.portal.kernel.exception.SystemException,
111             com.liferay.portlet.announcements.NoSuchDeliveryException {
112         return getPersistence().findByPrimaryKey(deliveryId);
113     }
114 
115     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByPrimaryKey(
116         long deliveryId)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getPersistence().fetchByPrimaryKey(deliveryId);
119     }
120 
121     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
122         long userId) throws com.liferay.portal.kernel.exception.SystemException {
123         return getPersistence().findByUserId(userId);
124     }
125 
126     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
127         long userId, int start, int end)
128         throws com.liferay.portal.kernel.exception.SystemException {
129         return getPersistence().findByUserId(userId, start, end);
130     }
131 
132     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
133         long userId, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByUserId(userId, start, end, obc);
137     }
138 
139     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_First(
140         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.kernel.exception.SystemException,
142             com.liferay.portlet.announcements.NoSuchDeliveryException {
143         return getPersistence().findByUserId_First(userId, obc);
144     }
145 
146     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_Last(
147         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.kernel.exception.SystemException,
149             com.liferay.portlet.announcements.NoSuchDeliveryException {
150         return getPersistence().findByUserId_Last(userId, obc);
151     }
152 
153     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery[] findByUserId_PrevAndNext(
154         long deliveryId, long userId,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.kernel.exception.SystemException,
157             com.liferay.portlet.announcements.NoSuchDeliveryException {
158         return getPersistence().findByUserId_PrevAndNext(deliveryId, userId, obc);
159     }
160 
161     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByU_T(
162         long userId, java.lang.String type)
163         throws com.liferay.portal.kernel.exception.SystemException,
164             com.liferay.portlet.announcements.NoSuchDeliveryException {
165         return getPersistence().findByU_T(userId, type);
166     }
167 
168     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
169         long userId, java.lang.String type)
170         throws com.liferay.portal.kernel.exception.SystemException {
171         return getPersistence().fetchByU_T(userId, type);
172     }
173 
174     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
175         long userId, java.lang.String type, boolean retrieveFromCache)
176         throws com.liferay.portal.kernel.exception.SystemException {
177         return getPersistence().fetchByU_T(userId, type, retrieveFromCache);
178     }
179 
180     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll()
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getPersistence().findAll();
183     }
184 
185     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(
186         int start, int end)
187         throws com.liferay.portal.kernel.exception.SystemException {
188         return getPersistence().findAll(start, end);
189     }
190 
191     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(
192         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.kernel.exception.SystemException {
194         return getPersistence().findAll(start, end, obc);
195     }
196 
197     public static void removeByUserId(long userId)
198         throws com.liferay.portal.kernel.exception.SystemException {
199         getPersistence().removeByUserId(userId);
200     }
201 
202     public static void removeByU_T(long userId, java.lang.String type)
203         throws com.liferay.portal.kernel.exception.SystemException,
204             com.liferay.portlet.announcements.NoSuchDeliveryException {
205         getPersistence().removeByU_T(userId, type);
206     }
207 
208     public static void removeAll()
209         throws com.liferay.portal.kernel.exception.SystemException {
210         getPersistence().removeAll();
211     }
212 
213     public static int countByUserId(long userId)
214         throws com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence().countByUserId(userId);
216     }
217 
218     public static int countByU_T(long userId, java.lang.String type)
219         throws com.liferay.portal.kernel.exception.SystemException {
220         return getPersistence().countByU_T(userId, type);
221     }
222 
223     public static int countAll()
224         throws com.liferay.portal.kernel.exception.SystemException {
225         return getPersistence().countAll();
226     }
227 
228     public static AnnouncementsDeliveryPersistence getPersistence() {
229         if (_persistence == null) {
230             _persistence = (AnnouncementsDeliveryPersistence)PortalBeanLocatorUtil.locate(AnnouncementsDeliveryPersistence.class.getName());
231         }
232 
233         return _persistence;
234     }
235 
236     public void setPersistence(AnnouncementsDeliveryPersistence persistence) {
237         _persistence = persistence;
238     }
239 
240     private static AnnouncementsDeliveryPersistence _persistence;
241 }