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.documentlibrary.service.base;
022:
023: import com.liferay.portal.SystemException;
024: import com.liferay.portal.kernel.dao.DynamicQueryInitializer;
025:
026: import com.liferay.portlet.documentlibrary.model.DLFileVersion;
027: import com.liferay.portlet.documentlibrary.model.impl.DLFileVersionImpl;
028: import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService;
029: import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceFactory;
030: import com.liferay.portlet.documentlibrary.service.DLFileEntryService;
031: import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceFactory;
032: import com.liferay.portlet.documentlibrary.service.DLFileRankLocalService;
033: import com.liferay.portlet.documentlibrary.service.DLFileRankLocalServiceFactory;
034: import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService;
035: import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalServiceFactory;
036: import com.liferay.portlet.documentlibrary.service.DLFileShortcutService;
037: import com.liferay.portlet.documentlibrary.service.DLFileShortcutServiceFactory;
038: import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService;
039: import com.liferay.portlet.documentlibrary.service.DLFolderLocalService;
040: import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceFactory;
041: import com.liferay.portlet.documentlibrary.service.DLFolderService;
042: import com.liferay.portlet.documentlibrary.service.DLFolderServiceFactory;
043: import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryAndShortcutFinder;
044: import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryAndShortcutFinderUtil;
045: import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder;
046: import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinderUtil;
047: import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence;
048: import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryUtil;
049: import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinder;
050: import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinderUtil;
051: import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence;
052: import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankUtil;
053: import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutFinder;
054: import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutFinderUtil;
055: import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence;
056: import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutUtil;
057: import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence;
058: import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionUtil;
059: import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
060: import com.liferay.portlet.documentlibrary.service.persistence.DLFolderUtil;
061:
062: import org.springframework.beans.factory.InitializingBean;
063:
064: import java.util.List;
065:
066: /**
067: * <a href="DLFileVersionLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
068: *
069: * @author Brian Wing Shun Chan
070: *
071: */
072: public abstract class DLFileVersionLocalServiceBaseImpl implements
073: DLFileVersionLocalService, InitializingBean {
074: public DLFileVersion addDLFileVersion(DLFileVersion model)
075: throws SystemException {
076: DLFileVersion dlFileVersion = new DLFileVersionImpl();
077:
078: dlFileVersion.setNew(true);
079:
080: dlFileVersion.setFileVersionId(model.getFileVersionId());
081: dlFileVersion.setCompanyId(model.getCompanyId());
082: dlFileVersion.setUserId(model.getUserId());
083: dlFileVersion.setUserName(model.getUserName());
084: dlFileVersion.setCreateDate(model.getCreateDate());
085: dlFileVersion.setFolderId(model.getFolderId());
086: dlFileVersion.setName(model.getName());
087: dlFileVersion.setVersion(model.getVersion());
088: dlFileVersion.setSize(model.getSize());
089:
090: return dlFileVersionPersistence.update(dlFileVersion);
091: }
092:
093: public List dynamicQuery(DynamicQueryInitializer queryInitializer)
094: throws SystemException {
095: return dlFileVersionPersistence
096: .findWithDynamicQuery(queryInitializer);
097: }
098:
099: public List dynamicQuery(DynamicQueryInitializer queryInitializer,
100: int begin, int end) throws SystemException {
101: return dlFileVersionPersistence.findWithDynamicQuery(
102: queryInitializer, begin, end);
103: }
104:
105: public DLFileVersion updateDLFileVersion(DLFileVersion model)
106: throws SystemException {
107: return dlFileVersionPersistence.update(model, true);
108: }
109:
110: public DLFileEntryLocalService getDLFileEntryLocalService() {
111: return dlFileEntryLocalService;
112: }
113:
114: public void setDLFileEntryLocalService(
115: DLFileEntryLocalService dlFileEntryLocalService) {
116: this .dlFileEntryLocalService = dlFileEntryLocalService;
117: }
118:
119: public DLFileEntryService getDLFileEntryService() {
120: return dlFileEntryService;
121: }
122:
123: public void setDLFileEntryService(
124: DLFileEntryService dlFileEntryService) {
125: this .dlFileEntryService = dlFileEntryService;
126: }
127:
128: public DLFileEntryPersistence getDLFileEntryPersistence() {
129: return dlFileEntryPersistence;
130: }
131:
132: public void setDLFileEntryPersistence(
133: DLFileEntryPersistence dlFileEntryPersistence) {
134: this .dlFileEntryPersistence = dlFileEntryPersistence;
135: }
136:
137: public DLFileEntryFinder getDLFileEntryFinder() {
138: return dlFileEntryFinder;
139: }
140:
141: public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
142: this .dlFileEntryFinder = dlFileEntryFinder;
143: }
144:
145: public DLFileEntryAndShortcutFinder getDLFileEntryAndShortcutFinder() {
146: return dlFileEntryAndShortcutFinder;
147: }
148:
149: public void setDLFileEntryAndShortcutFinder(
150: DLFileEntryAndShortcutFinder dlFileEntryAndShortcutFinder) {
151: this .dlFileEntryAndShortcutFinder = dlFileEntryAndShortcutFinder;
152: }
153:
154: public DLFileRankLocalService getDLFileRankLocalService() {
155: return dlFileRankLocalService;
156: }
157:
158: public void setDLFileRankLocalService(
159: DLFileRankLocalService dlFileRankLocalService) {
160: this .dlFileRankLocalService = dlFileRankLocalService;
161: }
162:
163: public DLFileRankPersistence getDLFileRankPersistence() {
164: return dlFileRankPersistence;
165: }
166:
167: public void setDLFileRankPersistence(
168: DLFileRankPersistence dlFileRankPersistence) {
169: this .dlFileRankPersistence = dlFileRankPersistence;
170: }
171:
172: public DLFileRankFinder getDLFileRankFinder() {
173: return dlFileRankFinder;
174: }
175:
176: public void setDLFileRankFinder(DLFileRankFinder dlFileRankFinder) {
177: this .dlFileRankFinder = dlFileRankFinder;
178: }
179:
180: public DLFileShortcutLocalService getDLFileShortcutLocalService() {
181: return dlFileShortcutLocalService;
182: }
183:
184: public void setDLFileShortcutLocalService(
185: DLFileShortcutLocalService dlFileShortcutLocalService) {
186: this .dlFileShortcutLocalService = dlFileShortcutLocalService;
187: }
188:
189: public DLFileShortcutService getDLFileShortcutService() {
190: return dlFileShortcutService;
191: }
192:
193: public void setDLFileShortcutService(
194: DLFileShortcutService dlFileShortcutService) {
195: this .dlFileShortcutService = dlFileShortcutService;
196: }
197:
198: public DLFileShortcutPersistence getDLFileShortcutPersistence() {
199: return dlFileShortcutPersistence;
200: }
201:
202: public void setDLFileShortcutPersistence(
203: DLFileShortcutPersistence dlFileShortcutPersistence) {
204: this .dlFileShortcutPersistence = dlFileShortcutPersistence;
205: }
206:
207: public DLFileShortcutFinder getDLFileShortcutFinder() {
208: return dlFileShortcutFinder;
209: }
210:
211: public void setDLFileShortcutFinder(
212: DLFileShortcutFinder dlFileShortcutFinder) {
213: this .dlFileShortcutFinder = dlFileShortcutFinder;
214: }
215:
216: public DLFileVersionPersistence getDLFileVersionPersistence() {
217: return dlFileVersionPersistence;
218: }
219:
220: public void setDLFileVersionPersistence(
221: DLFileVersionPersistence dlFileVersionPersistence) {
222: this .dlFileVersionPersistence = dlFileVersionPersistence;
223: }
224:
225: public DLFolderLocalService getDLFolderLocalService() {
226: return dlFolderLocalService;
227: }
228:
229: public void setDLFolderLocalService(
230: DLFolderLocalService dlFolderLocalService) {
231: this .dlFolderLocalService = dlFolderLocalService;
232: }
233:
234: public DLFolderService getDLFolderService() {
235: return dlFolderService;
236: }
237:
238: public void setDLFolderService(DLFolderService dlFolderService) {
239: this .dlFolderService = dlFolderService;
240: }
241:
242: public DLFolderPersistence getDLFolderPersistence() {
243: return dlFolderPersistence;
244: }
245:
246: public void setDLFolderPersistence(
247: DLFolderPersistence dlFolderPersistence) {
248: this .dlFolderPersistence = dlFolderPersistence;
249: }
250:
251: public void afterPropertiesSet() {
252: if (dlFileEntryLocalService == null) {
253: dlFileEntryLocalService = DLFileEntryLocalServiceFactory
254: .getImpl();
255: }
256:
257: if (dlFileEntryService == null) {
258: dlFileEntryService = DLFileEntryServiceFactory.getImpl();
259: }
260:
261: if (dlFileEntryPersistence == null) {
262: dlFileEntryPersistence = DLFileEntryUtil.getPersistence();
263: }
264:
265: if (dlFileEntryFinder == null) {
266: dlFileEntryFinder = DLFileEntryFinderUtil.getFinder();
267: }
268:
269: if (dlFileEntryAndShortcutFinder == null) {
270: dlFileEntryAndShortcutFinder = DLFileEntryAndShortcutFinderUtil
271: .getFinder();
272: }
273:
274: if (dlFileRankLocalService == null) {
275: dlFileRankLocalService = DLFileRankLocalServiceFactory
276: .getImpl();
277: }
278:
279: if (dlFileRankPersistence == null) {
280: dlFileRankPersistence = DLFileRankUtil.getPersistence();
281: }
282:
283: if (dlFileRankFinder == null) {
284: dlFileRankFinder = DLFileRankFinderUtil.getFinder();
285: }
286:
287: if (dlFileShortcutLocalService == null) {
288: dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory
289: .getImpl();
290: }
291:
292: if (dlFileShortcutService == null) {
293: dlFileShortcutService = DLFileShortcutServiceFactory
294: .getImpl();
295: }
296:
297: if (dlFileShortcutPersistence == null) {
298: dlFileShortcutPersistence = DLFileShortcutUtil
299: .getPersistence();
300: }
301:
302: if (dlFileShortcutFinder == null) {
303: dlFileShortcutFinder = DLFileShortcutFinderUtil.getFinder();
304: }
305:
306: if (dlFileVersionPersistence == null) {
307: dlFileVersionPersistence = DLFileVersionUtil
308: .getPersistence();
309: }
310:
311: if (dlFolderLocalService == null) {
312: dlFolderLocalService = DLFolderLocalServiceFactory
313: .getImpl();
314: }
315:
316: if (dlFolderService == null) {
317: dlFolderService = DLFolderServiceFactory.getImpl();
318: }
319:
320: if (dlFolderPersistence == null) {
321: dlFolderPersistence = DLFolderUtil.getPersistence();
322: }
323: }
324:
325: protected DLFileEntryLocalService dlFileEntryLocalService;
326: protected DLFileEntryService dlFileEntryService;
327: protected DLFileEntryPersistence dlFileEntryPersistence;
328: protected DLFileEntryFinder dlFileEntryFinder;
329: protected DLFileEntryAndShortcutFinder dlFileEntryAndShortcutFinder;
330: protected DLFileRankLocalService dlFileRankLocalService;
331: protected DLFileRankPersistence dlFileRankPersistence;
332: protected DLFileRankFinder dlFileRankFinder;
333: protected DLFileShortcutLocalService dlFileShortcutLocalService;
334: protected DLFileShortcutService dlFileShortcutService;
335: protected DLFileShortcutPersistence dlFileShortcutPersistence;
336: protected DLFileShortcutFinder dlFileShortcutFinder;
337: protected DLFileVersionPersistence dlFileVersionPersistence;
338: protected DLFolderLocalService dlFolderLocalService;
339: protected DLFolderService dlFolderService;
340: protected DLFolderPersistence dlFolderPersistence;
341: }
|