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.wiki.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.messageboards.service.MBMessageLocalService;
048: import com.liferay.portlet.messageboards.service.MBMessageLocalServiceFactory;
049: import com.liferay.portlet.messageboards.service.MBMessageService;
050: import com.liferay.portlet.messageboards.service.MBMessageServiceFactory;
051: import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
052: import com.liferay.portlet.messageboards.service.persistence.MBMessageFinderUtil;
053: import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
054: import com.liferay.portlet.messageboards.service.persistence.MBMessageUtil;
055: import com.liferay.portlet.tags.service.TagsAssetLocalService;
056: import com.liferay.portlet.tags.service.TagsAssetLocalServiceFactory;
057: import com.liferay.portlet.tags.service.TagsAssetService;
058: import com.liferay.portlet.tags.service.TagsAssetServiceFactory;
059: import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
060: import com.liferay.portlet.tags.service.persistence.TagsAssetFinderUtil;
061: import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
062: import com.liferay.portlet.tags.service.persistence.TagsAssetUtil;
063: import com.liferay.portlet.wiki.model.WikiPage;
064: import com.liferay.portlet.wiki.model.impl.WikiPageImpl;
065: import com.liferay.portlet.wiki.service.WikiNodeLocalService;
066: import com.liferay.portlet.wiki.service.WikiNodeLocalServiceFactory;
067: import com.liferay.portlet.wiki.service.WikiNodeService;
068: import com.liferay.portlet.wiki.service.WikiNodeServiceFactory;
069: import com.liferay.portlet.wiki.service.WikiPageLocalService;
070: import com.liferay.portlet.wiki.service.WikiPageResourceLocalService;
071: import com.liferay.portlet.wiki.service.WikiPageResourceLocalServiceFactory;
072: import com.liferay.portlet.wiki.service.persistence.WikiNodePersistence;
073: import com.liferay.portlet.wiki.service.persistence.WikiNodeUtil;
074: import com.liferay.portlet.wiki.service.persistence.WikiPageFinder;
075: import com.liferay.portlet.wiki.service.persistence.WikiPageFinderUtil;
076: import com.liferay.portlet.wiki.service.persistence.WikiPagePersistence;
077: import com.liferay.portlet.wiki.service.persistence.WikiPageResourcePersistence;
078: import com.liferay.portlet.wiki.service.persistence.WikiPageResourceUtil;
079: import com.liferay.portlet.wiki.service.persistence.WikiPageUtil;
080:
081: import org.springframework.beans.factory.InitializingBean;
082:
083: import java.util.List;
084:
085: /**
086: * <a href="WikiPageLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
087: *
088: * @author Brian Wing Shun Chan
089: *
090: */
091: public abstract class WikiPageLocalServiceBaseImpl implements
092: WikiPageLocalService, InitializingBean {
093: public WikiPage addWikiPage(WikiPage model) throws SystemException {
094: WikiPage wikiPage = new WikiPageImpl();
095:
096: wikiPage.setNew(true);
097:
098: wikiPage.setUuid(model.getUuid());
099: wikiPage.setPageId(model.getPageId());
100: wikiPage.setResourcePrimKey(model.getResourcePrimKey());
101: wikiPage.setCompanyId(model.getCompanyId());
102: wikiPage.setUserId(model.getUserId());
103: wikiPage.setUserName(model.getUserName());
104: wikiPage.setCreateDate(model.getCreateDate());
105: wikiPage.setNodeId(model.getNodeId());
106: wikiPage.setTitle(model.getTitle());
107: wikiPage.setVersion(model.getVersion());
108: wikiPage.setContent(model.getContent());
109: wikiPage.setFormat(model.getFormat());
110: wikiPage.setHead(model.getHead());
111:
112: return wikiPagePersistence.update(wikiPage);
113: }
114:
115: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
116: throws SystemException {
117: return wikiPagePersistence
118: .findWithDynamicQuery(queryInitializer);
119: }
120:
121: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
122: int begin, int end) throws SystemException {
123: return wikiPagePersistence.findWithDynamicQuery(
124: queryInitializer, begin, end);
125: }
126:
127: public WikiPage updateWikiPage(WikiPage model)
128: throws SystemException {
129: return wikiPagePersistence.update(model, true);
130: }
131:
132: public WikiNodeLocalService getWikiNodeLocalService() {
133: return wikiNodeLocalService;
134: }
135:
136: public void setWikiNodeLocalService(
137: WikiNodeLocalService wikiNodeLocalService) {
138: this .wikiNodeLocalService = wikiNodeLocalService;
139: }
140:
141: public WikiNodeService getWikiNodeService() {
142: return wikiNodeService;
143: }
144:
145: public void setWikiNodeService(WikiNodeService wikiNodeService) {
146: this .wikiNodeService = wikiNodeService;
147: }
148:
149: public WikiNodePersistence getWikiNodePersistence() {
150: return wikiNodePersistence;
151: }
152:
153: public void setWikiNodePersistence(
154: WikiNodePersistence wikiNodePersistence) {
155: this .wikiNodePersistence = wikiNodePersistence;
156: }
157:
158: public WikiPagePersistence getWikiPagePersistence() {
159: return wikiPagePersistence;
160: }
161:
162: public void setWikiPagePersistence(
163: WikiPagePersistence wikiPagePersistence) {
164: this .wikiPagePersistence = wikiPagePersistence;
165: }
166:
167: public WikiPageFinder getWikiPageFinder() {
168: return wikiPageFinder;
169: }
170:
171: public void setWikiPageFinder(WikiPageFinder wikiPageFinder) {
172: this .wikiPageFinder = wikiPageFinder;
173: }
174:
175: public WikiPageResourceLocalService getWikiPageResourceLocalService() {
176: return wikiPageResourceLocalService;
177: }
178:
179: public void setWikiPageResourceLocalService(
180: WikiPageResourceLocalService wikiPageResourceLocalService) {
181: this .wikiPageResourceLocalService = wikiPageResourceLocalService;
182: }
183:
184: public WikiPageResourcePersistence getWikiPageResourcePersistence() {
185: return wikiPageResourcePersistence;
186: }
187:
188: public void setWikiPageResourcePersistence(
189: WikiPageResourcePersistence wikiPageResourcePersistence) {
190: this .wikiPageResourcePersistence = wikiPageResourcePersistence;
191: }
192:
193: public CounterLocalService getCounterLocalService() {
194: return counterLocalService;
195: }
196:
197: public void setCounterLocalService(
198: CounterLocalService counterLocalService) {
199: this .counterLocalService = counterLocalService;
200: }
201:
202: public CounterService getCounterService() {
203: return counterService;
204: }
205:
206: public void setCounterService(CounterService counterService) {
207: this .counterService = counterService;
208: }
209:
210: public ResourceLocalService getResourceLocalService() {
211: return resourceLocalService;
212: }
213:
214: public void setResourceLocalService(
215: ResourceLocalService resourceLocalService) {
216: this .resourceLocalService = resourceLocalService;
217: }
218:
219: public ResourceService getResourceService() {
220: return resourceService;
221: }
222:
223: public void setResourceService(ResourceService resourceService) {
224: this .resourceService = resourceService;
225: }
226:
227: public ResourcePersistence getResourcePersistence() {
228: return resourcePersistence;
229: }
230:
231: public void setResourcePersistence(
232: ResourcePersistence resourcePersistence) {
233: this .resourcePersistence = resourcePersistence;
234: }
235:
236: public ResourceFinder getResourceFinder() {
237: return resourceFinder;
238: }
239:
240: public void setResourceFinder(ResourceFinder resourceFinder) {
241: this .resourceFinder = resourceFinder;
242: }
243:
244: public UserLocalService getUserLocalService() {
245: return userLocalService;
246: }
247:
248: public void setUserLocalService(UserLocalService userLocalService) {
249: this .userLocalService = userLocalService;
250: }
251:
252: public UserService getUserService() {
253: return userService;
254: }
255:
256: public void setUserService(UserService userService) {
257: this .userService = userService;
258: }
259:
260: public UserPersistence getUserPersistence() {
261: return userPersistence;
262: }
263:
264: public void setUserPersistence(UserPersistence userPersistence) {
265: this .userPersistence = userPersistence;
266: }
267:
268: public UserFinder getUserFinder() {
269: return userFinder;
270: }
271:
272: public void setUserFinder(UserFinder userFinder) {
273: this .userFinder = userFinder;
274: }
275:
276: public MBMessageLocalService getMBMessageLocalService() {
277: return mbMessageLocalService;
278: }
279:
280: public void setMBMessageLocalService(
281: MBMessageLocalService mbMessageLocalService) {
282: this .mbMessageLocalService = mbMessageLocalService;
283: }
284:
285: public MBMessageService getMBMessageService() {
286: return mbMessageService;
287: }
288:
289: public void setMBMessageService(MBMessageService mbMessageService) {
290: this .mbMessageService = mbMessageService;
291: }
292:
293: public MBMessagePersistence getMBMessagePersistence() {
294: return mbMessagePersistence;
295: }
296:
297: public void setMBMessagePersistence(
298: MBMessagePersistence mbMessagePersistence) {
299: this .mbMessagePersistence = mbMessagePersistence;
300: }
301:
302: public MBMessageFinder getMBMessageFinder() {
303: return mbMessageFinder;
304: }
305:
306: public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
307: this .mbMessageFinder = mbMessageFinder;
308: }
309:
310: public TagsAssetLocalService getTagsAssetLocalService() {
311: return tagsAssetLocalService;
312: }
313:
314: public void setTagsAssetLocalService(
315: TagsAssetLocalService tagsAssetLocalService) {
316: this .tagsAssetLocalService = tagsAssetLocalService;
317: }
318:
319: public TagsAssetService getTagsAssetService() {
320: return tagsAssetService;
321: }
322:
323: public void setTagsAssetService(TagsAssetService tagsAssetService) {
324: this .tagsAssetService = tagsAssetService;
325: }
326:
327: public TagsAssetPersistence getTagsAssetPersistence() {
328: return tagsAssetPersistence;
329: }
330:
331: public void setTagsAssetPersistence(
332: TagsAssetPersistence tagsAssetPersistence) {
333: this .tagsAssetPersistence = tagsAssetPersistence;
334: }
335:
336: public TagsAssetFinder getTagsAssetFinder() {
337: return tagsAssetFinder;
338: }
339:
340: public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
341: this .tagsAssetFinder = tagsAssetFinder;
342: }
343:
344: public void afterPropertiesSet() {
345: if (wikiNodeLocalService == null) {
346: wikiNodeLocalService = WikiNodeLocalServiceFactory
347: .getImpl();
348: }
349:
350: if (wikiNodeService == null) {
351: wikiNodeService = WikiNodeServiceFactory.getImpl();
352: }
353:
354: if (wikiNodePersistence == null) {
355: wikiNodePersistence = WikiNodeUtil.getPersistence();
356: }
357:
358: if (wikiPagePersistence == null) {
359: wikiPagePersistence = WikiPageUtil.getPersistence();
360: }
361:
362: if (wikiPageFinder == null) {
363: wikiPageFinder = WikiPageFinderUtil.getFinder();
364: }
365:
366: if (wikiPageResourceLocalService == null) {
367: wikiPageResourceLocalService = WikiPageResourceLocalServiceFactory
368: .getImpl();
369: }
370:
371: if (wikiPageResourcePersistence == null) {
372: wikiPageResourcePersistence = WikiPageResourceUtil
373: .getPersistence();
374: }
375:
376: if (counterLocalService == null) {
377: counterLocalService = CounterLocalServiceFactory.getImpl();
378: }
379:
380: if (counterService == null) {
381: counterService = CounterServiceFactory.getImpl();
382: }
383:
384: if (resourceLocalService == null) {
385: resourceLocalService = ResourceLocalServiceFactory
386: .getImpl();
387: }
388:
389: if (resourceService == null) {
390: resourceService = ResourceServiceFactory.getImpl();
391: }
392:
393: if (resourcePersistence == null) {
394: resourcePersistence = ResourceUtil.getPersistence();
395: }
396:
397: if (resourceFinder == null) {
398: resourceFinder = ResourceFinderUtil.getFinder();
399: }
400:
401: if (userLocalService == null) {
402: userLocalService = UserLocalServiceFactory.getImpl();
403: }
404:
405: if (userService == null) {
406: userService = UserServiceFactory.getImpl();
407: }
408:
409: if (userPersistence == null) {
410: userPersistence = UserUtil.getPersistence();
411: }
412:
413: if (userFinder == null) {
414: userFinder = UserFinderUtil.getFinder();
415: }
416:
417: if (mbMessageLocalService == null) {
418: mbMessageLocalService = MBMessageLocalServiceFactory
419: .getImpl();
420: }
421:
422: if (mbMessageService == null) {
423: mbMessageService = MBMessageServiceFactory.getImpl();
424: }
425:
426: if (mbMessagePersistence == null) {
427: mbMessagePersistence = MBMessageUtil.getPersistence();
428: }
429:
430: if (mbMessageFinder == null) {
431: mbMessageFinder = MBMessageFinderUtil.getFinder();
432: }
433:
434: if (tagsAssetLocalService == null) {
435: tagsAssetLocalService = TagsAssetLocalServiceFactory
436: .getImpl();
437: }
438:
439: if (tagsAssetService == null) {
440: tagsAssetService = TagsAssetServiceFactory.getImpl();
441: }
442:
443: if (tagsAssetPersistence == null) {
444: tagsAssetPersistence = TagsAssetUtil.getPersistence();
445: }
446:
447: if (tagsAssetFinder == null) {
448: tagsAssetFinder = TagsAssetFinderUtil.getFinder();
449: }
450: }
451:
452: protected WikiNodeLocalService wikiNodeLocalService;
453: protected WikiNodeService wikiNodeService;
454: protected WikiNodePersistence wikiNodePersistence;
455: protected WikiPagePersistence wikiPagePersistence;
456: protected WikiPageFinder wikiPageFinder;
457: protected WikiPageResourceLocalService wikiPageResourceLocalService;
458: protected WikiPageResourcePersistence wikiPageResourcePersistence;
459: protected CounterLocalService counterLocalService;
460: protected CounterService counterService;
461: protected ResourceLocalService resourceLocalService;
462: protected ResourceService resourceService;
463: protected ResourcePersistence resourcePersistence;
464: protected ResourceFinder resourceFinder;
465: protected UserLocalService userLocalService;
466: protected UserService userService;
467: protected UserPersistence userPersistence;
468: protected UserFinder userFinder;
469: protected MBMessageLocalService mbMessageLocalService;
470: protected MBMessageService mbMessageService;
471: protected MBMessagePersistence mbMessagePersistence;
472: protected MBMessageFinder mbMessageFinder;
473: protected TagsAssetLocalService tagsAssetLocalService;
474: protected TagsAssetService tagsAssetService;
475: protected TagsAssetPersistence tagsAssetPersistence;
476: protected TagsAssetFinder tagsAssetFinder;
477: }
|