001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.polls.service.base;
022:
023: import com.liferay.counter.service.CounterLocalService;
024: import com.liferay.counter.service.CounterLocalServiceFactory;
025: import com.liferay.counter.service.CounterService;
026: import com.liferay.counter.service.CounterServiceFactory;
027:
028: import com.liferay.portal.SystemException;
029: import com.liferay.portal.kernel.dao.DynamicQueryInitializer;
030: import com.liferay.portal.service.ResourceLocalService;
031: import com.liferay.portal.service.ResourceLocalServiceFactory;
032: import com.liferay.portal.service.ResourceService;
033: import com.liferay.portal.service.ResourceServiceFactory;
034: import com.liferay.portal.service.UserLocalService;
035: import com.liferay.portal.service.UserLocalServiceFactory;
036: import com.liferay.portal.service.UserService;
037: import com.liferay.portal.service.UserServiceFactory;
038: import com.liferay.portal.service.persistence.ResourceFinder;
039: import com.liferay.portal.service.persistence.ResourceFinderUtil;
040: import com.liferay.portal.service.persistence.ResourcePersistence;
041: import com.liferay.portal.service.persistence.ResourceUtil;
042: import com.liferay.portal.service.persistence.UserFinder;
043: import com.liferay.portal.service.persistence.UserFinderUtil;
044: import com.liferay.portal.service.persistence.UserPersistence;
045: import com.liferay.portal.service.persistence.UserUtil;
046:
047: import com.liferay.portlet.polls.model.PollsQuestion;
048: import com.liferay.portlet.polls.model.impl.PollsQuestionImpl;
049: import com.liferay.portlet.polls.service.PollsChoiceLocalService;
050: import com.liferay.portlet.polls.service.PollsChoiceLocalServiceFactory;
051: import com.liferay.portlet.polls.service.PollsQuestionLocalService;
052: import com.liferay.portlet.polls.service.PollsVoteLocalService;
053: import com.liferay.portlet.polls.service.PollsVoteLocalServiceFactory;
054: import com.liferay.portlet.polls.service.PollsVoteService;
055: import com.liferay.portlet.polls.service.PollsVoteServiceFactory;
056: import com.liferay.portlet.polls.service.persistence.PollsChoiceFinder;
057: import com.liferay.portlet.polls.service.persistence.PollsChoiceFinderUtil;
058: import com.liferay.portlet.polls.service.persistence.PollsChoicePersistence;
059: import com.liferay.portlet.polls.service.persistence.PollsChoiceUtil;
060: import com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence;
061: import com.liferay.portlet.polls.service.persistence.PollsQuestionUtil;
062: import com.liferay.portlet.polls.service.persistence.PollsVotePersistence;
063: import com.liferay.portlet.polls.service.persistence.PollsVoteUtil;
064:
065: import org.springframework.beans.factory.InitializingBean;
066:
067: import java.util.List;
068:
069: /**
070: * <a href="PollsQuestionLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
071: *
072: * @author Brian Wing Shun Chan
073: *
074: */
075: public abstract class PollsQuestionLocalServiceBaseImpl implements
076: PollsQuestionLocalService, InitializingBean {
077: public PollsQuestion addPollsQuestion(PollsQuestion model)
078: throws SystemException {
079: PollsQuestion pollsQuestion = new PollsQuestionImpl();
080:
081: pollsQuestion.setNew(true);
082:
083: pollsQuestion.setUuid(model.getUuid());
084: pollsQuestion.setQuestionId(model.getQuestionId());
085: pollsQuestion.setGroupId(model.getGroupId());
086: pollsQuestion.setCompanyId(model.getCompanyId());
087: pollsQuestion.setUserId(model.getUserId());
088: pollsQuestion.setUserName(model.getUserName());
089: pollsQuestion.setCreateDate(model.getCreateDate());
090: pollsQuestion.setModifiedDate(model.getModifiedDate());
091: pollsQuestion.setTitle(model.getTitle());
092: pollsQuestion.setDescription(model.getDescription());
093: pollsQuestion.setExpirationDate(model.getExpirationDate());
094: pollsQuestion.setLastVoteDate(model.getLastVoteDate());
095:
096: return pollsQuestionPersistence.update(pollsQuestion);
097: }
098:
099: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
100: throws SystemException {
101: return pollsQuestionPersistence
102: .findWithDynamicQuery(queryInitializer);
103: }
104:
105: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
106: int begin, int end) throws SystemException {
107: return pollsQuestionPersistence.findWithDynamicQuery(
108: queryInitializer, begin, end);
109: }
110:
111: public PollsQuestion updatePollsQuestion(PollsQuestion model)
112: throws SystemException {
113: return pollsQuestionPersistence.update(model, true);
114: }
115:
116: public PollsChoiceLocalService getPollsChoiceLocalService() {
117: return pollsChoiceLocalService;
118: }
119:
120: public void setPollsChoiceLocalService(
121: PollsChoiceLocalService pollsChoiceLocalService) {
122: this .pollsChoiceLocalService = pollsChoiceLocalService;
123: }
124:
125: public PollsChoicePersistence getPollsChoicePersistence() {
126: return pollsChoicePersistence;
127: }
128:
129: public void setPollsChoicePersistence(
130: PollsChoicePersistence pollsChoicePersistence) {
131: this .pollsChoicePersistence = pollsChoicePersistence;
132: }
133:
134: public PollsChoiceFinder getPollsChoiceFinder() {
135: return pollsChoiceFinder;
136: }
137:
138: public void setPollsChoiceFinder(PollsChoiceFinder pollsChoiceFinder) {
139: this .pollsChoiceFinder = pollsChoiceFinder;
140: }
141:
142: public PollsQuestionPersistence getPollsQuestionPersistence() {
143: return pollsQuestionPersistence;
144: }
145:
146: public void setPollsQuestionPersistence(
147: PollsQuestionPersistence pollsQuestionPersistence) {
148: this .pollsQuestionPersistence = pollsQuestionPersistence;
149: }
150:
151: public PollsVoteLocalService getPollsVoteLocalService() {
152: return pollsVoteLocalService;
153: }
154:
155: public void setPollsVoteLocalService(
156: PollsVoteLocalService pollsVoteLocalService) {
157: this .pollsVoteLocalService = pollsVoteLocalService;
158: }
159:
160: public PollsVoteService getPollsVoteService() {
161: return pollsVoteService;
162: }
163:
164: public void setPollsVoteService(PollsVoteService pollsVoteService) {
165: this .pollsVoteService = pollsVoteService;
166: }
167:
168: public PollsVotePersistence getPollsVotePersistence() {
169: return pollsVotePersistence;
170: }
171:
172: public void setPollsVotePersistence(
173: PollsVotePersistence pollsVotePersistence) {
174: this .pollsVotePersistence = pollsVotePersistence;
175: }
176:
177: public CounterLocalService getCounterLocalService() {
178: return counterLocalService;
179: }
180:
181: public void setCounterLocalService(
182: CounterLocalService counterLocalService) {
183: this .counterLocalService = counterLocalService;
184: }
185:
186: public CounterService getCounterService() {
187: return counterService;
188: }
189:
190: public void setCounterService(CounterService counterService) {
191: this .counterService = counterService;
192: }
193:
194: public ResourceLocalService getResourceLocalService() {
195: return resourceLocalService;
196: }
197:
198: public void setResourceLocalService(
199: ResourceLocalService resourceLocalService) {
200: this .resourceLocalService = resourceLocalService;
201: }
202:
203: public ResourceService getResourceService() {
204: return resourceService;
205: }
206:
207: public void setResourceService(ResourceService resourceService) {
208: this .resourceService = resourceService;
209: }
210:
211: public ResourcePersistence getResourcePersistence() {
212: return resourcePersistence;
213: }
214:
215: public void setResourcePersistence(
216: ResourcePersistence resourcePersistence) {
217: this .resourcePersistence = resourcePersistence;
218: }
219:
220: public ResourceFinder getResourceFinder() {
221: return resourceFinder;
222: }
223:
224: public void setResourceFinder(ResourceFinder resourceFinder) {
225: this .resourceFinder = resourceFinder;
226: }
227:
228: public UserLocalService getUserLocalService() {
229: return userLocalService;
230: }
231:
232: public void setUserLocalService(UserLocalService userLocalService) {
233: this .userLocalService = userLocalService;
234: }
235:
236: public UserService getUserService() {
237: return userService;
238: }
239:
240: public void setUserService(UserService userService) {
241: this .userService = userService;
242: }
243:
244: public UserPersistence getUserPersistence() {
245: return userPersistence;
246: }
247:
248: public void setUserPersistence(UserPersistence userPersistence) {
249: this .userPersistence = userPersistence;
250: }
251:
252: public UserFinder getUserFinder() {
253: return userFinder;
254: }
255:
256: public void setUserFinder(UserFinder userFinder) {
257: this .userFinder = userFinder;
258: }
259:
260: public void afterPropertiesSet() {
261: if (pollsChoiceLocalService == null) {
262: pollsChoiceLocalService = PollsChoiceLocalServiceFactory
263: .getImpl();
264: }
265:
266: if (pollsChoicePersistence == null) {
267: pollsChoicePersistence = PollsChoiceUtil.getPersistence();
268: }
269:
270: if (pollsChoiceFinder == null) {
271: pollsChoiceFinder = PollsChoiceFinderUtil.getFinder();
272: }
273:
274: if (pollsQuestionPersistence == null) {
275: pollsQuestionPersistence = PollsQuestionUtil
276: .getPersistence();
277: }
278:
279: if (pollsVoteLocalService == null) {
280: pollsVoteLocalService = PollsVoteLocalServiceFactory
281: .getImpl();
282: }
283:
284: if (pollsVoteService == null) {
285: pollsVoteService = PollsVoteServiceFactory.getImpl();
286: }
287:
288: if (pollsVotePersistence == null) {
289: pollsVotePersistence = PollsVoteUtil.getPersistence();
290: }
291:
292: if (counterLocalService == null) {
293: counterLocalService = CounterLocalServiceFactory.getImpl();
294: }
295:
296: if (counterService == null) {
297: counterService = CounterServiceFactory.getImpl();
298: }
299:
300: if (resourceLocalService == null) {
301: resourceLocalService = ResourceLocalServiceFactory
302: .getImpl();
303: }
304:
305: if (resourceService == null) {
306: resourceService = ResourceServiceFactory.getImpl();
307: }
308:
309: if (resourcePersistence == null) {
310: resourcePersistence = ResourceUtil.getPersistence();
311: }
312:
313: if (resourceFinder == null) {
314: resourceFinder = ResourceFinderUtil.getFinder();
315: }
316:
317: if (userLocalService == null) {
318: userLocalService = UserLocalServiceFactory.getImpl();
319: }
320:
321: if (userService == null) {
322: userService = UserServiceFactory.getImpl();
323: }
324:
325: if (userPersistence == null) {
326: userPersistence = UserUtil.getPersistence();
327: }
328:
329: if (userFinder == null) {
330: userFinder = UserFinderUtil.getFinder();
331: }
332: }
333:
334: protected PollsChoiceLocalService pollsChoiceLocalService;
335: protected PollsChoicePersistence pollsChoicePersistence;
336: protected PollsChoiceFinder pollsChoiceFinder;
337: protected PollsQuestionPersistence pollsQuestionPersistence;
338: protected PollsVoteLocalService pollsVoteLocalService;
339: protected PollsVoteService pollsVoteService;
340: protected PollsVotePersistence pollsVotePersistence;
341: protected CounterLocalService counterLocalService;
342: protected CounterService counterService;
343: protected ResourceLocalService resourceLocalService;
344: protected ResourceService resourceService;
345: protected ResourcePersistence resourcePersistence;
346: protected ResourceFinder resourceFinder;
347: protected UserLocalService userLocalService;
348: protected UserService userService;
349: protected UserPersistence userPersistence;
350: protected UserFinder userFinder;
351: }
|