1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.documentlibrary.service.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterLocalServiceFactory;
27  import com.liferay.counter.service.CounterService;
28  import com.liferay.counter.service.CounterServiceFactory;
29  
30  import com.liferay.portal.PortalException;
31  import com.liferay.portal.SystemException;
32  import com.liferay.portal.kernel.bean.InitializingBean;
33  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
34  import com.liferay.portal.service.LayoutLocalService;
35  import com.liferay.portal.service.LayoutLocalServiceFactory;
36  import com.liferay.portal.service.LayoutService;
37  import com.liferay.portal.service.LayoutServiceFactory;
38  import com.liferay.portal.service.persistence.LayoutFinder;
39  import com.liferay.portal.service.persistence.LayoutFinderUtil;
40  import com.liferay.portal.service.persistence.LayoutPersistence;
41  import com.liferay.portal.service.persistence.LayoutUtil;
42  
43  import com.liferay.portlet.documentlibrary.model.DLFileRank;
44  import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService;
45  import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceFactory;
46  import com.liferay.portlet.documentlibrary.service.DLFileEntryService;
47  import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceFactory;
48  import com.liferay.portlet.documentlibrary.service.DLFileRankLocalService;
49  import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService;
50  import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalServiceFactory;
51  import com.liferay.portlet.documentlibrary.service.DLFileShortcutService;
52  import com.liferay.portlet.documentlibrary.service.DLFileShortcutServiceFactory;
53  import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService;
54  import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalServiceFactory;
55  import com.liferay.portlet.documentlibrary.service.DLFolderLocalService;
56  import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceFactory;
57  import com.liferay.portlet.documentlibrary.service.DLFolderService;
58  import com.liferay.portlet.documentlibrary.service.DLFolderServiceFactory;
59  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryAndShortcutFinder;
60  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryAndShortcutFinderUtil;
61  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder;
62  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinderUtil;
63  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence;
64  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryUtil;
65  import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinder;
66  import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinderUtil;
67  import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence;
68  import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankUtil;
69  import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutFinder;
70  import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutFinderUtil;
71  import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence;
72  import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutUtil;
73  import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence;
74  import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionUtil;
75  import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
76  import com.liferay.portlet.documentlibrary.service.persistence.DLFolderUtil;
77  
78  import java.util.List;
79  
80  /**
81   * <a href="DLFileRankLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
82   *
83   * @author Brian Wing Shun Chan
84   *
85   */
86  public abstract class DLFileRankLocalServiceBaseImpl
87      implements DLFileRankLocalService, InitializingBean {
88      public DLFileRank addDLFileRank(DLFileRank dlFileRank)
89          throws SystemException {
90          dlFileRank.setNew(true);
91  
92          return dlFileRankPersistence.update(dlFileRank, false);
93      }
94  
95      public void deleteDLFileRank(long fileRankId)
96          throws PortalException, SystemException {
97          dlFileRankPersistence.remove(fileRankId);
98      }
99  
100     public void deleteDLFileRank(DLFileRank dlFileRank)
101         throws SystemException {
102         dlFileRankPersistence.remove(dlFileRank);
103     }
104 
105     public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
106         throws SystemException {
107         return dlFileRankPersistence.findWithDynamicQuery(dynamicQuery);
108     }
109 
110     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
111         int end) throws SystemException {
112         return dlFileRankPersistence.findWithDynamicQuery(dynamicQuery, start,
113             end);
114     }
115 
116     public DLFileRank getDLFileRank(long fileRankId)
117         throws PortalException, SystemException {
118         return dlFileRankPersistence.findByPrimaryKey(fileRankId);
119     }
120 
121     public DLFileRank updateDLFileRank(DLFileRank dlFileRank)
122         throws SystemException {
123         dlFileRank.setNew(false);
124 
125         return dlFileRankPersistence.update(dlFileRank, true);
126     }
127 
128     public DLFileEntryLocalService getDLFileEntryLocalService() {
129         return dlFileEntryLocalService;
130     }
131 
132     public void setDLFileEntryLocalService(
133         DLFileEntryLocalService dlFileEntryLocalService) {
134         this.dlFileEntryLocalService = dlFileEntryLocalService;
135     }
136 
137     public DLFileEntryService getDLFileEntryService() {
138         return dlFileEntryService;
139     }
140 
141     public void setDLFileEntryService(DLFileEntryService dlFileEntryService) {
142         this.dlFileEntryService = dlFileEntryService;
143     }
144 
145     public DLFileEntryPersistence getDLFileEntryPersistence() {
146         return dlFileEntryPersistence;
147     }
148 
149     public void setDLFileEntryPersistence(
150         DLFileEntryPersistence dlFileEntryPersistence) {
151         this.dlFileEntryPersistence = dlFileEntryPersistence;
152     }
153 
154     public DLFileEntryFinder getDLFileEntryFinder() {
155         return dlFileEntryFinder;
156     }
157 
158     public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
159         this.dlFileEntryFinder = dlFileEntryFinder;
160     }
161 
162     public DLFileEntryAndShortcutFinder getDLFileEntryAndShortcutFinder() {
163         return dlFileEntryAndShortcutFinder;
164     }
165 
166     public void setDLFileEntryAndShortcutFinder(
167         DLFileEntryAndShortcutFinder dlFileEntryAndShortcutFinder) {
168         this.dlFileEntryAndShortcutFinder = dlFileEntryAndShortcutFinder;
169     }
170 
171     public DLFileRankPersistence getDLFileRankPersistence() {
172         return dlFileRankPersistence;
173     }
174 
175     public void setDLFileRankPersistence(
176         DLFileRankPersistence dlFileRankPersistence) {
177         this.dlFileRankPersistence = dlFileRankPersistence;
178     }
179 
180     public DLFileRankFinder getDLFileRankFinder() {
181         return dlFileRankFinder;
182     }
183 
184     public void setDLFileRankFinder(DLFileRankFinder dlFileRankFinder) {
185         this.dlFileRankFinder = dlFileRankFinder;
186     }
187 
188     public DLFileShortcutLocalService getDLFileShortcutLocalService() {
189         return dlFileShortcutLocalService;
190     }
191 
192     public void setDLFileShortcutLocalService(
193         DLFileShortcutLocalService dlFileShortcutLocalService) {
194         this.dlFileShortcutLocalService = dlFileShortcutLocalService;
195     }
196 
197     public DLFileShortcutService getDLFileShortcutService() {
198         return dlFileShortcutService;
199     }
200 
201     public void setDLFileShortcutService(
202         DLFileShortcutService dlFileShortcutService) {
203         this.dlFileShortcutService = dlFileShortcutService;
204     }
205 
206     public DLFileShortcutPersistence getDLFileShortcutPersistence() {
207         return dlFileShortcutPersistence;
208     }
209 
210     public void setDLFileShortcutPersistence(
211         DLFileShortcutPersistence dlFileShortcutPersistence) {
212         this.dlFileShortcutPersistence = dlFileShortcutPersistence;
213     }
214 
215     public DLFileShortcutFinder getDLFileShortcutFinder() {
216         return dlFileShortcutFinder;
217     }
218 
219     public void setDLFileShortcutFinder(
220         DLFileShortcutFinder dlFileShortcutFinder) {
221         this.dlFileShortcutFinder = dlFileShortcutFinder;
222     }
223 
224     public DLFileVersionLocalService getDLFileVersionLocalService() {
225         return dlFileVersionLocalService;
226     }
227 
228     public void setDLFileVersionLocalService(
229         DLFileVersionLocalService dlFileVersionLocalService) {
230         this.dlFileVersionLocalService = dlFileVersionLocalService;
231     }
232 
233     public DLFileVersionPersistence getDLFileVersionPersistence() {
234         return dlFileVersionPersistence;
235     }
236 
237     public void setDLFileVersionPersistence(
238         DLFileVersionPersistence dlFileVersionPersistence) {
239         this.dlFileVersionPersistence = dlFileVersionPersistence;
240     }
241 
242     public DLFolderLocalService getDLFolderLocalService() {
243         return dlFolderLocalService;
244     }
245 
246     public void setDLFolderLocalService(
247         DLFolderLocalService dlFolderLocalService) {
248         this.dlFolderLocalService = dlFolderLocalService;
249     }
250 
251     public DLFolderService getDLFolderService() {
252         return dlFolderService;
253     }
254 
255     public void setDLFolderService(DLFolderService dlFolderService) {
256         this.dlFolderService = dlFolderService;
257     }
258 
259     public DLFolderPersistence getDLFolderPersistence() {
260         return dlFolderPersistence;
261     }
262 
263     public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
264         this.dlFolderPersistence = dlFolderPersistence;
265     }
266 
267     public CounterLocalService getCounterLocalService() {
268         return counterLocalService;
269     }
270 
271     public void setCounterLocalService(CounterLocalService counterLocalService) {
272         this.counterLocalService = counterLocalService;
273     }
274 
275     public CounterService getCounterService() {
276         return counterService;
277     }
278 
279     public void setCounterService(CounterService counterService) {
280         this.counterService = counterService;
281     }
282 
283     public LayoutLocalService getLayoutLocalService() {
284         return layoutLocalService;
285     }
286 
287     public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
288         this.layoutLocalService = layoutLocalService;
289     }
290 
291     public LayoutService getLayoutService() {
292         return layoutService;
293     }
294 
295     public void setLayoutService(LayoutService layoutService) {
296         this.layoutService = layoutService;
297     }
298 
299     public LayoutPersistence getLayoutPersistence() {
300         return layoutPersistence;
301     }
302 
303     public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
304         this.layoutPersistence = layoutPersistence;
305     }
306 
307     public LayoutFinder getLayoutFinder() {
308         return layoutFinder;
309     }
310 
311     public void setLayoutFinder(LayoutFinder layoutFinder) {
312         this.layoutFinder = layoutFinder;
313     }
314 
315     public void afterPropertiesSet() {
316         if (dlFileEntryLocalService == null) {
317             dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getImpl();
318         }
319 
320         if (dlFileEntryService == null) {
321             dlFileEntryService = DLFileEntryServiceFactory.getImpl();
322         }
323 
324         if (dlFileEntryPersistence == null) {
325             dlFileEntryPersistence = DLFileEntryUtil.getPersistence();
326         }
327 
328         if (dlFileEntryFinder == null) {
329             dlFileEntryFinder = DLFileEntryFinderUtil.getFinder();
330         }
331 
332         if (dlFileEntryAndShortcutFinder == null) {
333             dlFileEntryAndShortcutFinder = DLFileEntryAndShortcutFinderUtil.getFinder();
334         }
335 
336         if (dlFileRankPersistence == null) {
337             dlFileRankPersistence = DLFileRankUtil.getPersistence();
338         }
339 
340         if (dlFileRankFinder == null) {
341             dlFileRankFinder = DLFileRankFinderUtil.getFinder();
342         }
343 
344         if (dlFileShortcutLocalService == null) {
345             dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getImpl();
346         }
347 
348         if (dlFileShortcutService == null) {
349             dlFileShortcutService = DLFileShortcutServiceFactory.getImpl();
350         }
351 
352         if (dlFileShortcutPersistence == null) {
353             dlFileShortcutPersistence = DLFileShortcutUtil.getPersistence();
354         }
355 
356         if (dlFileShortcutFinder == null) {
357             dlFileShortcutFinder = DLFileShortcutFinderUtil.getFinder();
358         }
359 
360         if (dlFileVersionLocalService == null) {
361             dlFileVersionLocalService = DLFileVersionLocalServiceFactory.getImpl();
362         }
363 
364         if (dlFileVersionPersistence == null) {
365             dlFileVersionPersistence = DLFileVersionUtil.getPersistence();
366         }
367 
368         if (dlFolderLocalService == null) {
369             dlFolderLocalService = DLFolderLocalServiceFactory.getImpl();
370         }
371 
372         if (dlFolderService == null) {
373             dlFolderService = DLFolderServiceFactory.getImpl();
374         }
375 
376         if (dlFolderPersistence == null) {
377             dlFolderPersistence = DLFolderUtil.getPersistence();
378         }
379 
380         if (counterLocalService == null) {
381             counterLocalService = CounterLocalServiceFactory.getImpl();
382         }
383 
384         if (counterService == null) {
385             counterService = CounterServiceFactory.getImpl();
386         }
387 
388         if (layoutLocalService == null) {
389             layoutLocalService = LayoutLocalServiceFactory.getImpl();
390         }
391 
392         if (layoutService == null) {
393             layoutService = LayoutServiceFactory.getImpl();
394         }
395 
396         if (layoutPersistence == null) {
397             layoutPersistence = LayoutUtil.getPersistence();
398         }
399 
400         if (layoutFinder == null) {
401             layoutFinder = LayoutFinderUtil.getFinder();
402         }
403     }
404 
405     protected DLFileEntryLocalService dlFileEntryLocalService;
406     protected DLFileEntryService dlFileEntryService;
407     protected DLFileEntryPersistence dlFileEntryPersistence;
408     protected DLFileEntryFinder dlFileEntryFinder;
409     protected DLFileEntryAndShortcutFinder dlFileEntryAndShortcutFinder;
410     protected DLFileRankPersistence dlFileRankPersistence;
411     protected DLFileRankFinder dlFileRankFinder;
412     protected DLFileShortcutLocalService dlFileShortcutLocalService;
413     protected DLFileShortcutService dlFileShortcutService;
414     protected DLFileShortcutPersistence dlFileShortcutPersistence;
415     protected DLFileShortcutFinder dlFileShortcutFinder;
416     protected DLFileVersionLocalService dlFileVersionLocalService;
417     protected DLFileVersionPersistence dlFileVersionPersistence;
418     protected DLFolderLocalService dlFolderLocalService;
419     protected DLFolderService dlFolderService;
420     protected DLFolderPersistence dlFolderPersistence;
421     protected CounterLocalService counterLocalService;
422     protected CounterService counterService;
423     protected LayoutLocalService layoutLocalService;
424     protected LayoutService layoutService;
425     protected LayoutPersistence layoutPersistence;
426     protected LayoutFinder layoutFinder;
427 }