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.ratings.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.UserLocalService;
031: import com.liferay.portal.service.UserLocalServiceFactory;
032: import com.liferay.portal.service.UserService;
033: import com.liferay.portal.service.UserServiceFactory;
034: import com.liferay.portal.service.persistence.UserFinder;
035: import com.liferay.portal.service.persistence.UserFinderUtil;
036: import com.liferay.portal.service.persistence.UserPersistence;
037: import com.liferay.portal.service.persistence.UserUtil;
038:
039: import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
040: import com.liferay.portlet.blogs.service.BlogsEntryLocalServiceFactory;
041: import com.liferay.portlet.blogs.service.BlogsEntryService;
042: import com.liferay.portlet.blogs.service.BlogsEntryServiceFactory;
043: import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
044: import com.liferay.portlet.blogs.service.BlogsStatsUserLocalServiceFactory;
045: import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
046: import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinderUtil;
047: import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
048: import com.liferay.portlet.blogs.service.persistence.BlogsEntryUtil;
049: import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
050: import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinderUtil;
051: import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
052: import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserUtil;
053: import com.liferay.portlet.ratings.model.RatingsEntry;
054: import com.liferay.portlet.ratings.model.impl.RatingsEntryImpl;
055: import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
056: import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
057: import com.liferay.portlet.ratings.service.RatingsStatsLocalServiceFactory;
058: import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
059: import com.liferay.portlet.ratings.service.persistence.RatingsEntryUtil;
060: import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
061: import com.liferay.portlet.ratings.service.persistence.RatingsStatsUtil;
062:
063: import org.springframework.beans.factory.InitializingBean;
064:
065: import java.util.List;
066:
067: /**
068: * <a href="RatingsEntryLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
069: *
070: * @author Brian Wing Shun Chan
071: *
072: */
073: public abstract class RatingsEntryLocalServiceBaseImpl implements
074: RatingsEntryLocalService, InitializingBean {
075: public RatingsEntry addRatingsEntry(RatingsEntry model)
076: throws SystemException {
077: RatingsEntry ratingsEntry = new RatingsEntryImpl();
078:
079: ratingsEntry.setNew(true);
080:
081: ratingsEntry.setEntryId(model.getEntryId());
082: ratingsEntry.setCompanyId(model.getCompanyId());
083: ratingsEntry.setUserId(model.getUserId());
084: ratingsEntry.setUserName(model.getUserName());
085: ratingsEntry.setCreateDate(model.getCreateDate());
086: ratingsEntry.setModifiedDate(model.getModifiedDate());
087: ratingsEntry.setClassNameId(model.getClassNameId());
088: ratingsEntry.setClassPK(model.getClassPK());
089: ratingsEntry.setScore(model.getScore());
090:
091: return ratingsEntryPersistence.update(ratingsEntry);
092: }
093:
094: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
095: throws SystemException {
096: return ratingsEntryPersistence
097: .findWithDynamicQuery(queryInitializer);
098: }
099:
100: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
101: int begin, int end) throws SystemException {
102: return ratingsEntryPersistence.findWithDynamicQuery(
103: queryInitializer, begin, end);
104: }
105:
106: public RatingsEntry updateRatingsEntry(RatingsEntry model)
107: throws SystemException {
108: return ratingsEntryPersistence.update(model, true);
109: }
110:
111: public RatingsEntryPersistence getRatingsEntryPersistence() {
112: return ratingsEntryPersistence;
113: }
114:
115: public void setRatingsEntryPersistence(
116: RatingsEntryPersistence ratingsEntryPersistence) {
117: this .ratingsEntryPersistence = ratingsEntryPersistence;
118: }
119:
120: public RatingsStatsLocalService getRatingsStatsLocalService() {
121: return ratingsStatsLocalService;
122: }
123:
124: public void setRatingsStatsLocalService(
125: RatingsStatsLocalService ratingsStatsLocalService) {
126: this .ratingsStatsLocalService = ratingsStatsLocalService;
127: }
128:
129: public RatingsStatsPersistence getRatingsStatsPersistence() {
130: return ratingsStatsPersistence;
131: }
132:
133: public void setRatingsStatsPersistence(
134: RatingsStatsPersistence ratingsStatsPersistence) {
135: this .ratingsStatsPersistence = ratingsStatsPersistence;
136: }
137:
138: public CounterLocalService getCounterLocalService() {
139: return counterLocalService;
140: }
141:
142: public void setCounterLocalService(
143: CounterLocalService counterLocalService) {
144: this .counterLocalService = counterLocalService;
145: }
146:
147: public CounterService getCounterService() {
148: return counterService;
149: }
150:
151: public void setCounterService(CounterService counterService) {
152: this .counterService = counterService;
153: }
154:
155: public UserLocalService getUserLocalService() {
156: return userLocalService;
157: }
158:
159: public void setUserLocalService(UserLocalService userLocalService) {
160: this .userLocalService = userLocalService;
161: }
162:
163: public UserService getUserService() {
164: return userService;
165: }
166:
167: public void setUserService(UserService userService) {
168: this .userService = userService;
169: }
170:
171: public UserPersistence getUserPersistence() {
172: return userPersistence;
173: }
174:
175: public void setUserPersistence(UserPersistence userPersistence) {
176: this .userPersistence = userPersistence;
177: }
178:
179: public UserFinder getUserFinder() {
180: return userFinder;
181: }
182:
183: public void setUserFinder(UserFinder userFinder) {
184: this .userFinder = userFinder;
185: }
186:
187: public BlogsEntryLocalService getBlogsEntryLocalService() {
188: return blogsEntryLocalService;
189: }
190:
191: public void setBlogsEntryLocalService(
192: BlogsEntryLocalService blogsEntryLocalService) {
193: this .blogsEntryLocalService = blogsEntryLocalService;
194: }
195:
196: public BlogsEntryService getBlogsEntryService() {
197: return blogsEntryService;
198: }
199:
200: public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
201: this .blogsEntryService = blogsEntryService;
202: }
203:
204: public BlogsEntryPersistence getBlogsEntryPersistence() {
205: return blogsEntryPersistence;
206: }
207:
208: public void setBlogsEntryPersistence(
209: BlogsEntryPersistence blogsEntryPersistence) {
210: this .blogsEntryPersistence = blogsEntryPersistence;
211: }
212:
213: public BlogsEntryFinder getBlogsEntryFinder() {
214: return blogsEntryFinder;
215: }
216:
217: public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
218: this .blogsEntryFinder = blogsEntryFinder;
219: }
220:
221: public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
222: return blogsStatsUserLocalService;
223: }
224:
225: public void setBlogsStatsUserLocalService(
226: BlogsStatsUserLocalService blogsStatsUserLocalService) {
227: this .blogsStatsUserLocalService = blogsStatsUserLocalService;
228: }
229:
230: public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
231: return blogsStatsUserPersistence;
232: }
233:
234: public void setBlogsStatsUserPersistence(
235: BlogsStatsUserPersistence blogsStatsUserPersistence) {
236: this .blogsStatsUserPersistence = blogsStatsUserPersistence;
237: }
238:
239: public BlogsStatsUserFinder getBlogsStatsUserFinder() {
240: return blogsStatsUserFinder;
241: }
242:
243: public void setBlogsStatsUserFinder(
244: BlogsStatsUserFinder blogsStatsUserFinder) {
245: this .blogsStatsUserFinder = blogsStatsUserFinder;
246: }
247:
248: public void afterPropertiesSet() {
249: if (ratingsEntryPersistence == null) {
250: ratingsEntryPersistence = RatingsEntryUtil.getPersistence();
251: }
252:
253: if (ratingsStatsLocalService == null) {
254: ratingsStatsLocalService = RatingsStatsLocalServiceFactory
255: .getImpl();
256: }
257:
258: if (ratingsStatsPersistence == null) {
259: ratingsStatsPersistence = RatingsStatsUtil.getPersistence();
260: }
261:
262: if (counterLocalService == null) {
263: counterLocalService = CounterLocalServiceFactory.getImpl();
264: }
265:
266: if (counterService == null) {
267: counterService = CounterServiceFactory.getImpl();
268: }
269:
270: if (userLocalService == null) {
271: userLocalService = UserLocalServiceFactory.getImpl();
272: }
273:
274: if (userService == null) {
275: userService = UserServiceFactory.getImpl();
276: }
277:
278: if (userPersistence == null) {
279: userPersistence = UserUtil.getPersistence();
280: }
281:
282: if (userFinder == null) {
283: userFinder = UserFinderUtil.getFinder();
284: }
285:
286: if (blogsEntryLocalService == null) {
287: blogsEntryLocalService = BlogsEntryLocalServiceFactory
288: .getImpl();
289: }
290:
291: if (blogsEntryService == null) {
292: blogsEntryService = BlogsEntryServiceFactory.getImpl();
293: }
294:
295: if (blogsEntryPersistence == null) {
296: blogsEntryPersistence = BlogsEntryUtil.getPersistence();
297: }
298:
299: if (blogsEntryFinder == null) {
300: blogsEntryFinder = BlogsEntryFinderUtil.getFinder();
301: }
302:
303: if (blogsStatsUserLocalService == null) {
304: blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory
305: .getImpl();
306: }
307:
308: if (blogsStatsUserPersistence == null) {
309: blogsStatsUserPersistence = BlogsStatsUserUtil
310: .getPersistence();
311: }
312:
313: if (blogsStatsUserFinder == null) {
314: blogsStatsUserFinder = BlogsStatsUserFinderUtil.getFinder();
315: }
316: }
317:
318: protected RatingsEntryPersistence ratingsEntryPersistence;
319: protected RatingsStatsLocalService ratingsStatsLocalService;
320: protected RatingsStatsPersistence ratingsStatsPersistence;
321: protected CounterLocalService counterLocalService;
322: protected CounterService counterService;
323: protected UserLocalService userLocalService;
324: protected UserService userService;
325: protected UserPersistence userPersistence;
326: protected UserFinder userFinder;
327: protected BlogsEntryLocalService blogsEntryLocalService;
328: protected BlogsEntryService blogsEntryService;
329: protected BlogsEntryPersistence blogsEntryPersistence;
330: protected BlogsEntryFinder blogsEntryFinder;
331: protected BlogsStatsUserLocalService blogsStatsUserLocalService;
332: protected BlogsStatsUserPersistence blogsStatsUserPersistence;
333: protected BlogsStatsUserFinder blogsStatsUserFinder;
334: }
|