001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.polls.service;
016    
017    import com.liferay.portal.service.ServiceWrapper;
018    
019    /**
020     * Provides a wrapper for {@link PollsChoiceLocalService}.
021     *
022     * @author Brian Wing Shun Chan
023     * @see PollsChoiceLocalService
024     * @generated
025     */
026    public class PollsChoiceLocalServiceWrapper implements PollsChoiceLocalService,
027            ServiceWrapper<PollsChoiceLocalService> {
028            public PollsChoiceLocalServiceWrapper(
029                    PollsChoiceLocalService pollsChoiceLocalService) {
030                    _pollsChoiceLocalService = pollsChoiceLocalService;
031            }
032    
033            /**
034            * Adds the polls choice to the database. Also notifies the appropriate model listeners.
035            *
036            * @param pollsChoice the polls choice
037            * @return the polls choice that was added
038            * @throws SystemException if a system exception occurred
039            */
040            @Override
041            public com.liferay.portlet.polls.model.PollsChoice addPollsChoice(
042                    com.liferay.portlet.polls.model.PollsChoice pollsChoice)
043                    throws com.liferay.portal.kernel.exception.SystemException {
044                    return _pollsChoiceLocalService.addPollsChoice(pollsChoice);
045            }
046    
047            /**
048            * Creates a new polls choice with the primary key. Does not add the polls choice to the database.
049            *
050            * @param choiceId the primary key for the new polls choice
051            * @return the new polls choice
052            */
053            @Override
054            public com.liferay.portlet.polls.model.PollsChoice createPollsChoice(
055                    long choiceId) {
056                    return _pollsChoiceLocalService.createPollsChoice(choiceId);
057            }
058    
059            /**
060            * Deletes the polls choice with the primary key from the database. Also notifies the appropriate model listeners.
061            *
062            * @param choiceId the primary key of the polls choice
063            * @return the polls choice that was removed
064            * @throws PortalException if a polls choice with the primary key could not be found
065            * @throws SystemException if a system exception occurred
066            */
067            @Override
068            public com.liferay.portlet.polls.model.PollsChoice deletePollsChoice(
069                    long choiceId)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException {
072                    return _pollsChoiceLocalService.deletePollsChoice(choiceId);
073            }
074    
075            /**
076            * Deletes the polls choice from the database. Also notifies the appropriate model listeners.
077            *
078            * @param pollsChoice the polls choice
079            * @return the polls choice that was removed
080            * @throws SystemException if a system exception occurred
081            */
082            @Override
083            public com.liferay.portlet.polls.model.PollsChoice deletePollsChoice(
084                    com.liferay.portlet.polls.model.PollsChoice pollsChoice)
085                    throws com.liferay.portal.kernel.exception.SystemException {
086                    return _pollsChoiceLocalService.deletePollsChoice(pollsChoice);
087            }
088    
089            @Override
090            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
091                    return _pollsChoiceLocalService.dynamicQuery();
092            }
093    
094            /**
095            * Performs a dynamic query on the database and returns the matching rows.
096            *
097            * @param dynamicQuery the dynamic query
098            * @return the matching rows
099            * @throws SystemException if a system exception occurred
100            */
101            @Override
102            @SuppressWarnings("rawtypes")
103            public java.util.List dynamicQuery(
104                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
105                    throws com.liferay.portal.kernel.exception.SystemException {
106                    return _pollsChoiceLocalService.dynamicQuery(dynamicQuery);
107            }
108    
109            /**
110            * Performs a dynamic query on the database and returns a range of the matching rows.
111            *
112            * <p>
113            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
114            * </p>
115            *
116            * @param dynamicQuery the dynamic query
117            * @param start the lower bound of the range of model instances
118            * @param end the upper bound of the range of model instances (not inclusive)
119            * @return the range of matching rows
120            * @throws SystemException if a system exception occurred
121            */
122            @Override
123            @SuppressWarnings("rawtypes")
124            public java.util.List dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126                    int end) throws com.liferay.portal.kernel.exception.SystemException {
127                    return _pollsChoiceLocalService.dynamicQuery(dynamicQuery, start, end);
128            }
129    
130            /**
131            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
132            *
133            * <p>
134            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
135            * </p>
136            *
137            * @param dynamicQuery the dynamic query
138            * @param start the lower bound of the range of model instances
139            * @param end the upper bound of the range of model instances (not inclusive)
140            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
141            * @return the ordered range of matching rows
142            * @throws SystemException if a system exception occurred
143            */
144            @Override
145            @SuppressWarnings("rawtypes")
146            public java.util.List dynamicQuery(
147                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
148                    int end,
149                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return _pollsChoiceLocalService.dynamicQuery(dynamicQuery, start, end,
152                            orderByComparator);
153            }
154    
155            /**
156            * Returns the number of rows that match the dynamic query.
157            *
158            * @param dynamicQuery the dynamic query
159            * @return the number of rows that match the dynamic query
160            * @throws SystemException if a system exception occurred
161            */
162            @Override
163            public long dynamicQueryCount(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return _pollsChoiceLocalService.dynamicQueryCount(dynamicQuery);
167            }
168    
169            /**
170            * Returns the number of rows that match the dynamic query.
171            *
172            * @param dynamicQuery the dynamic query
173            * @param projection the projection to apply to the query
174            * @return the number of rows that match the dynamic query
175            * @throws SystemException if a system exception occurred
176            */
177            @Override
178            public long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
180                    com.liferay.portal.kernel.dao.orm.Projection projection)
181                    throws com.liferay.portal.kernel.exception.SystemException {
182                    return _pollsChoiceLocalService.dynamicQueryCount(dynamicQuery,
183                            projection);
184            }
185    
186            @Override
187            public com.liferay.portlet.polls.model.PollsChoice fetchPollsChoice(
188                    long choiceId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return _pollsChoiceLocalService.fetchPollsChoice(choiceId);
191            }
192    
193            /**
194            * Returns the polls choice with the matching UUID and company.
195            *
196            * @param uuid the polls choice's UUID
197            * @param companyId the primary key of the company
198            * @return the matching polls choice, or <code>null</code> if a matching polls choice could not be found
199            * @throws SystemException if a system exception occurred
200            */
201            @Override
202            public com.liferay.portlet.polls.model.PollsChoice fetchPollsChoiceByUuidAndCompanyId(
203                    java.lang.String uuid, long companyId)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return _pollsChoiceLocalService.fetchPollsChoiceByUuidAndCompanyId(uuid,
206                            companyId);
207            }
208    
209            /**
210            * Returns the polls choice matching the UUID and group.
211            *
212            * @param uuid the polls choice's UUID
213            * @param groupId the primary key of the group
214            * @return the matching polls choice, or <code>null</code> if a matching polls choice could not be found
215            * @throws SystemException if a system exception occurred
216            */
217            @Override
218            public com.liferay.portlet.polls.model.PollsChoice fetchPollsChoiceByUuidAndGroupId(
219                    java.lang.String uuid, long groupId)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return _pollsChoiceLocalService.fetchPollsChoiceByUuidAndGroupId(uuid,
222                            groupId);
223            }
224    
225            /**
226            * Returns the polls choice with the primary key.
227            *
228            * @param choiceId the primary key of the polls choice
229            * @return the polls choice
230            * @throws PortalException if a polls choice with the primary key could not be found
231            * @throws SystemException if a system exception occurred
232            */
233            @Override
234            public com.liferay.portlet.polls.model.PollsChoice getPollsChoice(
235                    long choiceId)
236                    throws com.liferay.portal.kernel.exception.PortalException,
237                            com.liferay.portal.kernel.exception.SystemException {
238                    return _pollsChoiceLocalService.getPollsChoice(choiceId);
239            }
240    
241            @Override
242            public com.liferay.portal.model.PersistedModel getPersistedModel(
243                    java.io.Serializable primaryKeyObj)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    return _pollsChoiceLocalService.getPersistedModel(primaryKeyObj);
247            }
248    
249            /**
250            * Returns the polls choice with the matching UUID and company.
251            *
252            * @param uuid the polls choice's UUID
253            * @param companyId the primary key of the company
254            * @return the matching polls choice
255            * @throws PortalException if a matching polls choice could not be found
256            * @throws SystemException if a system exception occurred
257            */
258            @Override
259            public com.liferay.portlet.polls.model.PollsChoice getPollsChoiceByUuidAndCompanyId(
260                    java.lang.String uuid, long companyId)
261                    throws com.liferay.portal.kernel.exception.PortalException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    return _pollsChoiceLocalService.getPollsChoiceByUuidAndCompanyId(uuid,
264                            companyId);
265            }
266    
267            /**
268            * Returns the polls choice matching the UUID and group.
269            *
270            * @param uuid the polls choice's UUID
271            * @param groupId the primary key of the group
272            * @return the matching polls choice
273            * @throws PortalException if a matching polls choice could not be found
274            * @throws SystemException if a system exception occurred
275            */
276            @Override
277            public com.liferay.portlet.polls.model.PollsChoice getPollsChoiceByUuidAndGroupId(
278                    java.lang.String uuid, long groupId)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    return _pollsChoiceLocalService.getPollsChoiceByUuidAndGroupId(uuid,
282                            groupId);
283            }
284    
285            /**
286            * Returns a range of all the polls choices.
287            *
288            * <p>
289            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
290            * </p>
291            *
292            * @param start the lower bound of the range of polls choices
293            * @param end the upper bound of the range of polls choices (not inclusive)
294            * @return the range of polls choices
295            * @throws SystemException if a system exception occurred
296            */
297            @Override
298            public java.util.List<com.liferay.portlet.polls.model.PollsChoice> getPollsChoices(
299                    int start, int end)
300                    throws com.liferay.portal.kernel.exception.SystemException {
301                    return _pollsChoiceLocalService.getPollsChoices(start, end);
302            }
303    
304            /**
305            * Returns the number of polls choices.
306            *
307            * @return the number of polls choices
308            * @throws SystemException if a system exception occurred
309            */
310            @Override
311            public int getPollsChoicesCount()
312                    throws com.liferay.portal.kernel.exception.SystemException {
313                    return _pollsChoiceLocalService.getPollsChoicesCount();
314            }
315    
316            /**
317            * Updates the polls choice in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
318            *
319            * @param pollsChoice the polls choice
320            * @return the polls choice that was updated
321            * @throws SystemException if a system exception occurred
322            */
323            @Override
324            public com.liferay.portlet.polls.model.PollsChoice updatePollsChoice(
325                    com.liferay.portlet.polls.model.PollsChoice pollsChoice)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    return _pollsChoiceLocalService.updatePollsChoice(pollsChoice);
328            }
329    
330            /**
331            * Returns the Spring bean ID for this bean.
332            *
333            * @return the Spring bean ID for this bean
334            */
335            @Override
336            public java.lang.String getBeanIdentifier() {
337                    return _pollsChoiceLocalService.getBeanIdentifier();
338            }
339    
340            /**
341            * Sets the Spring bean ID for this bean.
342            *
343            * @param beanIdentifier the Spring bean ID for this bean
344            */
345            @Override
346            public void setBeanIdentifier(java.lang.String beanIdentifier) {
347                    _pollsChoiceLocalService.setBeanIdentifier(beanIdentifier);
348            }
349    
350            @Override
351            public com.liferay.portlet.polls.model.PollsChoice addChoice(long userId,
352                    long questionId, java.lang.String name, java.lang.String description,
353                    com.liferay.portal.service.ServiceContext serviceContext)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException {
356                    return _pollsChoiceLocalService.addChoice(userId, questionId, name,
357                            description, serviceContext);
358            }
359    
360            @Override
361            public com.liferay.portlet.polls.model.PollsChoice getChoice(long choiceId)
362                    throws com.liferay.portal.kernel.exception.PortalException,
363                            com.liferay.portal.kernel.exception.SystemException {
364                    return _pollsChoiceLocalService.getChoice(choiceId);
365            }
366    
367            @Override
368            public java.util.List<com.liferay.portlet.polls.model.PollsChoice> getChoices(
369                    long questionId)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    return _pollsChoiceLocalService.getChoices(questionId);
372            }
373    
374            @Override
375            public int getChoicesCount(long questionId)
376                    throws com.liferay.portal.kernel.exception.SystemException {
377                    return _pollsChoiceLocalService.getChoicesCount(questionId);
378            }
379    
380            @Override
381            public com.liferay.portlet.polls.model.PollsChoice updateChoice(
382                    long choiceId, long questionId, java.lang.String name,
383                    java.lang.String description,
384                    com.liferay.portal.service.ServiceContext serviceContext)
385                    throws com.liferay.portal.kernel.exception.PortalException,
386                            com.liferay.portal.kernel.exception.SystemException {
387                    return _pollsChoiceLocalService.updateChoice(choiceId, questionId,
388                            name, description, serviceContext);
389            }
390    
391            /**
392             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
393             */
394            public PollsChoiceLocalService getWrappedPollsChoiceLocalService() {
395                    return _pollsChoiceLocalService;
396            }
397    
398            /**
399             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
400             */
401            public void setWrappedPollsChoiceLocalService(
402                    PollsChoiceLocalService pollsChoiceLocalService) {
403                    _pollsChoiceLocalService = pollsChoiceLocalService;
404            }
405    
406            @Override
407            public PollsChoiceLocalService getWrappedService() {
408                    return _pollsChoiceLocalService;
409            }
410    
411            @Override
412            public void setWrappedService(
413                    PollsChoiceLocalService pollsChoiceLocalService) {
414                    _pollsChoiceLocalService = pollsChoiceLocalService;
415            }
416    
417            private PollsChoiceLocalService _pollsChoiceLocalService;
418    }