1
22
23 package com.liferay.portlet.polls.service;
24
25
51 public class PollsQuestionLocalServiceUtil {
52 public static com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
53 com.liferay.portlet.polls.model.PollsQuestion model)
54 throws com.liferay.portal.SystemException {
55 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
56
57 return pollsQuestionLocalService.addPollsQuestion(model);
58 }
59
60 public static java.util.List dynamicQuery(
61 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62 throws com.liferay.portal.SystemException {
63 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
64
65 return pollsQuestionLocalService.dynamicQuery(queryInitializer);
66 }
67
68 public static java.util.List dynamicQuery(
69 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70 int begin, int end) throws com.liferay.portal.SystemException {
71 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
72
73 return pollsQuestionLocalService.dynamicQuery(queryInitializer, begin,
74 end);
75 }
76
77 public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
78 com.liferay.portlet.polls.model.PollsQuestion model)
79 throws com.liferay.portal.SystemException {
80 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
81
82 return pollsQuestionLocalService.updatePollsQuestion(model);
83 }
84
85 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
86 long userId, long plid, java.lang.String title,
87 java.lang.String description, int expirationDateMonth,
88 int expirationDateDay, int expirationDateYear, int expirationDateHour,
89 int expirationDateMinute, boolean neverExpire, java.util.List choices,
90 boolean addCommunityPermissions, boolean addGuestPermissions)
91 throws com.liferay.portal.PortalException,
92 com.liferay.portal.SystemException {
93 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
94
95 return pollsQuestionLocalService.addQuestion(userId, plid, title,
96 description, expirationDateMonth, expirationDateDay,
97 expirationDateYear, expirationDateHour, expirationDateMinute,
98 neverExpire, choices, addCommunityPermissions, addGuestPermissions);
99 }
100
101 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
102 long userId, long plid, java.lang.String title,
103 java.lang.String description, int expirationDateMonth,
104 int expirationDateDay, int expirationDateYear, int expirationDateHour,
105 int expirationDateMinute, boolean neverExpire, java.util.List choices,
106 java.lang.String[] communityPermissions,
107 java.lang.String[] guestPermissions)
108 throws com.liferay.portal.PortalException,
109 com.liferay.portal.SystemException {
110 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
111
112 return pollsQuestionLocalService.addQuestion(userId, plid, title,
113 description, expirationDateMonth, expirationDateDay,
114 expirationDateYear, expirationDateHour, expirationDateMinute,
115 neverExpire, choices, communityPermissions, guestPermissions);
116 }
117
118 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
119 long userId, long plid, java.lang.String title,
120 java.lang.String description, int expirationDateMonth,
121 int expirationDateDay, int expirationDateYear, int expirationDateHour,
122 int expirationDateMinute, boolean neverExpire, java.util.List choices,
123 java.lang.Boolean addCommunityPermissions,
124 java.lang.Boolean addGuestPermissions,
125 java.lang.String[] communityPermissions,
126 java.lang.String[] guestPermissions)
127 throws com.liferay.portal.PortalException,
128 com.liferay.portal.SystemException {
129 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
130
131 return pollsQuestionLocalService.addQuestion(userId, plid, title,
132 description, expirationDateMonth, expirationDateDay,
133 expirationDateYear, expirationDateHour, expirationDateMinute,
134 neverExpire, choices, addCommunityPermissions, addGuestPermissions,
135 communityPermissions, guestPermissions);
136 }
137
138 public static void addQuestionResources(long questionId,
139 boolean addCommunityPermissions, boolean addGuestPermissions)
140 throws com.liferay.portal.PortalException,
141 com.liferay.portal.SystemException {
142 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
143 pollsQuestionLocalService.addQuestionResources(questionId,
144 addCommunityPermissions, addGuestPermissions);
145 }
146
147 public static void addQuestionResources(
148 com.liferay.portlet.polls.model.PollsQuestion question,
149 boolean addCommunityPermissions, boolean addGuestPermissions)
150 throws com.liferay.portal.PortalException,
151 com.liferay.portal.SystemException {
152 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
153 pollsQuestionLocalService.addQuestionResources(question,
154 addCommunityPermissions, addGuestPermissions);
155 }
156
157 public static void addQuestionResources(long questionId,
158 java.lang.String[] communityPermissions,
159 java.lang.String[] guestPermissions)
160 throws com.liferay.portal.PortalException,
161 com.liferay.portal.SystemException {
162 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
163 pollsQuestionLocalService.addQuestionResources(questionId,
164 communityPermissions, guestPermissions);
165 }
166
167 public static void addQuestionResources(
168 com.liferay.portlet.polls.model.PollsQuestion question,
169 java.lang.String[] communityPermissions,
170 java.lang.String[] guestPermissions)
171 throws com.liferay.portal.PortalException,
172 com.liferay.portal.SystemException {
173 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
174 pollsQuestionLocalService.addQuestionResources(question,
175 communityPermissions, guestPermissions);
176 }
177
178 public static void deleteQuestion(long questionId)
179 throws com.liferay.portal.PortalException,
180 com.liferay.portal.SystemException {
181 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
182 pollsQuestionLocalService.deleteQuestion(questionId);
183 }
184
185 public static void deleteQuestion(
186 com.liferay.portlet.polls.model.PollsQuestion question)
187 throws com.liferay.portal.PortalException,
188 com.liferay.portal.SystemException {
189 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
190 pollsQuestionLocalService.deleteQuestion(question);
191 }
192
193 public static void deleteQuestions(long groupId)
194 throws com.liferay.portal.PortalException,
195 com.liferay.portal.SystemException {
196 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
197 pollsQuestionLocalService.deleteQuestions(groupId);
198 }
199
200 public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
201 long questionId)
202 throws com.liferay.portal.PortalException,
203 com.liferay.portal.SystemException {
204 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
205
206 return pollsQuestionLocalService.getQuestion(questionId);
207 }
208
209 public static java.util.List getQuestions(long groupId)
210 throws com.liferay.portal.SystemException {
211 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
212
213 return pollsQuestionLocalService.getQuestions(groupId);
214 }
215
216 public static java.util.List getQuestions(long groupId, int begin, int end)
217 throws com.liferay.portal.SystemException {
218 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
219
220 return pollsQuestionLocalService.getQuestions(groupId, begin, end);
221 }
222
223 public static int getQuestionsCount(long groupId)
224 throws com.liferay.portal.SystemException {
225 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
226
227 return pollsQuestionLocalService.getQuestionsCount(groupId);
228 }
229
230 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
231 long userId, long questionId, java.lang.String title,
232 java.lang.String description, int expirationDateMonth,
233 int expirationDateDay, int expirationDateYear, int expirationDateHour,
234 int expirationDateMinute, boolean neverExpire, java.util.List choices)
235 throws com.liferay.portal.PortalException,
236 com.liferay.portal.SystemException {
237 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
238
239 return pollsQuestionLocalService.updateQuestion(userId, questionId,
240 title, description, expirationDateMonth, expirationDateDay,
241 expirationDateYear, expirationDateHour, expirationDateMinute,
242 neverExpire, choices);
243 }
244 }