1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.announcements.service.persistence;
24  
25  
26  /**
27   * <a href="AnnouncementsDeliveryUtil.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       AnnouncementsDeliveryPersistence
36   * @see       AnnouncementsDeliveryPersistenceImpl
37   * @generated
38   */
39  public class AnnouncementsDeliveryUtil {
40      public static void cacheResult(
41          com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery) {
42          getPersistence().cacheResult(announcementsDelivery);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDeliveries) {
47          getPersistence().cacheResult(announcementsDeliveries);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portlet.announcements.model.AnnouncementsDelivery create(
55          long deliveryId) {
56          return getPersistence().create(deliveryId);
57      }
58  
59      public static com.liferay.portlet.announcements.model.AnnouncementsDelivery remove(
60          long deliveryId)
61          throws com.liferay.portal.SystemException,
62              com.liferay.portlet.announcements.NoSuchDeliveryException {
63          return getPersistence().remove(deliveryId);
64      }
65  
66      public static com.liferay.portlet.announcements.model.AnnouncementsDelivery remove(
67          com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(announcementsDelivery);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(AnnouncementsDelivery, boolean merge)}.
74       */
75      public static com.liferay.portlet.announcements.model.AnnouncementsDelivery update(
76          com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(announcementsDelivery);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  announcementsDelivery the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when announcementsDelivery is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portlet.announcements.model.AnnouncementsDelivery update(
94          com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery,
95          boolean merge) throws com.liferay.portal.SystemException {
96          return getPersistence().update(announcementsDelivery, merge);
97      }
98  
99      public static com.liferay.portlet.announcements.model.AnnouncementsDelivery updateImpl(
100         com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery,
101         boolean merge) throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(announcementsDelivery, merge);
103     }
104 
105     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByPrimaryKey(
106         long deliveryId)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.announcements.NoSuchDeliveryException {
109         return getPersistence().findByPrimaryKey(deliveryId);
110     }
111 
112     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByPrimaryKey(
113         long deliveryId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(deliveryId);
115     }
116 
117     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
118         long userId) throws com.liferay.portal.SystemException {
119         return getPersistence().findByUserId(userId);
120     }
121 
122     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
123         long userId, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUserId(userId, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId(
129         long userId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUserId(userId, start, end, obc);
133     }
134 
135     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_First(
136         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.announcements.NoSuchDeliveryException {
139         return getPersistence().findByUserId_First(userId, obc);
140     }
141 
142     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_Last(
143         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.announcements.NoSuchDeliveryException {
146         return getPersistence().findByUserId_Last(userId, obc);
147     }
148 
149     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery[] findByUserId_PrevAndNext(
150         long deliveryId, long userId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException,
153             com.liferay.portlet.announcements.NoSuchDeliveryException {
154         return getPersistence().findByUserId_PrevAndNext(deliveryId, userId, obc);
155     }
156 
157     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery findByU_T(
158         long userId, java.lang.String type)
159         throws com.liferay.portal.SystemException,
160             com.liferay.portlet.announcements.NoSuchDeliveryException {
161         return getPersistence().findByU_T(userId, type);
162     }
163 
164     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
165         long userId, java.lang.String type)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().fetchByU_T(userId, type);
168     }
169 
170     public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
171         long userId, java.lang.String type, boolean retrieveFromCache)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().fetchByU_T(userId, type, retrieveFromCache);
174     }
175 
176     public static java.util.List<Object> findWithDynamicQuery(
177         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
178         throws com.liferay.portal.SystemException {
179         return getPersistence().findWithDynamicQuery(dynamicQuery);
180     }
181 
182     public static java.util.List<Object> findWithDynamicQuery(
183         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
184         int end) throws com.liferay.portal.SystemException {
185         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
186     }
187 
188     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll()
189         throws com.liferay.portal.SystemException {
190         return getPersistence().findAll();
191     }
192 
193     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> 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.AnnouncementsDelivery> 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 removeByUserId(long userId)
205         throws com.liferay.portal.SystemException {
206         getPersistence().removeByUserId(userId);
207     }
208 
209     public static void removeByU_T(long userId, java.lang.String type)
210         throws com.liferay.portal.SystemException,
211             com.liferay.portlet.announcements.NoSuchDeliveryException {
212         getPersistence().removeByU_T(userId, type);
213     }
214 
215     public static void removeAll() throws com.liferay.portal.SystemException {
216         getPersistence().removeAll();
217     }
218 
219     public static int countByUserId(long userId)
220         throws com.liferay.portal.SystemException {
221         return getPersistence().countByUserId(userId);
222     }
223 
224     public static int countByU_T(long userId, java.lang.String type)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().countByU_T(userId, type);
227     }
228 
229     public static int countAll() throws com.liferay.portal.SystemException {
230         return getPersistence().countAll();
231     }
232 
233     public static AnnouncementsDeliveryPersistence getPersistence() {
234         return _persistence;
235     }
236 
237     public void setPersistence(AnnouncementsDeliveryPersistence persistence) {
238         _persistence = persistence;
239     }
240 
241     private static AnnouncementsDeliveryPersistence _persistence;
242 }