1
22
23 package com.liferay.portlet.polls.service.base;
24
25 import com.liferay.counter.service.CounterLocalService;
26 import com.liferay.counter.service.CounterService;
27
28 import com.liferay.portal.PortalException;
29 import com.liferay.portal.SystemException;
30 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
31
32 import com.liferay.portlet.polls.model.PollsChoice;
33 import com.liferay.portlet.polls.service.PollsChoiceLocalService;
34 import com.liferay.portlet.polls.service.PollsQuestionLocalService;
35 import com.liferay.portlet.polls.service.PollsQuestionService;
36 import com.liferay.portlet.polls.service.PollsVoteLocalService;
37 import com.liferay.portlet.polls.service.PollsVoteService;
38 import com.liferay.portlet.polls.service.persistence.PollsChoiceFinder;
39 import com.liferay.portlet.polls.service.persistence.PollsChoicePersistence;
40 import com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence;
41 import com.liferay.portlet.polls.service.persistence.PollsVotePersistence;
42
43 import java.util.List;
44
45
51 public abstract class PollsChoiceLocalServiceBaseImpl
52 implements PollsChoiceLocalService {
53 public PollsChoice addPollsChoice(PollsChoice pollsChoice)
54 throws SystemException {
55 pollsChoice.setNew(true);
56
57 return pollsChoicePersistence.update(pollsChoice, false);
58 }
59
60 public PollsChoice createPollsChoice(long choiceId) {
61 return pollsChoicePersistence.create(choiceId);
62 }
63
64 public void deletePollsChoice(long choiceId)
65 throws PortalException, SystemException {
66 pollsChoicePersistence.remove(choiceId);
67 }
68
69 public void deletePollsChoice(PollsChoice pollsChoice)
70 throws SystemException {
71 pollsChoicePersistence.remove(pollsChoice);
72 }
73
74 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
75 throws SystemException {
76 return pollsChoicePersistence.findWithDynamicQuery(dynamicQuery);
77 }
78
79 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
80 int end) throws SystemException {
81 return pollsChoicePersistence.findWithDynamicQuery(dynamicQuery, start,
82 end);
83 }
84
85 public PollsChoice getPollsChoice(long choiceId)
86 throws PortalException, SystemException {
87 return pollsChoicePersistence.findByPrimaryKey(choiceId);
88 }
89
90 public List<PollsChoice> getPollsChoices(int start, int end)
91 throws SystemException {
92 return pollsChoicePersistence.findAll(start, end);
93 }
94
95 public int getPollsChoicesCount() throws SystemException {
96 return pollsChoicePersistence.countAll();
97 }
98
99 public PollsChoice updatePollsChoice(PollsChoice pollsChoice)
100 throws SystemException {
101 pollsChoice.setNew(false);
102
103 return pollsChoicePersistence.update(pollsChoice, true);
104 }
105
106 public PollsChoiceLocalService getPollsChoiceLocalService() {
107 return pollsChoiceLocalService;
108 }
109
110 public void setPollsChoiceLocalService(
111 PollsChoiceLocalService pollsChoiceLocalService) {
112 this.pollsChoiceLocalService = pollsChoiceLocalService;
113 }
114
115 public PollsChoicePersistence getPollsChoicePersistence() {
116 return pollsChoicePersistence;
117 }
118
119 public void setPollsChoicePersistence(
120 PollsChoicePersistence pollsChoicePersistence) {
121 this.pollsChoicePersistence = pollsChoicePersistence;
122 }
123
124 public PollsChoiceFinder getPollsChoiceFinder() {
125 return pollsChoiceFinder;
126 }
127
128 public void setPollsChoiceFinder(PollsChoiceFinder pollsChoiceFinder) {
129 this.pollsChoiceFinder = pollsChoiceFinder;
130 }
131
132 public PollsQuestionLocalService getPollsQuestionLocalService() {
133 return pollsQuestionLocalService;
134 }
135
136 public void setPollsQuestionLocalService(
137 PollsQuestionLocalService pollsQuestionLocalService) {
138 this.pollsQuestionLocalService = pollsQuestionLocalService;
139 }
140
141 public PollsQuestionService getPollsQuestionService() {
142 return pollsQuestionService;
143 }
144
145 public void setPollsQuestionService(
146 PollsQuestionService pollsQuestionService) {
147 this.pollsQuestionService = pollsQuestionService;
148 }
149
150 public PollsQuestionPersistence getPollsQuestionPersistence() {
151 return pollsQuestionPersistence;
152 }
153
154 public void setPollsQuestionPersistence(
155 PollsQuestionPersistence pollsQuestionPersistence) {
156 this.pollsQuestionPersistence = pollsQuestionPersistence;
157 }
158
159 public PollsVoteLocalService getPollsVoteLocalService() {
160 return pollsVoteLocalService;
161 }
162
163 public void setPollsVoteLocalService(
164 PollsVoteLocalService pollsVoteLocalService) {
165 this.pollsVoteLocalService = pollsVoteLocalService;
166 }
167
168 public PollsVoteService getPollsVoteService() {
169 return pollsVoteService;
170 }
171
172 public void setPollsVoteService(PollsVoteService pollsVoteService) {
173 this.pollsVoteService = pollsVoteService;
174 }
175
176 public PollsVotePersistence getPollsVotePersistence() {
177 return pollsVotePersistence;
178 }
179
180 public void setPollsVotePersistence(
181 PollsVotePersistence pollsVotePersistence) {
182 this.pollsVotePersistence = pollsVotePersistence;
183 }
184
185 public CounterLocalService getCounterLocalService() {
186 return counterLocalService;
187 }
188
189 public void setCounterLocalService(CounterLocalService counterLocalService) {
190 this.counterLocalService = counterLocalService;
191 }
192
193 public CounterService getCounterService() {
194 return counterService;
195 }
196
197 public void setCounterService(CounterService counterService) {
198 this.counterService = counterService;
199 }
200
201 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.PollsChoiceLocalService.impl")
202 protected PollsChoiceLocalService pollsChoiceLocalService;
203 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.persistence.PollsChoicePersistence.impl")
204 protected PollsChoicePersistence pollsChoicePersistence;
205 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.persistence.PollsChoiceFinder.impl")
206 protected PollsChoiceFinder pollsChoiceFinder;
207 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.PollsQuestionLocalService.impl")
208 protected PollsQuestionLocalService pollsQuestionLocalService;
209 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.PollsQuestionService.impl")
210 protected PollsQuestionService pollsQuestionService;
211 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence.impl")
212 protected PollsQuestionPersistence pollsQuestionPersistence;
213 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.PollsVoteLocalService.impl")
214 protected PollsVoteLocalService pollsVoteLocalService;
215 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.PollsVoteService.impl")
216 protected PollsVoteService pollsVoteService;
217 @javax.annotation.Resource(name = "com.liferay.portlet.polls.service.persistence.PollsVotePersistence.impl")
218 protected PollsVotePersistence pollsVotePersistence;
219 @javax.annotation.Resource(name = "com.liferay.counter.service.CounterLocalService.impl")
220 protected CounterLocalService counterLocalService;
221 @javax.annotation.Resource(name = "com.liferay.counter.service.CounterService.impl")
222 protected CounterService counterService;
223 }