001
014
015 package com.liferay.portlet.polls.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class PollsVoteLocalServiceUtil {
033 public static com.liferay.portlet.polls.model.PollsVote addPollsVote(
034 com.liferay.portlet.polls.model.PollsVote pollsVote)
035 throws com.liferay.portal.kernel.exception.SystemException {
036 return getService().addPollsVote(pollsVote);
037 }
038
039 public static com.liferay.portlet.polls.model.PollsVote createPollsVote(
040 long voteId) {
041 return getService().createPollsVote(voteId);
042 }
043
044 public static void deletePollsVote(long voteId)
045 throws com.liferay.portal.kernel.exception.PortalException,
046 com.liferay.portal.kernel.exception.SystemException {
047 getService().deletePollsVote(voteId);
048 }
049
050 public static void deletePollsVote(
051 com.liferay.portlet.polls.model.PollsVote pollsVote)
052 throws com.liferay.portal.kernel.exception.SystemException {
053 getService().deletePollsVote(pollsVote);
054 }
055
056 @SuppressWarnings("unchecked")
057 public static java.util.List dynamicQuery(
058 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059 throws com.liferay.portal.kernel.exception.SystemException {
060 return getService().dynamicQuery(dynamicQuery);
061 }
062
063 @SuppressWarnings("unchecked")
064 public static java.util.List dynamicQuery(
065 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066 int end) throws com.liferay.portal.kernel.exception.SystemException {
067 return getService().dynamicQuery(dynamicQuery, start, end);
068 }
069
070 @SuppressWarnings("unchecked")
071 public static java.util.List dynamicQuery(
072 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073 int end,
074 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075 throws com.liferay.portal.kernel.exception.SystemException {
076 return getService()
077 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078 }
079
080 public static long dynamicQueryCount(
081 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 return getService().dynamicQueryCount(dynamicQuery);
084 }
085
086 public static com.liferay.portlet.polls.model.PollsVote getPollsVote(
087 long voteId)
088 throws com.liferay.portal.kernel.exception.PortalException,
089 com.liferay.portal.kernel.exception.SystemException {
090 return getService().getPollsVote(voteId);
091 }
092
093 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> getPollsVotes(
094 int start, int end)
095 throws com.liferay.portal.kernel.exception.SystemException {
096 return getService().getPollsVotes(start, end);
097 }
098
099 public static int getPollsVotesCount()
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().getPollsVotesCount();
102 }
103
104 public static com.liferay.portlet.polls.model.PollsVote updatePollsVote(
105 com.liferay.portlet.polls.model.PollsVote pollsVote)
106 throws com.liferay.portal.kernel.exception.SystemException {
107 return getService().updatePollsVote(pollsVote);
108 }
109
110 public static com.liferay.portlet.polls.model.PollsVote updatePollsVote(
111 com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
112 throws com.liferay.portal.kernel.exception.SystemException {
113 return getService().updatePollsVote(pollsVote, merge);
114 }
115
116 public static com.liferay.portlet.polls.model.PollsVote addVote(
117 long userId, long questionId, long choiceId,
118 com.liferay.portal.service.ServiceContext serviceContext)
119 throws com.liferay.portal.kernel.exception.PortalException,
120 com.liferay.portal.kernel.exception.SystemException {
121 return getService().addVote(userId, questionId, choiceId, serviceContext);
122 }
123
124 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> getChoiceVotes(
125 long choiceId, int start, int end)
126 throws com.liferay.portal.kernel.exception.SystemException {
127 return getService().getChoiceVotes(choiceId, start, end);
128 }
129
130 public static int getChoiceVotesCount(long choiceId)
131 throws com.liferay.portal.kernel.exception.SystemException {
132 return getService().getChoiceVotesCount(choiceId);
133 }
134
135 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> getQuestionVotes(
136 long questionId, int start, int end)
137 throws com.liferay.portal.kernel.exception.SystemException {
138 return getService().getQuestionVotes(questionId, start, end);
139 }
140
141 public static int getQuestionVotesCount(long questionId)
142 throws com.liferay.portal.kernel.exception.SystemException {
143 return getService().getQuestionVotesCount(questionId);
144 }
145
146 public static com.liferay.portlet.polls.model.PollsVote getVote(
147 long questionId, long userId)
148 throws com.liferay.portal.kernel.exception.PortalException,
149 com.liferay.portal.kernel.exception.SystemException {
150 return getService().getVote(questionId, userId);
151 }
152
153 public static PollsVoteLocalService getService() {
154 if (_service == null) {
155 _service = (PollsVoteLocalService)PortalBeanLocatorUtil.locate(PollsVoteLocalService.class.getName());
156 }
157
158 return _service;
159 }
160
161 public void setService(PollsVoteLocalService service) {
162 _service = service;
163 }
164
165 private static PollsVoteLocalService _service;
166 }