1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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;
24  
25  
26  /**
27   * <a href="RatingsEntryLocalServiceUtil.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   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.ratings.service.RatingsEntryLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.ratings.service.RatingsEntryLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.ratings.service.RatingsEntryLocalService
50   * @see com.liferay.portlet.ratings.service.RatingsEntryLocalServiceFactory
51   *
52   */
53  public class RatingsEntryLocalServiceUtil {
54      public static com.liferay.portlet.ratings.model.RatingsEntry addRatingsEntry(
55          com.liferay.portlet.ratings.model.RatingsEntry model)
56          throws com.liferay.portal.SystemException {
57          RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
58  
59          return ratingsEntryLocalService.addRatingsEntry(model);
60      }
61  
62      public static java.util.List dynamicQuery(
63          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
64          throws com.liferay.portal.SystemException {
65          RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
66  
67          return ratingsEntryLocalService.dynamicQuery(queryInitializer);
68      }
69  
70      public static java.util.List dynamicQuery(
71          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
72          int begin, int end) throws com.liferay.portal.SystemException {
73          RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
74  
75          return ratingsEntryLocalService.dynamicQuery(queryInitializer, begin,
76              end);
77      }
78  
79      public static com.liferay.portlet.ratings.model.RatingsEntry updateRatingsEntry(
80          com.liferay.portlet.ratings.model.RatingsEntry model)
81          throws com.liferay.portal.SystemException {
82          RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
83  
84          return ratingsEntryLocalService.updateRatingsEntry(model);
85      }
86  
87      public static com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence getRatingsEntryPersistence() {
88          RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
89  
90          return ratingsEntryLocalService.getRatingsEntryPersistence();
91      }
92  
93      public static void setRatingsEntryPersistence(
94          com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence ratingsEntryPersistence) {
95          RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
96  
97          ratingsEntryLocalService.setRatingsEntryPersistence(ratingsEntryPersistence);
98      }
99  
100     public static com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence getRatingsStatsPersistence() {
101         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
102 
103         return ratingsEntryLocalService.getRatingsStatsPersistence();
104     }
105 
106     public static void setRatingsStatsPersistence(
107         com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence ratingsStatsPersistence) {
108         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
109 
110         ratingsEntryLocalService.setRatingsStatsPersistence(ratingsStatsPersistence);
111     }
112 
113     public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
114         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
115 
116         return ratingsEntryLocalService.getUserPersistence();
117     }
118 
119     public static void setUserPersistence(
120         com.liferay.portal.service.persistence.UserPersistence userPersistence) {
121         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
122 
123         ratingsEntryLocalService.setUserPersistence(userPersistence);
124     }
125 
126     public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
127         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
128 
129         return ratingsEntryLocalService.getUserFinder();
130     }
131 
132     public static void setUserFinder(
133         com.liferay.portal.service.persistence.UserFinder userFinder) {
134         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
135 
136         ratingsEntryLocalService.setUserFinder(userFinder);
137     }
138 
139     public static com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence getBlogsEntryPersistence() {
140         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
141 
142         return ratingsEntryLocalService.getBlogsEntryPersistence();
143     }
144 
145     public static void setBlogsEntryPersistence(
146         com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence blogsEntryPersistence) {
147         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
148 
149         ratingsEntryLocalService.setBlogsEntryPersistence(blogsEntryPersistence);
150     }
151 
152     public static com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder getBlogsEntryFinder() {
153         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
154 
155         return ratingsEntryLocalService.getBlogsEntryFinder();
156     }
157 
158     public static void setBlogsEntryFinder(
159         com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder blogsEntryFinder) {
160         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
161 
162         ratingsEntryLocalService.setBlogsEntryFinder(blogsEntryFinder);
163     }
164 
165     public static com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
166         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
167 
168         return ratingsEntryLocalService.getBlogsStatsUserPersistence();
169     }
170 
171     public static void setBlogsStatsUserPersistence(
172         com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence blogsStatsUserPersistence) {
173         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
174 
175         ratingsEntryLocalService.setBlogsStatsUserPersistence(blogsStatsUserPersistence);
176     }
177 
178     public static com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder getBlogsStatsUserFinder() {
179         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
180 
181         return ratingsEntryLocalService.getBlogsStatsUserFinder();
182     }
183 
184     public static void setBlogsStatsUserFinder(
185         com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder blogsStatsUserFinder) {
186         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
187 
188         ratingsEntryLocalService.setBlogsStatsUserFinder(blogsStatsUserFinder);
189     }
190 
191     public static void afterPropertiesSet() {
192         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
193 
194         ratingsEntryLocalService.afterPropertiesSet();
195     }
196 
197     public static com.liferay.portlet.ratings.model.RatingsEntry getEntry(
198         long userId, java.lang.String className, long classPK)
199         throws com.liferay.portal.PortalException, 
200             com.liferay.portal.SystemException {
201         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
202 
203         return ratingsEntryLocalService.getEntry(userId, className, classPK);
204     }
205 
206     public static java.util.List getEntries(java.lang.String className,
207         long classPK)
208         throws com.liferay.portal.PortalException, 
209             com.liferay.portal.SystemException {
210         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
211 
212         return ratingsEntryLocalService.getEntries(className, classPK);
213     }
214 
215     public static com.liferay.portlet.ratings.model.RatingsEntry updateEntry(
216         long userId, java.lang.String className, long classPK, double score)
217         throws com.liferay.portal.PortalException, 
218             com.liferay.portal.SystemException {
219         RatingsEntryLocalService ratingsEntryLocalService = RatingsEntryLocalServiceFactory.getService();
220 
221         return ratingsEntryLocalService.updateEntry(userId, className, classPK,
222             score);
223     }
224 }