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.ratings.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.ratings.model.RatingsStats;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="RatingsStatsUtil.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       RatingsStatsPersistence
35   * @see       RatingsStatsPersistenceImpl
36   * @generated
37   */
38  public class RatingsStatsUtil {
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#clearCache(RatingsStats)
48       */
49      public static void clearCache(RatingsStats ratingsStats) {
50          getPersistence().clearCache(ratingsStats);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<RatingsStats> findWithDynamicQuery(
65          DynamicQuery dynamicQuery) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<RatingsStats> findWithDynamicQuery(
73          DynamicQuery dynamicQuery, int start, int end)
74          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.kernel.exception.SystemException,
112             com.liferay.portlet.ratings.NoSuchStatsException {
113         return getPersistence().remove(statsId);
114     }
115 
116     public static com.liferay.portlet.ratings.model.RatingsStats updateImpl(
117         com.liferay.portlet.ratings.model.RatingsStats ratingsStats,
118         boolean merge)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getPersistence().updateImpl(ratingsStats, merge);
121     }
122 
123     public static com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey(
124         long statsId)
125         throws com.liferay.portal.kernel.exception.SystemException,
126             com.liferay.portlet.ratings.NoSuchStatsException {
127         return getPersistence().findByPrimaryKey(statsId);
128     }
129 
130     public static com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey(
131         long statsId)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().fetchByPrimaryKey(statsId);
134     }
135 
136     public static com.liferay.portlet.ratings.model.RatingsStats findByC_C(
137         long classNameId, long classPK)
138         throws com.liferay.portal.kernel.exception.SystemException,
139             com.liferay.portlet.ratings.NoSuchStatsException {
140         return getPersistence().findByC_C(classNameId, classPK);
141     }
142 
143     public static com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
144         long classNameId, long classPK)
145         throws com.liferay.portal.kernel.exception.SystemException {
146         return getPersistence().fetchByC_C(classNameId, classPK);
147     }
148 
149     public static com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
150         long classNameId, long classPK, boolean retrieveFromCache)
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence()
153                    .fetchByC_C(classNameId, classPK, retrieveFromCache);
154     }
155 
156     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll()
157         throws com.liferay.portal.kernel.exception.SystemException {
158         return getPersistence().findAll();
159     }
160 
161     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
162         int start, int end)
163         throws com.liferay.portal.kernel.exception.SystemException {
164         return getPersistence().findAll(start, end);
165     }
166 
167     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
168         int start, int end,
169         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
170         throws com.liferay.portal.kernel.exception.SystemException {
171         return getPersistence().findAll(start, end, orderByComparator);
172     }
173 
174     public static void removeByC_C(long classNameId, long classPK)
175         throws com.liferay.portal.kernel.exception.SystemException,
176             com.liferay.portlet.ratings.NoSuchStatsException {
177         getPersistence().removeByC_C(classNameId, classPK);
178     }
179 
180     public static void removeAll()
181         throws com.liferay.portal.kernel.exception.SystemException {
182         getPersistence().removeAll();
183     }
184 
185     public static int countByC_C(long classNameId, long classPK)
186         throws com.liferay.portal.kernel.exception.SystemException {
187         return getPersistence().countByC_C(classNameId, classPK);
188     }
189 
190     public static int countAll()
191         throws com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().countAll();
193     }
194 
195     public static RatingsStatsPersistence getPersistence() {
196         if (_persistence == null) {
197             _persistence = (RatingsStatsPersistence)PortalBeanLocatorUtil.locate(RatingsStatsPersistence.class.getName());
198         }
199 
200         return _persistence;
201     }
202 
203     public void setPersistence(RatingsStatsPersistence persistence) {
204         _persistence = persistence;
205     }
206 
207     private static RatingsStatsPersistence _persistence;
208 }