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.dao.DynamicQueryInitializer;
33  import com.liferay.portal.service.LayoutLocalService;
34  import com.liferay.portal.service.LayoutLocalServiceFactory;
35  import com.liferay.portal.service.LayoutService;
36  import com.liferay.portal.service.LayoutServiceFactory;
37  import com.liferay.portal.service.persistence.LayoutFinder;
38  import com.liferay.portal.service.persistence.LayoutFinderUtil;
39  import com.liferay.portal.service.persistence.LayoutPersistence;
40  import com.liferay.portal.service.persistence.LayoutUtil;
41  
42  import com.liferay.portlet.documentlibrary.model.DLFileRank;
43  import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService;
44  import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceFactory;
45  import com.liferay.portlet.documentlibrary.service.DLFileEntryService;
46  import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceFactory;
47  import com.liferay.portlet.documentlibrary.service.DLFileRankLocalService;
48  import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService;
49  import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalServiceFactory;
50  import com.liferay.portlet.documentlibrary.service.DLFileShortcutService;
51  import com.liferay.portlet.documentlibrary.service.DLFileShortcutServiceFactory;
52  import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService;
53  import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalServiceFactory;
54  import com.liferay.portlet.documentlibrary.service.DLFolderLocalService;
55  import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceFactory;
56  import com.liferay.portlet.documentlibrary.service.DLFolderService;
57  import com.liferay.portlet.documentlibrary.service.DLFolderServiceFactory;
58  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryAndShortcutFinder;
59  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryAndShortcutFinderUtil;
60  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder;
61  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinderUtil;
62  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence;
63  import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryUtil;
64  import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinder;
65  import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinderUtil;
66  import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence;
67  import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankUtil;
68  import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutFinder;
69  import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutFinderUtil;
70  import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence;
71  import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutUtil;
72  import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence;
73  import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionUtil;
74  import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
75  import com.liferay.portlet.documentlibrary.service.persistence.DLFolderUtil;
76  
77  import org.springframework.beans.factory.InitializingBean;
78  
79  import java.util.List;
80  
81  /**
82   * <a href="DLFileRankLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
83   *
84   * @author Brian Wing Shun Chan
85   *
86   */
87  public abstract class DLFileRankLocalServiceBaseImpl
88      implements DLFileRankLocalService, InitializingBean {
89      public DLFileRank addDLFileRank(DLFileRank dlFileRank)
90          throws SystemException {
91          dlFileRank.setNew(true);
92  
93          return dlFileRankPersistence.update(dlFileRank, false);
94      }
95  
96      public void deleteDLFileRank(long fileRankId)
97          throws PortalException, SystemException {
98          dlFileRankPersistence.remove(fileRankId);
99      }
100 
101     public void deleteDLFileRank(DLFileRank dlFileRank)
102         throws PortalException, SystemException {
103         dlFileRankPersistence.remove(dlFileRank);
104     }
105 
106     public List<DLFileRank> dynamicQuery(
107         DynamicQueryInitializer queryInitializer) throws SystemException {
108         return dlFileRankPersistence.findWithDynamicQuery(queryInitializer);
109     }
110 
111     public List<DLFileRank> dynamicQuery(
112         DynamicQueryInitializer queryInitializer, int begin, int end)
113         throws SystemException {
114         return dlFileRankPersistence.findWithDynamicQuery(queryInitializer,
115             begin, end);
116     }
117 
118     public DLFileRank updateDLFileRank(DLFileRank dlFileRank)
119         throws SystemException {
120         dlFileRank.setNew(false);
121 
122         return dlFileRankPersistence.update(dlFileRank, true);
123     }
124 
125     public DLFileEntryLocalService getDLFileEntryLocalService() {
126         return dlFileEntryLocalService;
127     }
128 
129     public void setDLFileEntryLocalService(
130         DLFileEntryLocalService dlFileEntryLocalService) {
131         this.dlFileEntryLocalService = dlFileEntryLocalService;
132     }
133 
134     public DLFileEntryService getDLFileEntryService() {
135         return dlFileEntryService;
136     }
137 
138     public void setDLFileEntryService(DLFileEntryService dlFileEntryService) {
139         this.dlFileEntryService = dlFileEntryService;
140     }
141 
142     public DLFileEntryPersistence getDLFileEntryPersistence() {
143         return dlFileEntryPersistence;
144     }
145 
146     public void setDLFileEntryPersistence(
147         DLFileEntryPersistence dlFileEntryPersistence) {
148         this.dlFileEntryPersistence = dlFileEntryPersistence;
149     }
150 
151     public DLFileEntryFinder getDLFileEntryFinder() {
152         return dlFileEntryFinder;
153     }
154 
155     public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
156         this.dlFileEntryFinder = dlFileEntryFinder;
157     }
158 
159     public DLFileEntryAndShortcutFinder getDLFileEntryAndShortcutFinder() {
160         return dlFileEntryAndShortcutFinder;
161     }
162 
163     public void setDLFileEntryAndShortcutFinder(
164         DLFileEntryAndShortcutFinder dlFileEntryAndShortcutFinder) {
165         this.dlFileEntryAndShortcutFinder = dlFileEntryAndShortcutFinder;
166     }
167 
168     public DLFileRankPersistence getDLFileRankPersistence() {
169         return dlFileRankPersistence;
170     }
171 
172     public void setDLFileRankPersistence(
173         DLFileRankPersistence dlFileRankPersistence) {
174         this.dlFileRankPersistence = dlFileRankPersistence;
175     }
176 
177     public DLFileRankFinder getDLFileRankFinder() {
178         return dlFileRankFinder;
179     }
180 
181     public void setDLFileRankFinder(DLFileRankFinder dlFileRankFinder) {
182         this.dlFileRankFinder = dlFileRankFinder;
183     }
184 
185     public DLFileShortcutLocalService getDLFileShortcutLocalService() {
186         return dlFileShortcutLocalService;
187     }
188 
189     public void setDLFileShortcutLocalService(
190         DLFileShortcutLocalService dlFileShortcutLocalService) {
191         this.dlFileShortcutLocalService = dlFileShortcutLocalService;
192     }
193 
194     public DLFileShortcutService getDLFileShortcutService() {
195         return dlFileShortcutService;
196     }
197 
198     public void setDLFileShortcutService(
199         DLFileShortcutService dlFileShortcutService) {
200         this.dlFileShortcutService = dlFileShortcutService;
201     }
202 
203     public DLFileShortcutPersistence getDLFileShortcutPersistence() {
204         return dlFileShortcutPersistence;
205     }
206 
207     public void setDLFileShortcutPersistence(
208         DLFileShortcutPersistence dlFileShortcutPersistence) {
209         this.dlFileShortcutPersistence = dlFileShortcutPersistence;
210     }
211 
212     public DLFileShortcutFinder getDLFileShortcutFinder() {
213         return dlFileShortcutFinder;
214     }
215 
216     public void setDLFileShortcutFinder(
217         DLFileShortcutFinder dlFileShortcutFinder) {
218         this.dlFileShortcutFinder = dlFileShortcutFinder;
219     }
220 
221     public DLFileVersionLocalService getDLFileVersionLocalService() {
222         return dlFileVersionLocalService;
223     }
224 
225     public void setDLFileVersionLocalService(
226         DLFileVersionLocalService dlFileVersionLocalService) {
227         this.dlFileVersionLocalService = dlFileVersionLocalService;
228     }
229 
230     public DLFileVersionPersistence getDLFileVersionPersistence() {
231         return dlFileVersionPersistence;
232     }
233 
234     public void setDLFileVersionPersistence(
235         DLFileVersionPersistence dlFileVersionPersistence) {
236         this.dlFileVersionPersistence = dlFileVersionPersistence;
237     }
238 
239     public DLFolderLocalService getDLFolderLocalService() {
240         return dlFolderLocalService;
241     }
242 
243     public void setDLFolderLocalService(
244         DLFolderLocalService dlFolderLocalService) {
245         this.dlFolderLocalService = dlFolderLocalService;
246     }
247 
248     public DLFolderService getDLFolderService() {
249         return dlFolderService;
250     }
251 
252     public void setDLFolderService(DLFolderService dlFolderService) {
253         this.dlFolderService = dlFolderService;
254     }
255 
256     public DLFolderPersistence getDLFolderPersistence() {
257         return dlFolderPersistence;
258     }
259 
260     public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
261         this.dlFolderPersistence = dlFolderPersistence;
262     }
263 
264     public CounterLocalService getCounterLocalService() {
265         return counterLocalService;
266     }
267 
268     public void setCounterLocalService(CounterLocalService counterLocalService) {
269         this.counterLocalService = counterLocalService;
270     }
271 
272     public CounterService getCounterService() {
273         return counterService;
274     }
275 
276     public void setCounterService(CounterService counterService) {
277         this.counterService = counterService;
278     }
279 
280     public LayoutLocalService getLayoutLocalService() {
281         return layoutLocalService;
282     }
283 
284     public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
285         this.layoutLocalService = layoutLocalService;
286     }
287 
288     public LayoutService getLayoutService() {
289         return layoutService;
290     }
291 
292     public void setLayoutService(LayoutService layoutService) {
293         this.layoutService = layoutService;
294     }
295 
296     public LayoutPersistence getLayoutPersistence() {
297         return layoutPersistence;
298     }
299 
300     public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
301         this.layoutPersistence = layoutPersistence;
302     }
303 
304     public LayoutFinder getLayoutFinder() {
305         return layoutFinder;
306     }
307 
308     public void setLayoutFinder(LayoutFinder layoutFinder) {
309         this.layoutFinder = layoutFinder;
310     }
311 
312     public void afterPropertiesSet() {
313         if (dlFileEntryLocalService == null) {
314             dlFileEntryLocalService = DLFileEntryLocalServiceFactory.getImpl();
315         }
316 
317         if (dlFileEntryService == null) {
318             dlFileEntryService = DLFileEntryServiceFactory.getImpl();
319         }
320 
321         if (dlFileEntryPersistence == null) {
322             dlFileEntryPersistence = DLFileEntryUtil.getPersistence();
323         }
324 
325         if (dlFileEntryFinder == null) {
326             dlFileEntryFinder = DLFileEntryFinderUtil.getFinder();
327         }
328 
329         if (dlFileEntryAndShortcutFinder == null) {
330             dlFileEntryAndShortcutFinder = DLFileEntryAndShortcutFinderUtil.getFinder();
331         }
332 
333         if (dlFileRankPersistence == null) {
334             dlFileRankPersistence = DLFileRankUtil.getPersistence();
335         }
336 
337         if (dlFileRankFinder == null) {
338             dlFileRankFinder = DLFileRankFinderUtil.getFinder();
339         }
340 
341         if (dlFileShortcutLocalService == null) {
342             dlFileShortcutLocalService = DLFileShortcutLocalServiceFactory.getImpl();
343         }
344 
345         if (dlFileShortcutService == null) {
346             dlFileShortcutService = DLFileShortcutServiceFactory.getImpl();
347         }
348 
349         if (dlFileShortcutPersistence == null) {
350             dlFileShortcutPersistence = DLFileShortcutUtil.getPersistence();
351         }
352 
353         if (dlFileShortcutFinder == null) {
354             dlFileShortcutFinder = DLFileShortcutFinderUtil.getFinder();
355         }
356 
357         if (dlFileVersionLocalService == null) {
358             dlFileVersionLocalService = DLFileVersionLocalServiceFactory.getImpl();
359         }
360 
361         if (dlFileVersionPersistence == null) {
362             dlFileVersionPersistence = DLFileVersionUtil.getPersistence();
363         }
364 
365         if (dlFolderLocalService == null) {
366             dlFolderLocalService = DLFolderLocalServiceFactory.getImpl();
367         }
368 
369         if (dlFolderService == null) {
370             dlFolderService = DLFolderServiceFactory.getImpl();
371         }
372 
373         if (dlFolderPersistence == null) {
374             dlFolderPersistence = DLFolderUtil.getPersistence();
375         }
376 
377         if (counterLocalService == null) {
378             counterLocalService = CounterLocalServiceFactory.getImpl();
379         }
380 
381         if (counterService == null) {
382             counterService = CounterServiceFactory.getImpl();
383         }
384 
385         if (layoutLocalService == null) {
386             layoutLocalService = LayoutLocalServiceFactory.getImpl();
387         }
388 
389         if (layoutService == null) {
390             layoutService = LayoutServiceFactory.getImpl();
391         }
392 
393         if (layoutPersistence == null) {
394             layoutPersistence = LayoutUtil.getPersistence();
395         }
396 
397         if (layoutFinder == null) {
398             layoutFinder = LayoutFinderUtil.getFinder();
399         }
400     }
401 
402     protected DLFileEntryLocalService dlFileEntryLocalService;
403     protected DLFileEntryService dlFileEntryService;
404     protected DLFileEntryPersistence dlFileEntryPersistence;
405     protected DLFileEntryFinder dlFileEntryFinder;
406     protected DLFileEntryAndShortcutFinder dlFileEntryAndShortcutFinder;
407     protected DLFileRankPersistence dlFileRankPersistence;
408     protected DLFileRankFinder dlFileRankFinder;
409     protected DLFileShortcutLocalService dlFileShortcutLocalService;
410     protected DLFileShortcutService dlFileShortcutService;
411     protected DLFileShortcutPersistence dlFileShortcutPersistence;
412     protected DLFileShortcutFinder dlFileShortcutFinder;
413     protected DLFileVersionLocalService dlFileVersionLocalService;
414     protected DLFileVersionPersistence dlFileVersionPersistence;
415     protected DLFolderLocalService dlFolderLocalService;
416     protected DLFolderService dlFolderService;
417     protected DLFolderPersistence dlFolderPersistence;
418     protected CounterLocalService counterLocalService;
419     protected CounterService counterService;
420     protected LayoutLocalService layoutLocalService;
421     protected LayoutService layoutService;
422     protected LayoutPersistence layoutPersistence;
423     protected LayoutFinder layoutFinder;
424 }