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  
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#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 RatingsStats remove(RatingsStats ratingsStats)
66          throws SystemException {
67          return getPersistence().remove(ratingsStats);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static RatingsStats update(RatingsStats ratingsStats, boolean merge)
74          throws SystemException {
75          return getPersistence().update(ratingsStats, merge);
76      }
77  
78      public static void cacheResult(
79          com.liferay.portlet.ratings.model.RatingsStats ratingsStats) {
80          getPersistence().cacheResult(ratingsStats);
81      }
82  
83      public static void cacheResult(
84          java.util.List<com.liferay.portlet.ratings.model.RatingsStats> ratingsStatses) {
85          getPersistence().cacheResult(ratingsStatses);
86      }
87  
88      public static com.liferay.portlet.ratings.model.RatingsStats create(
89          long statsId) {
90          return getPersistence().create(statsId);
91      }
92  
93      public static com.liferay.portlet.ratings.model.RatingsStats remove(
94          long statsId)
95          throws com.liferay.portal.SystemException,
96              com.liferay.portlet.ratings.NoSuchStatsException {
97          return getPersistence().remove(statsId);
98      }
99  
100     /**
101      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
102      */
103     public static com.liferay.portlet.ratings.model.RatingsStats update(
104         com.liferay.portlet.ratings.model.RatingsStats ratingsStats)
105         throws com.liferay.portal.SystemException {
106         return getPersistence().update(ratingsStats);
107     }
108 
109     public static com.liferay.portlet.ratings.model.RatingsStats updateImpl(
110         com.liferay.portlet.ratings.model.RatingsStats ratingsStats,
111         boolean merge) throws com.liferay.portal.SystemException {
112         return getPersistence().updateImpl(ratingsStats, merge);
113     }
114 
115     public static com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey(
116         long statsId)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.ratings.NoSuchStatsException {
119         return getPersistence().findByPrimaryKey(statsId);
120     }
121 
122     public static com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey(
123         long statsId) throws com.liferay.portal.SystemException {
124         return getPersistence().fetchByPrimaryKey(statsId);
125     }
126 
127     public static com.liferay.portlet.ratings.model.RatingsStats findByC_C(
128         long classNameId, long classPK)
129         throws com.liferay.portal.SystemException,
130             com.liferay.portlet.ratings.NoSuchStatsException {
131         return getPersistence().findByC_C(classNameId, classPK);
132     }
133 
134     public static com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
135         long classNameId, long classPK)
136         throws com.liferay.portal.SystemException {
137         return getPersistence().fetchByC_C(classNameId, classPK);
138     }
139 
140     public static com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
141         long classNameId, long classPK, boolean retrieveFromCache)
142         throws com.liferay.portal.SystemException {
143         return getPersistence()
144                    .fetchByC_C(classNameId, classPK, retrieveFromCache);
145     }
146 
147     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll()
148         throws com.liferay.portal.SystemException {
149         return getPersistence().findAll();
150     }
151 
152     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
153         int start, int end) throws com.liferay.portal.SystemException {
154         return getPersistence().findAll(start, end);
155     }
156 
157     public static java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
158         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException {
160         return getPersistence().findAll(start, end, obc);
161     }
162 
163     public static void removeByC_C(long classNameId, long classPK)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.ratings.NoSuchStatsException {
166         getPersistence().removeByC_C(classNameId, classPK);
167     }
168 
169     public static void removeAll() throws com.liferay.portal.SystemException {
170         getPersistence().removeAll();
171     }
172 
173     public static int countByC_C(long classNameId, long classPK)
174         throws com.liferay.portal.SystemException {
175         return getPersistence().countByC_C(classNameId, classPK);
176     }
177 
178     public static int countAll() throws com.liferay.portal.SystemException {
179         return getPersistence().countAll();
180     }
181 
182     public static RatingsStatsPersistence getPersistence() {
183         if (_persistence == null) {
184             _persistence = (RatingsStatsPersistence)PortalBeanLocatorUtil.locate(RatingsStatsPersistence.class.getName());
185         }
186 
187         return _persistence;
188     }
189 
190     public void setPersistence(RatingsStatsPersistence persistence) {
191         _persistence = persistence;
192     }
193 
194     private static RatingsStatsPersistence _persistence;
195 }