1
22
23 package com.liferay.portlet.polls.service.base;
24
25 import com.liferay.counter.service.CounterLocalService;
26 import com.liferay.counter.service.CounterLocalServiceFactory;
27 import com.liferay.counter.service.CounterService;
28 import com.liferay.counter.service.CounterServiceFactory;
29
30 import com.liferay.portal.SystemException;
31 import com.liferay.portal.kernel.dao.DynamicQueryInitializer;
32
33 import com.liferay.portlet.polls.model.PollsChoice;
34 import com.liferay.portlet.polls.model.impl.PollsChoiceImpl;
35 import com.liferay.portlet.polls.service.PollsChoiceLocalService;
36 import com.liferay.portlet.polls.service.PollsQuestionLocalService;
37 import com.liferay.portlet.polls.service.PollsQuestionLocalServiceFactory;
38 import com.liferay.portlet.polls.service.PollsQuestionService;
39 import com.liferay.portlet.polls.service.PollsQuestionServiceFactory;
40 import com.liferay.portlet.polls.service.PollsVoteLocalService;
41 import com.liferay.portlet.polls.service.PollsVoteLocalServiceFactory;
42 import com.liferay.portlet.polls.service.PollsVoteService;
43 import com.liferay.portlet.polls.service.PollsVoteServiceFactory;
44 import com.liferay.portlet.polls.service.persistence.PollsChoiceFinder;
45 import com.liferay.portlet.polls.service.persistence.PollsChoiceFinderUtil;
46 import com.liferay.portlet.polls.service.persistence.PollsChoicePersistence;
47 import com.liferay.portlet.polls.service.persistence.PollsChoiceUtil;
48 import com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence;
49 import com.liferay.portlet.polls.service.persistence.PollsQuestionUtil;
50 import com.liferay.portlet.polls.service.persistence.PollsVotePersistence;
51 import com.liferay.portlet.polls.service.persistence.PollsVoteUtil;
52
53 import org.springframework.beans.factory.InitializingBean;
54
55 import java.util.List;
56
57
63 public abstract class PollsChoiceLocalServiceBaseImpl
64 implements PollsChoiceLocalService, InitializingBean {
65 public PollsChoice addPollsChoice(PollsChoice model)
66 throws SystemException {
67 PollsChoice pollsChoice = new PollsChoiceImpl();
68
69 pollsChoice.setNew(true);
70
71 pollsChoice.setUuid(model.getUuid());
72 pollsChoice.setChoiceId(model.getChoiceId());
73 pollsChoice.setQuestionId(model.getQuestionId());
74 pollsChoice.setName(model.getName());
75 pollsChoice.setDescription(model.getDescription());
76
77 return pollsChoicePersistence.update(pollsChoice);
78 }
79
80 public List dynamicQuery(DynamicQueryInitializer queryInitializer)
81 throws SystemException {
82 return pollsChoicePersistence.findWithDynamicQuery(queryInitializer);
83 }
84
85 public List dynamicQuery(DynamicQueryInitializer queryInitializer,
86 int begin, int end) throws SystemException {
87 return pollsChoicePersistence.findWithDynamicQuery(queryInitializer,
88 begin, end);
89 }
90
91 public PollsChoice updatePollsChoice(PollsChoice model)
92 throws SystemException {
93 return pollsChoicePersistence.update(model, true);
94 }
95
96 public PollsChoicePersistence getPollsChoicePersistence() {
97 return pollsChoicePersistence;
98 }
99
100 public void setPollsChoicePersistence(
101 PollsChoicePersistence pollsChoicePersistence) {
102 this.pollsChoicePersistence = pollsChoicePersistence;
103 }
104
105 public PollsChoiceFinder getPollsChoiceFinder() {
106 return pollsChoiceFinder;
107 }
108
109 public void setPollsChoiceFinder(PollsChoiceFinder pollsChoiceFinder) {
110 this.pollsChoiceFinder = pollsChoiceFinder;
111 }
112
113 public PollsQuestionLocalService getPollsQuestionLocalService() {
114 return pollsQuestionLocalService;
115 }
116
117 public void setPollsQuestionLocalService(
118 PollsQuestionLocalService pollsQuestionLocalService) {
119 this.pollsQuestionLocalService = pollsQuestionLocalService;
120 }
121
122 public PollsQuestionService getPollsQuestionService() {
123 return pollsQuestionService;
124 }
125
126 public void setPollsQuestionService(
127 PollsQuestionService pollsQuestionService) {
128 this.pollsQuestionService = pollsQuestionService;
129 }
130
131 public PollsQuestionPersistence getPollsQuestionPersistence() {
132 return pollsQuestionPersistence;
133 }
134
135 public void setPollsQuestionPersistence(
136 PollsQuestionPersistence pollsQuestionPersistence) {
137 this.pollsQuestionPersistence = pollsQuestionPersistence;
138 }
139
140 public PollsVoteLocalService getPollsVoteLocalService() {
141 return pollsVoteLocalService;
142 }
143
144 public void setPollsVoteLocalService(
145 PollsVoteLocalService pollsVoteLocalService) {
146 this.pollsVoteLocalService = pollsVoteLocalService;
147 }
148
149 public PollsVoteService getPollsVoteService() {
150 return pollsVoteService;
151 }
152
153 public void setPollsVoteService(PollsVoteService pollsVoteService) {
154 this.pollsVoteService = pollsVoteService;
155 }
156
157 public PollsVotePersistence getPollsVotePersistence() {
158 return pollsVotePersistence;
159 }
160
161 public void setPollsVotePersistence(
162 PollsVotePersistence pollsVotePersistence) {
163 this.pollsVotePersistence = pollsVotePersistence;
164 }
165
166 public CounterLocalService getCounterLocalService() {
167 return counterLocalService;
168 }
169
170 public void setCounterLocalService(CounterLocalService counterLocalService) {
171 this.counterLocalService = counterLocalService;
172 }
173
174 public CounterService getCounterService() {
175 return counterService;
176 }
177
178 public void setCounterService(CounterService counterService) {
179 this.counterService = counterService;
180 }
181
182 public void afterPropertiesSet() {
183 if (pollsChoicePersistence == null) {
184 pollsChoicePersistence = PollsChoiceUtil.getPersistence();
185 }
186
187 if (pollsChoiceFinder == null) {
188 pollsChoiceFinder = PollsChoiceFinderUtil.getFinder();
189 }
190
191 if (pollsQuestionLocalService == null) {
192 pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getImpl();
193 }
194
195 if (pollsQuestionService == null) {
196 pollsQuestionService = PollsQuestionServiceFactory.getImpl();
197 }
198
199 if (pollsQuestionPersistence == null) {
200 pollsQuestionPersistence = PollsQuestionUtil.getPersistence();
201 }
202
203 if (pollsVoteLocalService == null) {
204 pollsVoteLocalService = PollsVoteLocalServiceFactory.getImpl();
205 }
206
207 if (pollsVoteService == null) {
208 pollsVoteService = PollsVoteServiceFactory.getImpl();
209 }
210
211 if (pollsVotePersistence == null) {
212 pollsVotePersistence = PollsVoteUtil.getPersistence();
213 }
214
215 if (counterLocalService == null) {
216 counterLocalService = CounterLocalServiceFactory.getImpl();
217 }
218
219 if (counterService == null) {
220 counterService = CounterServiceFactory.getImpl();
221 }
222 }
223
224 protected PollsChoicePersistence pollsChoicePersistence;
225 protected PollsChoiceFinder pollsChoiceFinder;
226 protected PollsQuestionLocalService pollsQuestionLocalService;
227 protected PollsQuestionService pollsQuestionService;
228 protected PollsQuestionPersistence pollsQuestionPersistence;
229 protected PollsVoteLocalService pollsVoteLocalService;
230 protected PollsVoteService pollsVoteService;
231 protected PollsVotePersistence pollsVotePersistence;
232 protected CounterLocalService counterLocalService;
233 protected CounterService counterService;
234 }