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.ratings.service.persistence;
24  
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      public static void cacheResult(
41          com.liferay.portlet.ratings.model.RatingsStats ratingsStats) {
42          getPersistence().cacheResult(ratingsStats);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portlet.ratings.model.RatingsStats> ratingsStatses) {
47          getPersistence().cacheResult(ratingsStatses);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portlet.ratings.model.RatingsStats create(
55          long statsId) {
56          return getPersistence().create(statsId);
57      }
58  
59      public static com.liferay.portlet.ratings.model.RatingsStats remove(
60          long statsId)
61          throws com.liferay.portal.SystemException,
62              com.liferay.portlet.ratings.NoSuchStatsException {
63          return getPersistence().remove(statsId);
64      }
65  
66      public static com.liferay.portlet.ratings.model.RatingsStats remove(
67          com.liferay.portlet.ratings.model.RatingsStats ratingsStats)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(ratingsStats);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(RatingsStats, boolean merge)}.
74       */
75      public static com.liferay.portlet.ratings.model.RatingsStats update(
76          com.liferay.portlet.ratings.model.RatingsStats ratingsStats)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(ratingsStats);
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  ratingsStats 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 ratingsStats 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.ratings.model.RatingsStats update(
94          com.liferay.portlet.ratings.model.RatingsStats ratingsStats,
95          boolean merge) throws com.liferay.portal.SystemException {
96          return getPersistence().update(ratingsStats, merge);
97      }
98  
99      public static com.liferay.portlet.ratings.model.RatingsStats updateImpl(
100         com.liferay.portlet.ratings.model.RatingsStats ratingsStats,
101         boolean merge) throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(ratingsStats, merge);
103     }
104 
105     public static com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey(
106         long statsId)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.ratings.NoSuchStatsException {
109         return getPersistence().findByPrimaryKey(statsId);
110     }
111 
112     public static com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey(
113         long statsId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(statsId);
115     }
116 
117     public static com.liferay.portlet.ratings.model.RatingsStats findByC_C(
118         long classNameId, long classPK)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.ratings.NoSuchStatsException {
121         return getPersistence().findByC_C(classNameId, classPK);
122     }
123 
124     public static com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
125         long classNameId, long classPK)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().fetchByC_C(classNameId, classPK);
128     }
129 
130     public static com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
131         long classNameId, long classPK, boolean retrieveFromCache)
132         throws com.liferay.portal.SystemException {
133         return getPersistence()
134                    .fetchByC_C(classNameId, classPK, retrieveFromCache);
135     }
136 
137     public static java.util.List<Object> findWithDynamicQuery(
138         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
139         throws com.liferay.portal.SystemException {
140         return getPersistence().findWithDynamicQuery(dynamicQuery);
141     }
142 
143     public static java.util.List<Object> findWithDynamicQuery(
144         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
145         int end) throws com.liferay.portal.SystemException {
146         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
147     }
148 
149     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll()
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findAll();
152     }
153 
154     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
155         int start, int end) throws com.liferay.portal.SystemException {
156         return getPersistence().findAll(start, end);
157     }
158 
159     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
160         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findAll(start, end, obc);
163     }
164 
165     public static void removeByC_C(long classNameId, long classPK)
166         throws com.liferay.portal.SystemException,
167             com.liferay.portlet.ratings.NoSuchStatsException {
168         getPersistence().removeByC_C(classNameId, classPK);
169     }
170 
171     public static void removeAll() throws com.liferay.portal.SystemException {
172         getPersistence().removeAll();
173     }
174 
175     public static int countByC_C(long classNameId, long classPK)
176         throws com.liferay.portal.SystemException {
177         return getPersistence().countByC_C(classNameId, classPK);
178     }
179 
180     public static int countAll() throws com.liferay.portal.SystemException {
181         return getPersistence().countAll();
182     }
183 
184     public static RatingsStatsPersistence getPersistence() {
185         return _persistence;
186     }
187 
188     public void setPersistence(RatingsStatsPersistence persistence) {
189         _persistence = persistence;
190     }
191 
192     private static RatingsStatsPersistence _persistence;
193 }