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="PollsChoiceLocalServiceUtil.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.PollsChoiceLocalService</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.PollsChoiceLocalServiceFactory</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.PollsChoiceLocalService
047: * @see com.liferay.portlet.polls.service.PollsChoiceLocalServiceFactory
048: *
049: */
050: public class PollsChoiceLocalServiceUtil {
051: public static com.liferay.portlet.polls.model.PollsChoice addPollsChoice(
052: com.liferay.portlet.polls.model.PollsChoice model)
053: throws com.liferay.portal.SystemException {
054: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
055: .getService();
056:
057: return pollsChoiceLocalService.addPollsChoice(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: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
064: .getService();
065:
066: return pollsChoiceLocalService.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: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
074: .getService();
075:
076: return pollsChoiceLocalService.dynamicQuery(queryInitializer,
077: begin, end);
078: }
079:
080: public static com.liferay.portlet.polls.model.PollsChoice updatePollsChoice(
081: com.liferay.portlet.polls.model.PollsChoice model)
082: throws com.liferay.portal.SystemException {
083: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
084: .getService();
085:
086: return pollsChoiceLocalService.updatePollsChoice(model);
087: }
088:
089: public static com.liferay.portlet.polls.service.persistence.PollsChoicePersistence getPollsChoicePersistence() {
090: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
091: .getService();
092:
093: return pollsChoiceLocalService.getPollsChoicePersistence();
094: }
095:
096: public static void setPollsChoicePersistence(
097: com.liferay.portlet.polls.service.persistence.PollsChoicePersistence pollsChoicePersistence) {
098: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
099: .getService();
100:
101: pollsChoiceLocalService
102: .setPollsChoicePersistence(pollsChoicePersistence);
103: }
104:
105: public static com.liferay.portlet.polls.service.persistence.PollsChoiceFinder getPollsChoiceFinder() {
106: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
107: .getService();
108:
109: return pollsChoiceLocalService.getPollsChoiceFinder();
110: }
111:
112: public static void setPollsChoiceFinder(
113: com.liferay.portlet.polls.service.persistence.PollsChoiceFinder pollsChoiceFinder) {
114: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
115: .getService();
116:
117: pollsChoiceLocalService.setPollsChoiceFinder(pollsChoiceFinder);
118: }
119:
120: public static com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence getPollsQuestionPersistence() {
121: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
122: .getService();
123:
124: return pollsChoiceLocalService.getPollsQuestionPersistence();
125: }
126:
127: public static void setPollsQuestionPersistence(
128: com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence pollsQuestionPersistence) {
129: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
130: .getService();
131:
132: pollsChoiceLocalService
133: .setPollsQuestionPersistence(pollsQuestionPersistence);
134: }
135:
136: public static com.liferay.portlet.polls.service.persistence.PollsVotePersistence getPollsVotePersistence() {
137: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
138: .getService();
139:
140: return pollsChoiceLocalService.getPollsVotePersistence();
141: }
142:
143: public static void setPollsVotePersistence(
144: com.liferay.portlet.polls.service.persistence.PollsVotePersistence pollsVotePersistence) {
145: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
146: .getService();
147:
148: pollsChoiceLocalService
149: .setPollsVotePersistence(pollsVotePersistence);
150: }
151:
152: public static void afterPropertiesSet() {
153: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
154: .getService();
155:
156: pollsChoiceLocalService.afterPropertiesSet();
157: }
158:
159: public static com.liferay.portlet.polls.model.PollsChoice addChoice(
160: long questionId, java.lang.String name,
161: java.lang.String description)
162: throws com.liferay.portal.PortalException,
163: com.liferay.portal.SystemException {
164: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
165: .getService();
166:
167: return pollsChoiceLocalService.addChoice(questionId, name,
168: description);
169: }
170:
171: public static com.liferay.portlet.polls.model.PollsChoice addChoice(
172: java.lang.String uuid, long questionId,
173: java.lang.String name, java.lang.String description)
174: throws com.liferay.portal.PortalException,
175: com.liferay.portal.SystemException {
176: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
177: .getService();
178:
179: return pollsChoiceLocalService.addChoice(uuid, questionId,
180: name, description);
181: }
182:
183: public static com.liferay.portlet.polls.model.PollsChoice getChoice(
184: long choiceId) throws com.liferay.portal.PortalException,
185: com.liferay.portal.SystemException {
186: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
187: .getService();
188:
189: return pollsChoiceLocalService.getChoice(choiceId);
190: }
191:
192: public static java.util.List getChoices(long questionId)
193: throws com.liferay.portal.SystemException {
194: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
195: .getService();
196:
197: return pollsChoiceLocalService.getChoices(questionId);
198: }
199:
200: public static int getChoicesCount(long questionId)
201: throws com.liferay.portal.SystemException {
202: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
203: .getService();
204:
205: return pollsChoiceLocalService.getChoicesCount(questionId);
206: }
207:
208: public static com.liferay.portlet.polls.model.PollsChoice updateChoice(
209: long choiceId, long questionId, java.lang.String name,
210: java.lang.String description)
211: throws com.liferay.portal.PortalException,
212: com.liferay.portal.SystemException {
213: PollsChoiceLocalService pollsChoiceLocalService = PollsChoiceLocalServiceFactory
214: .getService();
215:
216: return pollsChoiceLocalService.updateChoice(choiceId,
217: questionId, name, description);
218: }
219: }
|