1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.blogs.service;
21  
22  
23  /**
24   * <a href="BlogsEntryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.blogs.service.BlogsEntryLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.blogs.service.BlogsEntryLocalService
42   *
43   */
44  public class BlogsEntryLocalServiceUtil {
45      public static com.liferay.portlet.blogs.model.BlogsEntry addBlogsEntry(
46          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
47          throws com.liferay.portal.SystemException {
48          return getService().addBlogsEntry(blogsEntry);
49      }
50  
51      public static com.liferay.portlet.blogs.model.BlogsEntry createBlogsEntry(
52          long entryId) {
53          return getService().createBlogsEntry(entryId);
54      }
55  
56      public static void deleteBlogsEntry(long entryId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteBlogsEntry(entryId);
60      }
61  
62      public static void deleteBlogsEntry(
63          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
64          throws com.liferay.portal.SystemException {
65          getService().deleteBlogsEntry(blogsEntry);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portlet.blogs.model.BlogsEntry getBlogsEntry(
81          long entryId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getBlogsEntry(entryId);
85      }
86  
87      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getBlogsEntries(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getBlogsEntries(start, end);
90      }
91  
92      public static int getBlogsEntriesCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getBlogsEntriesCount();
95      }
96  
97      public static com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
98          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
99          throws com.liferay.portal.SystemException {
100         return getService().updateBlogsEntry(blogsEntry);
101     }
102 
103     public static com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
104         com.liferay.portlet.blogs.model.BlogsEntry blogsEntry, boolean merge)
105         throws com.liferay.portal.SystemException {
106         return getService().updateBlogsEntry(blogsEntry, merge);
107     }
108 
109     public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
110         long userId, java.lang.String title, java.lang.String content,
111         int displayDateMonth, int displayDateDay, int displayDateYear,
112         int displayDateHour, int displayDateMinute, boolean draft,
113         boolean allowTrackbacks, java.lang.String[] trackbacks,
114         com.liferay.portal.service.ServiceContext serviceContext)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         return getService()
118                    .addEntry(userId, title, content, displayDateMonth,
119             displayDateDay, displayDateYear, displayDateHour,
120             displayDateMinute, draft, allowTrackbacks, trackbacks,
121             serviceContext);
122     }
123 
124     public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
125         java.lang.String uuid, long userId, java.lang.String title,
126         java.lang.String content, int displayDateMonth, int displayDateDay,
127         int displayDateYear, int displayDateHour, int displayDateMinute,
128         boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
129         com.liferay.portal.service.ServiceContext serviceContext)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         return getService()
133                    .addEntry(uuid, userId, title, content, displayDateMonth,
134             displayDateDay, displayDateYear, displayDateHour,
135             displayDateMinute, draft, allowTrackbacks, trackbacks,
136             serviceContext);
137     }
138 
139     public static void addEntryResources(long entryId,
140         boolean addCommunityPermissions, boolean addGuestPermissions)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         getService()
144             .addEntryResources(entryId, addCommunityPermissions,
145             addGuestPermissions);
146     }
147 
148     public static void addEntryResources(
149         com.liferay.portlet.blogs.model.BlogsEntry entry,
150         boolean addCommunityPermissions, boolean addGuestPermissions)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         getService()
154             .addEntryResources(entry, addCommunityPermissions,
155             addGuestPermissions);
156     }
157 
158     public static void addEntryResources(long entryId,
159         java.lang.String[] communityPermissions,
160         java.lang.String[] guestPermissions)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException {
163         getService()
164             .addEntryResources(entryId, communityPermissions, guestPermissions);
165     }
166 
167     public static void addEntryResources(
168         com.liferay.portlet.blogs.model.BlogsEntry entry,
169         java.lang.String[] communityPermissions,
170         java.lang.String[] guestPermissions)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         getService()
174             .addEntryResources(entry, communityPermissions, guestPermissions);
175     }
176 
177     public static void deleteEntries(long groupId)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         getService().deleteEntries(groupId);
181     }
182 
183     public static void deleteEntry(long entryId)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         getService().deleteEntry(entryId);
187     }
188 
189     public static void deleteEntry(
190         com.liferay.portlet.blogs.model.BlogsEntry entry)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException {
193         getService().deleteEntry(entry);
194     }
195 
196     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
197         long companyId, int start, int end)
198         throws com.liferay.portal.SystemException {
199         return getService().getCompanyEntries(companyId, start, end);
200     }
201 
202     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
203         long companyId, int start, int end,
204         com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException {
206         return getService().getCompanyEntries(companyId, start, end, obc);
207     }
208 
209     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
210         long companyId, boolean draft, int start, int end)
211         throws com.liferay.portal.SystemException {
212         return getService().getCompanyEntries(companyId, draft, start, end);
213     }
214 
215     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
216         long companyId, boolean draft, int start, int end,
217         com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException {
219         return getService().getCompanyEntries(companyId, draft, start, end, obc);
220     }
221 
222     public static int getCompanyEntriesCount(long companyId)
223         throws com.liferay.portal.SystemException {
224         return getService().getCompanyEntriesCount(companyId);
225     }
226 
227     public static int getCompanyEntriesCount(long companyId, boolean draft)
228         throws com.liferay.portal.SystemException {
229         return getService().getCompanyEntriesCount(companyId, draft);
230     }
231 
232     public static com.liferay.portlet.blogs.model.BlogsEntry[] getEntriesPrevAndNext(
233         long entryId)
234         throws com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException {
236         return getService().getEntriesPrevAndNext(entryId);
237     }
238 
239     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
240         long entryId)
241         throws com.liferay.portal.PortalException,
242             com.liferay.portal.SystemException {
243         return getService().getEntry(entryId);
244     }
245 
246     public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
247         long groupId, java.lang.String urlTitle)
248         throws com.liferay.portal.PortalException,
249             com.liferay.portal.SystemException {
250         return getService().getEntry(groupId, urlTitle);
251     }
252 
253     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
254         long groupId, int start, int end)
255         throws com.liferay.portal.SystemException {
256         return getService().getGroupEntries(groupId, start, end);
257     }
258 
259     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
260         long groupId, int start, int end,
261         com.liferay.portal.kernel.util.OrderByComparator obc)
262         throws com.liferay.portal.SystemException {
263         return getService().getGroupEntries(groupId, start, end, obc);
264     }
265 
266     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
267         long groupId, boolean draft, int start, int end)
268         throws com.liferay.portal.SystemException {
269         return getService().getGroupEntries(groupId, draft, start, end);
270     }
271 
272     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
273         long groupId, boolean draft, int start, int end,
274         com.liferay.portal.kernel.util.OrderByComparator obc)
275         throws com.liferay.portal.SystemException {
276         return getService().getGroupEntries(groupId, draft, start, end, obc);
277     }
278 
279     public static int getGroupEntriesCount(long groupId)
280         throws com.liferay.portal.SystemException {
281         return getService().getGroupEntriesCount(groupId);
282     }
283 
284     public static int getGroupEntriesCount(long groupId, boolean draft)
285         throws com.liferay.portal.SystemException {
286         return getService().getGroupEntriesCount(groupId, draft);
287     }
288 
289     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
290         long groupId, long userId, int start, int end)
291         throws com.liferay.portal.SystemException {
292         return getService().getGroupUserEntries(groupId, userId, start, end);
293     }
294 
295     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
296         long groupId, long userId, int start, int end,
297         com.liferay.portal.kernel.util.OrderByComparator obc)
298         throws com.liferay.portal.SystemException {
299         return getService().getGroupUserEntries(groupId, userId, start, end, obc);
300     }
301 
302     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
303         long groupId, long userId, boolean draft, int start, int end)
304         throws com.liferay.portal.SystemException {
305         return getService()
306                    .getGroupUserEntries(groupId, userId, draft, start, end);
307     }
308 
309     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
310         long groupId, long userId, boolean draft, int start, int end,
311         com.liferay.portal.kernel.util.OrderByComparator obc)
312         throws com.liferay.portal.SystemException {
313         return getService()
314                    .getGroupUserEntries(groupId, userId, draft, start, end, obc);
315     }
316 
317     public static int getGroupUserEntriesCount(long groupId, long userId)
318         throws com.liferay.portal.SystemException {
319         return getService().getGroupUserEntriesCount(groupId, userId);
320     }
321 
322     public static int getGroupUserEntriesCount(long groupId, long userId,
323         boolean draft) throws com.liferay.portal.SystemException {
324         return getService().getGroupUserEntriesCount(groupId, userId, draft);
325     }
326 
327     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getNoAssetEntries()
328         throws com.liferay.portal.SystemException {
329         return getService().getNoAssetEntries();
330     }
331 
332     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
333         long organizationId, boolean draft, int start, int end)
334         throws com.liferay.portal.SystemException {
335         return getService()
336                    .getOrganizationEntries(organizationId, draft, start, end);
337     }
338 
339     public static int getOrganizationEntriesCount(long organizationId,
340         boolean draft) throws com.liferay.portal.SystemException {
341         return getService().getOrganizationEntriesCount(organizationId, draft);
342     }
343 
344     public static java.lang.String getUrlTitle(long entryId,
345         java.lang.String title) {
346         return getService().getUrlTitle(entryId, title);
347     }
348 
349     public static void reIndex(long entryId)
350         throws com.liferay.portal.SystemException {
351         getService().reIndex(entryId);
352     }
353 
354     public static void reIndex(com.liferay.portlet.blogs.model.BlogsEntry entry)
355         throws com.liferay.portal.SystemException {
356         getService().reIndex(entry);
357     }
358 
359     public static void reIndex(java.lang.String[] ids)
360         throws com.liferay.portal.SystemException {
361         getService().reIndex(ids);
362     }
363 
364     public static com.liferay.portal.kernel.search.Hits search(long companyId,
365         long groupId, long userId, long ownerUserId, java.lang.String keywords,
366         int start, int end) throws com.liferay.portal.SystemException {
367         return getService()
368                    .search(companyId, groupId, userId, ownerUserId, keywords,
369             start, end);
370     }
371 
372     public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
373         long userId, long entryId, java.lang.String title,
374         java.lang.String content, int displayDateMonth, int displayDateDay,
375         int displayDateYear, int displayDateHour, int displayDateMinute,
376         boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
377         com.liferay.portal.service.ServiceContext serviceContext)
378         throws com.liferay.portal.PortalException,
379             com.liferay.portal.SystemException {
380         return getService()
381                    .updateEntry(userId, entryId, title, content,
382             displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
383             displayDateMinute, draft, allowTrackbacks, trackbacks,
384             serviceContext);
385     }
386 
387     public static void updateEntryResources(
388         com.liferay.portlet.blogs.model.BlogsEntry entry,
389         java.lang.String[] communityPermissions,
390         java.lang.String[] guestPermissions)
391         throws com.liferay.portal.PortalException,
392             com.liferay.portal.SystemException {
393         getService()
394             .updateEntryResources(entry, communityPermissions, guestPermissions);
395     }
396 
397     public static void updateTagsAsset(long userId,
398         com.liferay.portlet.blogs.model.BlogsEntry entry,
399         java.lang.String[] tagsEntries)
400         throws com.liferay.portal.PortalException,
401             com.liferay.portal.SystemException {
402         getService().updateTagsAsset(userId, entry, tagsEntries);
403     }
404 
405     public static BlogsEntryLocalService getService() {
406         if (_service == null) {
407             throw new RuntimeException("BlogsEntryLocalService is not set");
408         }
409 
410         return _service;
411     }
412 
413     public void setService(BlogsEntryLocalService service) {
414         _service = service;
415     }
416 
417     private static BlogsEntryLocalService _service;
418 }