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.ratings.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.ratings.model.RatingsStats;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="RatingsStatsUtil.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       RatingsStatsPersistence
36   * @see       RatingsStatsPersistenceImpl
37   * @generated
38   */
39  public class RatingsStatsUtil {
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(RatingsStats)
49       */
50      public static void clearCache(RatingsStats ratingsStats) {
51          getPersistence().clearCache(ratingsStats);
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 RatingsStats remove(RatingsStats ratingsStats)
82          throws SystemException {
83          return getPersistence().remove(ratingsStats);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static RatingsStats update(RatingsStats ratingsStats, boolean merge)
90          throws SystemException {
91          return getPersistence().update(ratingsStats, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.ratings.model.RatingsStats ratingsStats) {
96          getPersistence().cacheResult(ratingsStats);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.ratings.model.RatingsStats> ratingsStatses) {
101         getPersistence().cacheResult(ratingsStatses);
102     }
103 
104     public static com.liferay.portlet.ratings.model.RatingsStats create(
105         long statsId) {
106         return getPersistence().create(statsId);
107     }
108 
109     public static com.liferay.portlet.ratings.model.RatingsStats remove(
110         long statsId)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.ratings.NoSuchStatsException {
113         return getPersistence().remove(statsId);
114     }
115 
116     /**
117      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
118      */
119     public static com.liferay.portlet.ratings.model.RatingsStats update(
120         com.liferay.portlet.ratings.model.RatingsStats ratingsStats)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().update(ratingsStats);
123     }
124 
125     public static com.liferay.portlet.ratings.model.RatingsStats updateImpl(
126         com.liferay.portlet.ratings.model.RatingsStats ratingsStats,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getPersistence().updateImpl(ratingsStats, merge);
129     }
130 
131     public static com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey(
132         long statsId)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.ratings.NoSuchStatsException {
135         return getPersistence().findByPrimaryKey(statsId);
136     }
137 
138     public static com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey(
139         long statsId) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(statsId);
141     }
142 
143     public static com.liferay.portlet.ratings.model.RatingsStats findByC_C(
144         long classNameId, long classPK)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.ratings.NoSuchStatsException {
147         return getPersistence().findByC_C(classNameId, classPK);
148     }
149 
150     public static com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
151         long classNameId, long classPK)
152         throws com.liferay.portal.SystemException {
153         return getPersistence().fetchByC_C(classNameId, classPK);
154     }
155 
156     public static com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
157         long classNameId, long classPK, boolean retrieveFromCache)
158         throws com.liferay.portal.SystemException {
159         return getPersistence()
160                    .fetchByC_C(classNameId, classPK, retrieveFromCache);
161     }
162 
163     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll()
164         throws com.liferay.portal.SystemException {
165         return getPersistence().findAll();
166     }
167 
168     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
169         int start, int end) throws com.liferay.portal.SystemException {
170         return getPersistence().findAll(start, end);
171     }
172 
173     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
174         int start, int end,
175         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176         throws com.liferay.portal.SystemException {
177         return getPersistence().findAll(start, end, orderByComparator);
178     }
179 
180     public static void removeByC_C(long classNameId, long classPK)
181         throws com.liferay.portal.SystemException,
182             com.liferay.portlet.ratings.NoSuchStatsException {
183         getPersistence().removeByC_C(classNameId, classPK);
184     }
185 
186     public static void removeAll() throws com.liferay.portal.SystemException {
187         getPersistence().removeAll();
188     }
189 
190     public static int countByC_C(long classNameId, long classPK)
191         throws com.liferay.portal.SystemException {
192         return getPersistence().countByC_C(classNameId, classPK);
193     }
194 
195     public static int countAll() throws com.liferay.portal.SystemException {
196         return getPersistence().countAll();
197     }
198 
199     public static RatingsStatsPersistence getPersistence() {
200         if (_persistence == null) {
201             _persistence = (RatingsStatsPersistence)PortalBeanLocatorUtil.locate(RatingsStatsPersistence.class.getName());
202 
203             ReferenceRegistry.registerReference(RatingsStatsUtil.class,
204                 "_persistence");
205         }
206 
207         return _persistence;
208     }
209 
210     public void setPersistence(RatingsStatsPersistence persistence) {
211         _persistence = persistence;
212 
213         ReferenceRegistry.registerReference(RatingsStatsUtil.class,
214             "_persistence");
215     }
216 
217     private static RatingsStatsPersistence _persistence;
218 }