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:
031: import com.liferay.portlet.wiki.model.WikiPageResource;
032: import com.liferay.portlet.wiki.model.impl.WikiPageResourceImpl;
033: import com.liferay.portlet.wiki.service.WikiNodeLocalService;
034: import com.liferay.portlet.wiki.service.WikiNodeLocalServiceFactory;
035: import com.liferay.portlet.wiki.service.WikiNodeService;
036: import com.liferay.portlet.wiki.service.WikiNodeServiceFactory;
037: import com.liferay.portlet.wiki.service.WikiPageLocalService;
038: import com.liferay.portlet.wiki.service.WikiPageLocalServiceFactory;
039: import com.liferay.portlet.wiki.service.WikiPageResourceLocalService;
040: import com.liferay.portlet.wiki.service.WikiPageService;
041: import com.liferay.portlet.wiki.service.WikiPageServiceFactory;
042: import com.liferay.portlet.wiki.service.persistence.WikiNodePersistence;
043: import com.liferay.portlet.wiki.service.persistence.WikiNodeUtil;
044: import com.liferay.portlet.wiki.service.persistence.WikiPageFinder;
045: import com.liferay.portlet.wiki.service.persistence.WikiPageFinderUtil;
046: import com.liferay.portlet.wiki.service.persistence.WikiPagePersistence;
047: import com.liferay.portlet.wiki.service.persistence.WikiPageResourcePersistence;
048: import com.liferay.portlet.wiki.service.persistence.WikiPageResourceUtil;
049: import com.liferay.portlet.wiki.service.persistence.WikiPageUtil;
050:
051: import org.springframework.beans.factory.InitializingBean;
052:
053: import java.util.List;
054:
055: /**
056: * <a href="WikiPageResourceLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
057: *
058: * @author Brian Wing Shun Chan
059: *
060: */
061: public abstract class WikiPageResourceLocalServiceBaseImpl implements
062: WikiPageResourceLocalService, InitializingBean {
063: public WikiPageResource addWikiPageResource(WikiPageResource model)
064: throws SystemException {
065: WikiPageResource wikiPageResource = new WikiPageResourceImpl();
066:
067: wikiPageResource.setNew(true);
068:
069: wikiPageResource.setResourcePrimKey(model.getResourcePrimKey());
070: wikiPageResource.setNodeId(model.getNodeId());
071: wikiPageResource.setTitle(model.getTitle());
072:
073: return wikiPageResourcePersistence.update(wikiPageResource);
074: }
075:
076: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
077: throws SystemException {
078: return wikiPageResourcePersistence
079: .findWithDynamicQuery(queryInitializer);
080: }
081:
082: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
083: int begin, int end) throws SystemException {
084: return wikiPageResourcePersistence.findWithDynamicQuery(
085: queryInitializer, begin, end);
086: }
087:
088: public WikiPageResource updateWikiPageResource(
089: WikiPageResource model) throws SystemException {
090: return wikiPageResourcePersistence.update(model, true);
091: }
092:
093: public WikiNodeLocalService getWikiNodeLocalService() {
094: return wikiNodeLocalService;
095: }
096:
097: public void setWikiNodeLocalService(
098: WikiNodeLocalService wikiNodeLocalService) {
099: this .wikiNodeLocalService = wikiNodeLocalService;
100: }
101:
102: public WikiNodeService getWikiNodeService() {
103: return wikiNodeService;
104: }
105:
106: public void setWikiNodeService(WikiNodeService wikiNodeService) {
107: this .wikiNodeService = wikiNodeService;
108: }
109:
110: public WikiNodePersistence getWikiNodePersistence() {
111: return wikiNodePersistence;
112: }
113:
114: public void setWikiNodePersistence(
115: WikiNodePersistence wikiNodePersistence) {
116: this .wikiNodePersistence = wikiNodePersistence;
117: }
118:
119: public WikiPageLocalService getWikiPageLocalService() {
120: return wikiPageLocalService;
121: }
122:
123: public void setWikiPageLocalService(
124: WikiPageLocalService wikiPageLocalService) {
125: this .wikiPageLocalService = wikiPageLocalService;
126: }
127:
128: public WikiPageService getWikiPageService() {
129: return wikiPageService;
130: }
131:
132: public void setWikiPageService(WikiPageService wikiPageService) {
133: this .wikiPageService = wikiPageService;
134: }
135:
136: public WikiPagePersistence getWikiPagePersistence() {
137: return wikiPagePersistence;
138: }
139:
140: public void setWikiPagePersistence(
141: WikiPagePersistence wikiPagePersistence) {
142: this .wikiPagePersistence = wikiPagePersistence;
143: }
144:
145: public WikiPageFinder getWikiPageFinder() {
146: return wikiPageFinder;
147: }
148:
149: public void setWikiPageFinder(WikiPageFinder wikiPageFinder) {
150: this .wikiPageFinder = wikiPageFinder;
151: }
152:
153: public WikiPageResourcePersistence getWikiPageResourcePersistence() {
154: return wikiPageResourcePersistence;
155: }
156:
157: public void setWikiPageResourcePersistence(
158: WikiPageResourcePersistence wikiPageResourcePersistence) {
159: this .wikiPageResourcePersistence = wikiPageResourcePersistence;
160: }
161:
162: public CounterLocalService getCounterLocalService() {
163: return counterLocalService;
164: }
165:
166: public void setCounterLocalService(
167: CounterLocalService counterLocalService) {
168: this .counterLocalService = counterLocalService;
169: }
170:
171: public CounterService getCounterService() {
172: return counterService;
173: }
174:
175: public void setCounterService(CounterService counterService) {
176: this .counterService = counterService;
177: }
178:
179: public void afterPropertiesSet() {
180: if (wikiNodeLocalService == null) {
181: wikiNodeLocalService = WikiNodeLocalServiceFactory
182: .getImpl();
183: }
184:
185: if (wikiNodeService == null) {
186: wikiNodeService = WikiNodeServiceFactory.getImpl();
187: }
188:
189: if (wikiNodePersistence == null) {
190: wikiNodePersistence = WikiNodeUtil.getPersistence();
191: }
192:
193: if (wikiPageLocalService == null) {
194: wikiPageLocalService = WikiPageLocalServiceFactory
195: .getImpl();
196: }
197:
198: if (wikiPageService == null) {
199: wikiPageService = WikiPageServiceFactory.getImpl();
200: }
201:
202: if (wikiPagePersistence == null) {
203: wikiPagePersistence = WikiPageUtil.getPersistence();
204: }
205:
206: if (wikiPageFinder == null) {
207: wikiPageFinder = WikiPageFinderUtil.getFinder();
208: }
209:
210: if (wikiPageResourcePersistence == null) {
211: wikiPageResourcePersistence = WikiPageResourceUtil
212: .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 WikiNodeLocalService wikiNodeLocalService;
225: protected WikiNodeService wikiNodeService;
226: protected WikiNodePersistence wikiNodePersistence;
227: protected WikiPageLocalService wikiPageLocalService;
228: protected WikiPageService wikiPageService;
229: protected WikiPagePersistence wikiPagePersistence;
230: protected WikiPageFinder wikiPageFinder;
231: protected WikiPageResourcePersistence wikiPageResourcePersistence;
232: protected CounterLocalService counterLocalService;
233: protected CounterService counterService;
234: }
|