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.polls.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="PollsVoteLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link PollsVoteLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       PollsVoteLocalService
39   * @generated
40   */
41  public class PollsVoteLocalServiceUtil {
42      public static com.liferay.portlet.polls.model.PollsVote addPollsVote(
43          com.liferay.portlet.polls.model.PollsVote pollsVote)
44          throws com.liferay.portal.SystemException {
45          return getService().addPollsVote(pollsVote);
46      }
47  
48      public static com.liferay.portlet.polls.model.PollsVote createPollsVote(
49          long voteId) {
50          return getService().createPollsVote(voteId);
51      }
52  
53      public static void deletePollsVote(long voteId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deletePollsVote(voteId);
57      }
58  
59      public static void deletePollsVote(
60          com.liferay.portlet.polls.model.PollsVote pollsVote)
61          throws com.liferay.portal.SystemException {
62          getService().deletePollsVote(pollsVote);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.polls.model.PollsVote getPollsVote(
96          long voteId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getPollsVote(voteId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.polls.model.PollsVote> getPollsVotes(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getPollsVotes(start, end);
105     }
106 
107     public static int getPollsVotesCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getPollsVotesCount();
110     }
111 
112     public static com.liferay.portlet.polls.model.PollsVote updatePollsVote(
113         com.liferay.portlet.polls.model.PollsVote pollsVote)
114         throws com.liferay.portal.SystemException {
115         return getService().updatePollsVote(pollsVote);
116     }
117 
118     public static com.liferay.portlet.polls.model.PollsVote updatePollsVote(
119         com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
120         throws com.liferay.portal.SystemException {
121         return getService().updatePollsVote(pollsVote, merge);
122     }
123 
124     /**
125     * @deprecated
126     */
127     public static com.liferay.portlet.polls.model.PollsVote addVote(
128         long userId, long questionId, long choiceId)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         return getService().addVote(userId, questionId, choiceId);
132     }
133 
134     public static com.liferay.portlet.polls.model.PollsVote addVote(
135         long userId, long questionId, long choiceId,
136         com.liferay.portal.service.ServiceContext serviceContext)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException {
139         return getService().addVote(userId, questionId, choiceId, serviceContext);
140     }
141 
142     public static java.util.List<com.liferay.portlet.polls.model.PollsVote> getChoiceVotes(
143         long choiceId, int start, int end)
144         throws com.liferay.portal.SystemException {
145         return getService().getChoiceVotes(choiceId, start, end);
146     }
147 
148     public static int getChoiceVotesCount(long choiceId)
149         throws com.liferay.portal.SystemException {
150         return getService().getChoiceVotesCount(choiceId);
151     }
152 
153     public static java.util.List<com.liferay.portlet.polls.model.PollsVote> getQuestionVotes(
154         long questionId, int start, int end)
155         throws com.liferay.portal.SystemException {
156         return getService().getQuestionVotes(questionId, start, end);
157     }
158 
159     public static int getQuestionVotesCount(long questionId)
160         throws com.liferay.portal.SystemException {
161         return getService().getQuestionVotesCount(questionId);
162     }
163 
164     public static com.liferay.portlet.polls.model.PollsVote getVote(
165         long questionId, long userId)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         return getService().getVote(questionId, userId);
169     }
170 
171     public static PollsVoteLocalService getService() {
172         if (_service == null) {
173             _service = (PollsVoteLocalService)PortalBeanLocatorUtil.locate(PollsVoteLocalService.class.getName());
174 
175             ReferenceRegistry.registerReference(PollsVoteLocalServiceUtil.class,
176                 "_service");
177             MethodCache.remove(PollsVoteLocalService.class);
178         }
179 
180         return _service;
181     }
182 
183     public void setService(PollsVoteLocalService service) {
184         MethodCache.remove(PollsVoteLocalService.class);
185 
186         _service = service;
187 
188         ReferenceRegistry.registerReference(PollsVoteLocalServiceUtil.class,
189             "_service");
190         MethodCache.remove(PollsVoteLocalService.class);
191     }
192 
193     private static PollsVoteLocalService _service;
194 }