1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.imagegallery.service.base;
16  
17  import com.liferay.counter.service.CounterLocalService;
18  import com.liferay.counter.service.CounterService;
19  
20  import com.liferay.portal.PortalException;
21  import com.liferay.portal.SystemException;
22  import com.liferay.portal.kernel.annotation.BeanReference;
23  import com.liferay.portal.kernel.dao.db.DB;
24  import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
25  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
26  import com.liferay.portal.kernel.util.OrderByComparator;
27  import com.liferay.portal.service.GroupLocalService;
28  import com.liferay.portal.service.GroupService;
29  import com.liferay.portal.service.ImageLocalService;
30  import com.liferay.portal.service.LayoutLocalService;
31  import com.liferay.portal.service.LayoutService;
32  import com.liferay.portal.service.ResourceLocalService;
33  import com.liferay.portal.service.ResourceService;
34  import com.liferay.portal.service.UserLocalService;
35  import com.liferay.portal.service.UserService;
36  import com.liferay.portal.service.persistence.GroupFinder;
37  import com.liferay.portal.service.persistence.GroupPersistence;
38  import com.liferay.portal.service.persistence.ImagePersistence;
39  import com.liferay.portal.service.persistence.LayoutFinder;
40  import com.liferay.portal.service.persistence.LayoutPersistence;
41  import com.liferay.portal.service.persistence.ResourceFinder;
42  import com.liferay.portal.service.persistence.ResourcePersistence;
43  import com.liferay.portal.service.persistence.UserFinder;
44  import com.liferay.portal.service.persistence.UserPersistence;
45  
46  import com.liferay.portlet.expando.service.ExpandoValueLocalService;
47  import com.liferay.portlet.expando.service.ExpandoValueService;
48  import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
49  import com.liferay.portlet.imagegallery.model.IGFolder;
50  import com.liferay.portlet.imagegallery.service.IGFolderLocalService;
51  import com.liferay.portlet.imagegallery.service.IGFolderService;
52  import com.liferay.portlet.imagegallery.service.IGImageLocalService;
53  import com.liferay.portlet.imagegallery.service.IGImageService;
54  import com.liferay.portlet.imagegallery.service.persistence.IGFolderPersistence;
55  import com.liferay.portlet.imagegallery.service.persistence.IGImageFinder;
56  import com.liferay.portlet.imagegallery.service.persistence.IGImagePersistence;
57  
58  import java.util.List;
59  
60  /**
61   * <a href="IGFolderLocalServiceBaseImpl.java.html"><b><i>View Source</i></b>
62   * </a>
63   *
64   * @author Brian Wing Shun Chan
65   */
66  public abstract class IGFolderLocalServiceBaseImpl
67      implements IGFolderLocalService {
68      public IGFolder addIGFolder(IGFolder igFolder) throws SystemException {
69          igFolder.setNew(true);
70  
71          return igFolderPersistence.update(igFolder, false);
72      }
73  
74      public IGFolder createIGFolder(long folderId) {
75          return igFolderPersistence.create(folderId);
76      }
77  
78      public void deleteIGFolder(long folderId)
79          throws PortalException, SystemException {
80          igFolderPersistence.remove(folderId);
81      }
82  
83      public void deleteIGFolder(IGFolder igFolder) throws SystemException {
84          igFolderPersistence.remove(igFolder);
85      }
86  
87      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
88          throws SystemException {
89          return igFolderPersistence.findWithDynamicQuery(dynamicQuery);
90      }
91  
92      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
93          int end) throws SystemException {
94          return igFolderPersistence.findWithDynamicQuery(dynamicQuery, start, end);
95      }
96  
97      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
98          int end, OrderByComparator orderByComparator) throws SystemException {
99          return igFolderPersistence.findWithDynamicQuery(dynamicQuery, start,
100             end, orderByComparator);
101     }
102 
103     public int dynamicQueryCount(DynamicQuery dynamicQuery)
104         throws SystemException {
105         return igFolderPersistence.countWithDynamicQuery(dynamicQuery);
106     }
107 
108     public IGFolder getIGFolder(long folderId)
109         throws PortalException, SystemException {
110         return igFolderPersistence.findByPrimaryKey(folderId);
111     }
112 
113     public List<IGFolder> getIGFolders(int start, int end)
114         throws SystemException {
115         return igFolderPersistence.findAll(start, end);
116     }
117 
118     public int getIGFoldersCount() throws SystemException {
119         return igFolderPersistence.countAll();
120     }
121 
122     public IGFolder updateIGFolder(IGFolder igFolder) throws SystemException {
123         igFolder.setNew(false);
124 
125         return igFolderPersistence.update(igFolder, true);
126     }
127 
128     public IGFolder updateIGFolder(IGFolder igFolder, boolean merge)
129         throws SystemException {
130         igFolder.setNew(false);
131 
132         return igFolderPersistence.update(igFolder, merge);
133     }
134 
135     public IGFolderLocalService getIGFolderLocalService() {
136         return igFolderLocalService;
137     }
138 
139     public void setIGFolderLocalService(
140         IGFolderLocalService igFolderLocalService) {
141         this.igFolderLocalService = igFolderLocalService;
142     }
143 
144     public IGFolderService getIGFolderService() {
145         return igFolderService;
146     }
147 
148     public void setIGFolderService(IGFolderService igFolderService) {
149         this.igFolderService = igFolderService;
150     }
151 
152     public IGFolderPersistence getIGFolderPersistence() {
153         return igFolderPersistence;
154     }
155 
156     public void setIGFolderPersistence(IGFolderPersistence igFolderPersistence) {
157         this.igFolderPersistence = igFolderPersistence;
158     }
159 
160     public IGImageLocalService getIGImageLocalService() {
161         return igImageLocalService;
162     }
163 
164     public void setIGImageLocalService(IGImageLocalService igImageLocalService) {
165         this.igImageLocalService = igImageLocalService;
166     }
167 
168     public IGImageService getIGImageService() {
169         return igImageService;
170     }
171 
172     public void setIGImageService(IGImageService igImageService) {
173         this.igImageService = igImageService;
174     }
175 
176     public IGImagePersistence getIGImagePersistence() {
177         return igImagePersistence;
178     }
179 
180     public void setIGImagePersistence(IGImagePersistence igImagePersistence) {
181         this.igImagePersistence = igImagePersistence;
182     }
183 
184     public IGImageFinder getIGImageFinder() {
185         return igImageFinder;
186     }
187 
188     public void setIGImageFinder(IGImageFinder igImageFinder) {
189         this.igImageFinder = igImageFinder;
190     }
191 
192     public CounterLocalService getCounterLocalService() {
193         return counterLocalService;
194     }
195 
196     public void setCounterLocalService(CounterLocalService counterLocalService) {
197         this.counterLocalService = counterLocalService;
198     }
199 
200     public CounterService getCounterService() {
201         return counterService;
202     }
203 
204     public void setCounterService(CounterService counterService) {
205         this.counterService = counterService;
206     }
207 
208     public GroupLocalService getGroupLocalService() {
209         return groupLocalService;
210     }
211 
212     public void setGroupLocalService(GroupLocalService groupLocalService) {
213         this.groupLocalService = groupLocalService;
214     }
215 
216     public GroupService getGroupService() {
217         return groupService;
218     }
219 
220     public void setGroupService(GroupService groupService) {
221         this.groupService = groupService;
222     }
223 
224     public GroupPersistence getGroupPersistence() {
225         return groupPersistence;
226     }
227 
228     public void setGroupPersistence(GroupPersistence groupPersistence) {
229         this.groupPersistence = groupPersistence;
230     }
231 
232     public GroupFinder getGroupFinder() {
233         return groupFinder;
234     }
235 
236     public void setGroupFinder(GroupFinder groupFinder) {
237         this.groupFinder = groupFinder;
238     }
239 
240     public ImageLocalService getImageLocalService() {
241         return imageLocalService;
242     }
243 
244     public void setImageLocalService(ImageLocalService imageLocalService) {
245         this.imageLocalService = imageLocalService;
246     }
247 
248     public ImagePersistence getImagePersistence() {
249         return imagePersistence;
250     }
251 
252     public void setImagePersistence(ImagePersistence imagePersistence) {
253         this.imagePersistence = imagePersistence;
254     }
255 
256     public LayoutLocalService getLayoutLocalService() {
257         return layoutLocalService;
258     }
259 
260     public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
261         this.layoutLocalService = layoutLocalService;
262     }
263 
264     public LayoutService getLayoutService() {
265         return layoutService;
266     }
267 
268     public void setLayoutService(LayoutService layoutService) {
269         this.layoutService = layoutService;
270     }
271 
272     public LayoutPersistence getLayoutPersistence() {
273         return layoutPersistence;
274     }
275 
276     public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
277         this.layoutPersistence = layoutPersistence;
278     }
279 
280     public LayoutFinder getLayoutFinder() {
281         return layoutFinder;
282     }
283 
284     public void setLayoutFinder(LayoutFinder layoutFinder) {
285         this.layoutFinder = layoutFinder;
286     }
287 
288     public ResourceLocalService getResourceLocalService() {
289         return resourceLocalService;
290     }
291 
292     public void setResourceLocalService(
293         ResourceLocalService resourceLocalService) {
294         this.resourceLocalService = resourceLocalService;
295     }
296 
297     public ResourceService getResourceService() {
298         return resourceService;
299     }
300 
301     public void setResourceService(ResourceService resourceService) {
302         this.resourceService = resourceService;
303     }
304 
305     public ResourcePersistence getResourcePersistence() {
306         return resourcePersistence;
307     }
308 
309     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
310         this.resourcePersistence = resourcePersistence;
311     }
312 
313     public ResourceFinder getResourceFinder() {
314         return resourceFinder;
315     }
316 
317     public void setResourceFinder(ResourceFinder resourceFinder) {
318         this.resourceFinder = resourceFinder;
319     }
320 
321     public UserLocalService getUserLocalService() {
322         return userLocalService;
323     }
324 
325     public void setUserLocalService(UserLocalService userLocalService) {
326         this.userLocalService = userLocalService;
327     }
328 
329     public UserService getUserService() {
330         return userService;
331     }
332 
333     public void setUserService(UserService userService) {
334         this.userService = userService;
335     }
336 
337     public UserPersistence getUserPersistence() {
338         return userPersistence;
339     }
340 
341     public void setUserPersistence(UserPersistence userPersistence) {
342         this.userPersistence = userPersistence;
343     }
344 
345     public UserFinder getUserFinder() {
346         return userFinder;
347     }
348 
349     public void setUserFinder(UserFinder userFinder) {
350         this.userFinder = userFinder;
351     }
352 
353     public ExpandoValueLocalService getExpandoValueLocalService() {
354         return expandoValueLocalService;
355     }
356 
357     public void setExpandoValueLocalService(
358         ExpandoValueLocalService expandoValueLocalService) {
359         this.expandoValueLocalService = expandoValueLocalService;
360     }
361 
362     public ExpandoValueService getExpandoValueService() {
363         return expandoValueService;
364     }
365 
366     public void setExpandoValueService(ExpandoValueService expandoValueService) {
367         this.expandoValueService = expandoValueService;
368     }
369 
370     public ExpandoValuePersistence getExpandoValuePersistence() {
371         return expandoValuePersistence;
372     }
373 
374     public void setExpandoValuePersistence(
375         ExpandoValuePersistence expandoValuePersistence) {
376         this.expandoValuePersistence = expandoValuePersistence;
377     }
378 
379     protected void runSQL(String sql) throws SystemException {
380         try {
381             DB db = DBFactoryUtil.getDB();
382 
383             db.runSQL(sql);
384         }
385         catch (Exception e) {
386             throw new SystemException(e);
387         }
388     }
389 
390     @BeanReference(type = IGFolderLocalService.class)
391     protected IGFolderLocalService igFolderLocalService;
392     @BeanReference(type = IGFolderService.class)
393     protected IGFolderService igFolderService;
394     @BeanReference(type = IGFolderPersistence.class)
395     protected IGFolderPersistence igFolderPersistence;
396     @BeanReference(type = IGImageLocalService.class)
397     protected IGImageLocalService igImageLocalService;
398     @BeanReference(type = IGImageService.class)
399     protected IGImageService igImageService;
400     @BeanReference(type = IGImagePersistence.class)
401     protected IGImagePersistence igImagePersistence;
402     @BeanReference(type = IGImageFinder.class)
403     protected IGImageFinder igImageFinder;
404     @BeanReference(type = CounterLocalService.class)
405     protected CounterLocalService counterLocalService;
406     @BeanReference(type = CounterService.class)
407     protected CounterService counterService;
408     @BeanReference(type = GroupLocalService.class)
409     protected GroupLocalService groupLocalService;
410     @BeanReference(type = GroupService.class)
411     protected GroupService groupService;
412     @BeanReference(type = GroupPersistence.class)
413     protected GroupPersistence groupPersistence;
414     @BeanReference(type = GroupFinder.class)
415     protected GroupFinder groupFinder;
416     @BeanReference(type = ImageLocalService.class)
417     protected ImageLocalService imageLocalService;
418     @BeanReference(type = ImagePersistence.class)
419     protected ImagePersistence imagePersistence;
420     @BeanReference(type = LayoutLocalService.class)
421     protected LayoutLocalService layoutLocalService;
422     @BeanReference(type = LayoutService.class)
423     protected LayoutService layoutService;
424     @BeanReference(type = LayoutPersistence.class)
425     protected LayoutPersistence layoutPersistence;
426     @BeanReference(type = LayoutFinder.class)
427     protected LayoutFinder layoutFinder;
428     @BeanReference(type = ResourceLocalService.class)
429     protected ResourceLocalService resourceLocalService;
430     @BeanReference(type = ResourceService.class)
431     protected ResourceService resourceService;
432     @BeanReference(type = ResourcePersistence.class)
433     protected ResourcePersistence resourcePersistence;
434     @BeanReference(type = ResourceFinder.class)
435     protected ResourceFinder resourceFinder;
436     @BeanReference(type = UserLocalService.class)
437     protected UserLocalService userLocalService;
438     @BeanReference(type = UserService.class)
439     protected UserService userService;
440     @BeanReference(type = UserPersistence.class)
441     protected UserPersistence userPersistence;
442     @BeanReference(type = UserFinder.class)
443     protected UserFinder userFinder;
444     @BeanReference(type = ExpandoValueLocalService.class)
445     protected ExpandoValueLocalService expandoValueLocalService;
446     @BeanReference(type = ExpandoValueService.class)
447     protected ExpandoValueService expandoValueService;
448     @BeanReference(type = ExpandoValuePersistence.class)
449     protected ExpandoValuePersistence expandoValuePersistence;
450 }