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.blogs.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.GroupLocalService;
031: import com.liferay.portal.service.GroupLocalServiceFactory;
032: import com.liferay.portal.service.GroupService;
033: import com.liferay.portal.service.GroupServiceFactory;
034: import com.liferay.portal.service.persistence.GroupFinder;
035: import com.liferay.portal.service.persistence.GroupFinderUtil;
036: import com.liferay.portal.service.persistence.GroupPersistence;
037: import com.liferay.portal.service.persistence.GroupUtil;
038:
039: import com.liferay.portlet.blogs.model.BlogsStatsUser;
040: import com.liferay.portlet.blogs.model.impl.BlogsStatsUserImpl;
041: import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
042: import com.liferay.portlet.blogs.service.BlogsEntryLocalServiceFactory;
043: import com.liferay.portlet.blogs.service.BlogsEntryService;
044: import com.liferay.portlet.blogs.service.BlogsEntryServiceFactory;
045: import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
046: import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
047: import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinderUtil;
048: import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
049: import com.liferay.portlet.blogs.service.persistence.BlogsEntryUtil;
050: import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
051: import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinderUtil;
052: import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
053: import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserUtil;
054:
055: import org.springframework.beans.factory.InitializingBean;
056:
057: import java.util.List;
058:
059: /**
060: * <a href="BlogsStatsUserLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
061: *
062: * @author Brian Wing Shun Chan
063: *
064: */
065: public abstract class BlogsStatsUserLocalServiceBaseImpl implements
066: BlogsStatsUserLocalService, InitializingBean {
067: public BlogsStatsUser addBlogsStatsUser(BlogsStatsUser model)
068: throws SystemException {
069: BlogsStatsUser blogsStatsUser = new BlogsStatsUserImpl();
070:
071: blogsStatsUser.setNew(true);
072:
073: blogsStatsUser.setStatsUserId(model.getStatsUserId());
074: blogsStatsUser.setGroupId(model.getGroupId());
075: blogsStatsUser.setCompanyId(model.getCompanyId());
076: blogsStatsUser.setUserId(model.getUserId());
077: blogsStatsUser.setEntryCount(model.getEntryCount());
078: blogsStatsUser.setLastPostDate(model.getLastPostDate());
079: blogsStatsUser.setRatingsTotalEntries(model
080: .getRatingsTotalEntries());
081: blogsStatsUser.setRatingsTotalScore(model
082: .getRatingsTotalScore());
083: blogsStatsUser.setRatingsAverageScore(model
084: .getRatingsAverageScore());
085:
086: return blogsStatsUserPersistence.update(blogsStatsUser);
087: }
088:
089: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
090: throws SystemException {
091: return blogsStatsUserPersistence
092: .findWithDynamicQuery(queryInitializer);
093: }
094:
095: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
096: int begin, int end) throws SystemException {
097: return blogsStatsUserPersistence.findWithDynamicQuery(
098: queryInitializer, begin, end);
099: }
100:
101: public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser model)
102: throws SystemException {
103: return blogsStatsUserPersistence.update(model, true);
104: }
105:
106: public BlogsEntryLocalService getBlogsEntryLocalService() {
107: return blogsEntryLocalService;
108: }
109:
110: public void setBlogsEntryLocalService(
111: BlogsEntryLocalService blogsEntryLocalService) {
112: this .blogsEntryLocalService = blogsEntryLocalService;
113: }
114:
115: public BlogsEntryService getBlogsEntryService() {
116: return blogsEntryService;
117: }
118:
119: public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
120: this .blogsEntryService = blogsEntryService;
121: }
122:
123: public BlogsEntryPersistence getBlogsEntryPersistence() {
124: return blogsEntryPersistence;
125: }
126:
127: public void setBlogsEntryPersistence(
128: BlogsEntryPersistence blogsEntryPersistence) {
129: this .blogsEntryPersistence = blogsEntryPersistence;
130: }
131:
132: public BlogsEntryFinder getBlogsEntryFinder() {
133: return blogsEntryFinder;
134: }
135:
136: public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
137: this .blogsEntryFinder = blogsEntryFinder;
138: }
139:
140: public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
141: return blogsStatsUserPersistence;
142: }
143:
144: public void setBlogsStatsUserPersistence(
145: BlogsStatsUserPersistence blogsStatsUserPersistence) {
146: this .blogsStatsUserPersistence = blogsStatsUserPersistence;
147: }
148:
149: public BlogsStatsUserFinder getBlogsStatsUserFinder() {
150: return blogsStatsUserFinder;
151: }
152:
153: public void setBlogsStatsUserFinder(
154: BlogsStatsUserFinder blogsStatsUserFinder) {
155: this .blogsStatsUserFinder = blogsStatsUserFinder;
156: }
157:
158: public CounterLocalService getCounterLocalService() {
159: return counterLocalService;
160: }
161:
162: public void setCounterLocalService(
163: CounterLocalService counterLocalService) {
164: this .counterLocalService = counterLocalService;
165: }
166:
167: public CounterService getCounterService() {
168: return counterService;
169: }
170:
171: public void setCounterService(CounterService counterService) {
172: this .counterService = counterService;
173: }
174:
175: public GroupLocalService getGroupLocalService() {
176: return groupLocalService;
177: }
178:
179: public void setGroupLocalService(GroupLocalService groupLocalService) {
180: this .groupLocalService = groupLocalService;
181: }
182:
183: public GroupService getGroupService() {
184: return groupService;
185: }
186:
187: public void setGroupService(GroupService groupService) {
188: this .groupService = groupService;
189: }
190:
191: public GroupPersistence getGroupPersistence() {
192: return groupPersistence;
193: }
194:
195: public void setGroupPersistence(GroupPersistence groupPersistence) {
196: this .groupPersistence = groupPersistence;
197: }
198:
199: public GroupFinder getGroupFinder() {
200: return groupFinder;
201: }
202:
203: public void setGroupFinder(GroupFinder groupFinder) {
204: this .groupFinder = groupFinder;
205: }
206:
207: public void afterPropertiesSet() {
208: if (blogsEntryLocalService == null) {
209: blogsEntryLocalService = BlogsEntryLocalServiceFactory
210: .getImpl();
211: }
212:
213: if (blogsEntryService == null) {
214: blogsEntryService = BlogsEntryServiceFactory.getImpl();
215: }
216:
217: if (blogsEntryPersistence == null) {
218: blogsEntryPersistence = BlogsEntryUtil.getPersistence();
219: }
220:
221: if (blogsEntryFinder == null) {
222: blogsEntryFinder = BlogsEntryFinderUtil.getFinder();
223: }
224:
225: if (blogsStatsUserPersistence == null) {
226: blogsStatsUserPersistence = BlogsStatsUserUtil
227: .getPersistence();
228: }
229:
230: if (blogsStatsUserFinder == null) {
231: blogsStatsUserFinder = BlogsStatsUserFinderUtil.getFinder();
232: }
233:
234: if (counterLocalService == null) {
235: counterLocalService = CounterLocalServiceFactory.getImpl();
236: }
237:
238: if (counterService == null) {
239: counterService = CounterServiceFactory.getImpl();
240: }
241:
242: if (groupLocalService == null) {
243: groupLocalService = GroupLocalServiceFactory.getImpl();
244: }
245:
246: if (groupService == null) {
247: groupService = GroupServiceFactory.getImpl();
248: }
249:
250: if (groupPersistence == null) {
251: groupPersistence = GroupUtil.getPersistence();
252: }
253:
254: if (groupFinder == null) {
255: groupFinder = GroupFinderUtil.getFinder();
256: }
257: }
258:
259: protected BlogsEntryLocalService blogsEntryLocalService;
260: protected BlogsEntryService blogsEntryService;
261: protected BlogsEntryPersistence blogsEntryPersistence;
262: protected BlogsEntryFinder blogsEntryFinder;
263: protected BlogsStatsUserPersistence blogsStatsUserPersistence;
264: protected BlogsStatsUserFinder blogsStatsUserFinder;
265: protected CounterLocalService counterLocalService;
266: protected CounterService counterService;
267: protected GroupLocalService groupLocalService;
268: protected GroupService groupService;
269: protected GroupPersistence groupPersistence;
270: protected GroupFinder groupFinder;
271: }
|