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.journal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="JournalStructureLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link JournalStructureLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       JournalStructureLocalService
39   * @generated
40   */
41  public class JournalStructureLocalServiceUtil {
42      public static com.liferay.portlet.journal.model.JournalStructure addJournalStructure(
43          com.liferay.portlet.journal.model.JournalStructure journalStructure)
44          throws com.liferay.portal.SystemException {
45          return getService().addJournalStructure(journalStructure);
46      }
47  
48      public static com.liferay.portlet.journal.model.JournalStructure createJournalStructure(
49          long id) {
50          return getService().createJournalStructure(id);
51      }
52  
53      public static void deleteJournalStructure(long id)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteJournalStructure(id);
57      }
58  
59      public static void deleteJournalStructure(
60          com.liferay.portlet.journal.model.JournalStructure journalStructure)
61          throws com.liferay.portal.SystemException {
62          getService().deleteJournalStructure(journalStructure);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.journal.model.JournalStructure getJournalStructure(
96          long id)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getJournalStructure(id);
100     }
101 
102     public static com.liferay.portlet.journal.model.JournalStructure getJournalStructureByUuidAndGroupId(
103         java.lang.String uuid, long groupId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException {
106         return getService().getJournalStructureByUuidAndGroupId(uuid, groupId);
107     }
108 
109     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getJournalStructures(
110         int start, int end) throws com.liferay.portal.SystemException {
111         return getService().getJournalStructures(start, end);
112     }
113 
114     public static int getJournalStructuresCount()
115         throws com.liferay.portal.SystemException {
116         return getService().getJournalStructuresCount();
117     }
118 
119     public static com.liferay.portlet.journal.model.JournalStructure updateJournalStructure(
120         com.liferay.portlet.journal.model.JournalStructure journalStructure)
121         throws com.liferay.portal.SystemException {
122         return getService().updateJournalStructure(journalStructure);
123     }
124 
125     public static com.liferay.portlet.journal.model.JournalStructure updateJournalStructure(
126         com.liferay.portlet.journal.model.JournalStructure journalStructure,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getService().updateJournalStructure(journalStructure, merge);
129     }
130 
131     public static com.liferay.portlet.journal.model.JournalStructure addStructure(
132         long userId, long groupId, java.lang.String structureId,
133         boolean autoStructureId, java.lang.String parentStructureId,
134         java.lang.String name, java.lang.String description,
135         java.lang.String xsd,
136         com.liferay.portal.service.ServiceContext serviceContext)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException {
139         return getService()
140                    .addStructure(userId, groupId, structureId, autoStructureId,
141             parentStructureId, name, description, xsd, serviceContext);
142     }
143 
144     public static com.liferay.portlet.journal.model.JournalStructure addStructure(
145         java.lang.String uuid, long userId, long groupId,
146         java.lang.String structureId, boolean autoStructureId,
147         java.lang.String parentStructureId, java.lang.String name,
148         java.lang.String description, java.lang.String xsd,
149         com.liferay.portal.service.ServiceContext serviceContext)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException {
152         return getService()
153                    .addStructure(uuid, userId, groupId, structureId,
154             autoStructureId, parentStructureId, name, description, xsd,
155             serviceContext);
156     }
157 
158     public static void addStructureResources(long groupId,
159         java.lang.String structureId, boolean addCommunityPermissions,
160         boolean addGuestPermissions)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException {
163         getService()
164             .addStructureResources(groupId, structureId,
165             addCommunityPermissions, addGuestPermissions);
166     }
167 
168     public static void addStructureResources(
169         com.liferay.portlet.journal.model.JournalStructure structure,
170         boolean addCommunityPermissions, boolean addGuestPermissions)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         getService()
174             .addStructureResources(structure, addCommunityPermissions,
175             addGuestPermissions);
176     }
177 
178     public static void addStructureResources(long groupId,
179         java.lang.String structureId, java.lang.String[] communityPermissions,
180         java.lang.String[] guestPermissions)
181         throws com.liferay.portal.PortalException,
182             com.liferay.portal.SystemException {
183         getService()
184             .addStructureResources(groupId, structureId, communityPermissions,
185             guestPermissions);
186     }
187 
188     public static void addStructureResources(
189         com.liferay.portlet.journal.model.JournalStructure structure,
190         java.lang.String[] communityPermissions,
191         java.lang.String[] guestPermissions)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException {
194         getService()
195             .addStructureResources(structure, communityPermissions,
196             guestPermissions);
197     }
198 
199     public static void checkNewLine(long groupId, java.lang.String structureId)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         getService().checkNewLine(groupId, structureId);
203     }
204 
205     public static com.liferay.portlet.journal.model.JournalStructure copyStructure(
206         long userId, long groupId, java.lang.String oldStructureId,
207         java.lang.String newStructureId, boolean autoStructureId)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException {
210         return getService()
211                    .copyStructure(userId, groupId, oldStructureId,
212             newStructureId, autoStructureId);
213     }
214 
215     public static void deleteStructure(long groupId,
216         java.lang.String structureId)
217         throws com.liferay.portal.PortalException,
218             com.liferay.portal.SystemException {
219         getService().deleteStructure(groupId, structureId);
220     }
221 
222     public static void deleteStructure(
223         com.liferay.portlet.journal.model.JournalStructure structure)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         getService().deleteStructure(structure);
227     }
228 
229     public static void deleteStructures(long groupId)
230         throws com.liferay.portal.PortalException,
231             com.liferay.portal.SystemException {
232         getService().deleteStructures(groupId);
233     }
234 
235     public static com.liferay.portlet.journal.model.JournalStructure getStructure(
236         long id)
237         throws com.liferay.portal.PortalException,
238             com.liferay.portal.SystemException {
239         return getService().getStructure(id);
240     }
241 
242     public static com.liferay.portlet.journal.model.JournalStructure getStructure(
243         long groupId, java.lang.String structureId)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException {
246         return getService().getStructure(groupId, structureId);
247     }
248 
249     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures()
250         throws com.liferay.portal.SystemException {
251         return getService().getStructures();
252     }
253 
254     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures(
255         long groupId) throws com.liferay.portal.SystemException {
256         return getService().getStructures(groupId);
257     }
258 
259     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures(
260         long groupId, int start, int end)
261         throws com.liferay.portal.SystemException {
262         return getService().getStructures(groupId, start, end);
263     }
264 
265     public static int getStructuresCount(long groupId)
266         throws com.liferay.portal.SystemException {
267         return getService().getStructuresCount(groupId);
268     }
269 
270     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
271         long companyId, long groupId, java.lang.String keywords, int start,
272         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
273         throws com.liferay.portal.SystemException {
274         return getService().search(companyId, groupId, keywords, start, end, obc);
275     }
276 
277     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
278         long companyId, long groupId, java.lang.String structureId,
279         java.lang.String name, java.lang.String description,
280         boolean andOperator, int start, int end,
281         com.liferay.portal.kernel.util.OrderByComparator obc)
282         throws com.liferay.portal.SystemException {
283         return getService()
284                    .search(companyId, groupId, structureId, name, description,
285             andOperator, start, end, obc);
286     }
287 
288     public static int searchCount(long companyId, long groupId,
289         java.lang.String keywords) throws com.liferay.portal.SystemException {
290         return getService().searchCount(companyId, groupId, keywords);
291     }
292 
293     public static int searchCount(long companyId, long groupId,
294         java.lang.String structureId, java.lang.String name,
295         java.lang.String description, boolean andOperator)
296         throws com.liferay.portal.SystemException {
297         return getService()
298                    .searchCount(companyId, groupId, structureId, name,
299             description, andOperator);
300     }
301 
302     public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
303         long groupId, java.lang.String structureId,
304         java.lang.String parentStructureId, java.lang.String name,
305         java.lang.String description, java.lang.String xsd,
306         com.liferay.portal.service.ServiceContext serviceContext)
307         throws com.liferay.portal.PortalException,
308             com.liferay.portal.SystemException {
309         return getService()
310                    .updateStructure(groupId, structureId, parentStructureId,
311             name, description, xsd, serviceContext);
312     }
313 
314     public static JournalStructureLocalService getService() {
315         if (_service == null) {
316             _service = (JournalStructureLocalService)PortalBeanLocatorUtil.locate(JournalStructureLocalService.class.getName());
317 
318             ReferenceRegistry.registerReference(JournalStructureLocalServiceUtil.class,
319                 "_service");
320             MethodCache.remove(JournalStructureLocalService.class);
321         }
322 
323         return _service;
324     }
325 
326     public void setService(JournalStructureLocalService service) {
327         MethodCache.remove(JournalStructureLocalService.class);
328 
329         _service = service;
330 
331         ReferenceRegistry.registerReference(JournalStructureLocalServiceUtil.class,
332             "_service");
333         MethodCache.remove(JournalStructureLocalService.class);
334     }
335 
336     private static JournalStructureLocalService _service;
337 }