001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.polls.service;
022:
023: /**
024: * <a href="PollsVoteLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.polls.service.PollsVoteLocalService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.polls.service.PollsVoteLocalServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.polls.service.PollsVoteLocalService
047: * @see com.liferay.portlet.polls.service.PollsVoteLocalServiceFactory
048: *
049: */
050: public class PollsVoteLocalServiceUtil {
051: public static com.liferay.portlet.polls.model.PollsVote addPollsVote(
052: com.liferay.portlet.polls.model.PollsVote model)
053: throws com.liferay.portal.SystemException {
054: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
055: .getService();
056:
057: return pollsVoteLocalService.addPollsVote(model);
058: }
059:
060: public static java.util.List dynamicQuery(
061: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
062: throws com.liferay.portal.SystemException {
063: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
064: .getService();
065:
066: return pollsVoteLocalService.dynamicQuery(queryInitializer);
067: }
068:
069: public static java.util.List dynamicQuery(
070: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
071: int begin, int end)
072: throws com.liferay.portal.SystemException {
073: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
074: .getService();
075:
076: return pollsVoteLocalService.dynamicQuery(queryInitializer,
077: begin, end);
078: }
079:
080: public static com.liferay.portlet.polls.model.PollsVote updatePollsVote(
081: com.liferay.portlet.polls.model.PollsVote model)
082: throws com.liferay.portal.SystemException {
083: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
084: .getService();
085:
086: return pollsVoteLocalService.updatePollsVote(model);
087: }
088:
089: public static com.liferay.portlet.polls.service.persistence.PollsChoicePersistence getPollsChoicePersistence() {
090: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
091: .getService();
092:
093: return pollsVoteLocalService.getPollsChoicePersistence();
094: }
095:
096: public static void setPollsChoicePersistence(
097: com.liferay.portlet.polls.service.persistence.PollsChoicePersistence pollsChoicePersistence) {
098: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
099: .getService();
100:
101: pollsVoteLocalService
102: .setPollsChoicePersistence(pollsChoicePersistence);
103: }
104:
105: public static com.liferay.portlet.polls.service.persistence.PollsChoiceFinder getPollsChoiceFinder() {
106: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
107: .getService();
108:
109: return pollsVoteLocalService.getPollsChoiceFinder();
110: }
111:
112: public static void setPollsChoiceFinder(
113: com.liferay.portlet.polls.service.persistence.PollsChoiceFinder pollsChoiceFinder) {
114: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
115: .getService();
116:
117: pollsVoteLocalService.setPollsChoiceFinder(pollsChoiceFinder);
118: }
119:
120: public static com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence getPollsQuestionPersistence() {
121: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
122: .getService();
123:
124: return pollsVoteLocalService.getPollsQuestionPersistence();
125: }
126:
127: public static void setPollsQuestionPersistence(
128: com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence pollsQuestionPersistence) {
129: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
130: .getService();
131:
132: pollsVoteLocalService
133: .setPollsQuestionPersistence(pollsQuestionPersistence);
134: }
135:
136: public static com.liferay.portlet.polls.service.persistence.PollsVotePersistence getPollsVotePersistence() {
137: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
138: .getService();
139:
140: return pollsVoteLocalService.getPollsVotePersistence();
141: }
142:
143: public static void setPollsVotePersistence(
144: com.liferay.portlet.polls.service.persistence.PollsVotePersistence pollsVotePersistence) {
145: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
146: .getService();
147:
148: pollsVoteLocalService
149: .setPollsVotePersistence(pollsVotePersistence);
150: }
151:
152: public static void afterPropertiesSet() {
153: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
154: .getService();
155:
156: pollsVoteLocalService.afterPropertiesSet();
157: }
158:
159: public static com.liferay.portlet.polls.model.PollsVote addVote(
160: long userId, long questionId, long choiceId)
161: throws com.liferay.portal.PortalException,
162: com.liferay.portal.SystemException {
163: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
164: .getService();
165:
166: return pollsVoteLocalService.addVote(userId, questionId,
167: choiceId);
168: }
169:
170: public static java.util.List getChoiceVotes(long choiceId,
171: int begin, int end)
172: throws com.liferay.portal.SystemException {
173: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
174: .getService();
175:
176: return pollsVoteLocalService.getChoiceVotes(choiceId, begin,
177: end);
178: }
179:
180: public static int getChoiceVotesCount(long choiceId)
181: throws com.liferay.portal.SystemException {
182: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
183: .getService();
184:
185: return pollsVoteLocalService.getChoiceVotesCount(choiceId);
186: }
187:
188: public static com.liferay.portlet.polls.model.PollsVote getVote(
189: long questionId, long userId)
190: throws com.liferay.portal.PortalException,
191: com.liferay.portal.SystemException {
192: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
193: .getService();
194:
195: return pollsVoteLocalService.getVote(questionId, userId);
196: }
197:
198: public static java.util.List getQuestionVotes(long questionId,
199: int begin, int end)
200: throws com.liferay.portal.SystemException {
201: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
202: .getService();
203:
204: return pollsVoteLocalService.getQuestionVotes(questionId,
205: begin, end);
206: }
207:
208: public static int getQuestionVotesCount(long questionId)
209: throws com.liferay.portal.SystemException {
210: PollsVoteLocalService pollsVoteLocalService = PollsVoteLocalServiceFactory
211: .getService();
212:
213: return pollsVoteLocalService.getQuestionVotesCount(questionId);
214: }
215: }
|