001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.blogs.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the blogs entry local service. This utility wraps {@link com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
023     *
024     * <p>
025     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see BlogsEntryLocalService
030     * @see com.liferay.portlet.blogs.service.base.BlogsEntryLocalServiceBaseImpl
031     * @see com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl
032     * @generated
033     */
034    public class BlogsEntryLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds the blogs entry to the database. Also notifies the appropriate model listeners.
043            *
044            * @param blogsEntry the blogs entry
045            * @return the blogs entry that was added
046            * @throws SystemException if a system exception occurred
047            */
048            public static com.liferay.portlet.blogs.model.BlogsEntry addBlogsEntry(
049                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    return getService().addBlogsEntry(blogsEntry);
052            }
053    
054            /**
055            * Creates a new blogs entry with the primary key. Does not add the blogs entry to the database.
056            *
057            * @param entryId the primary key for the new blogs entry
058            * @return the new blogs entry
059            */
060            public static com.liferay.portlet.blogs.model.BlogsEntry createBlogsEntry(
061                    long entryId) {
062                    return getService().createBlogsEntry(entryId);
063            }
064    
065            /**
066            * Deletes the blogs entry with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param entryId the primary key of the blogs entry
069            * @throws PortalException if a blogs entry with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static void deleteBlogsEntry(long entryId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    getService().deleteBlogsEntry(entryId);
076            }
077    
078            /**
079            * Deletes the blogs entry from the database. Also notifies the appropriate model listeners.
080            *
081            * @param blogsEntry the blogs entry
082            * @throws SystemException if a system exception occurred
083            */
084            public static void deleteBlogsEntry(
085                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
086                    throws com.liferay.portal.kernel.exception.SystemException {
087                    getService().deleteBlogsEntry(blogsEntry);
088            }
089    
090            /**
091            * Performs a dynamic query on the database and returns the matching rows.
092            *
093            * @param dynamicQuery the dynamic query
094            * @return the matching rows
095            * @throws SystemException if a system exception occurred
096            */
097            @SuppressWarnings("rawtypes")
098            public static java.util.List dynamicQuery(
099                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().dynamicQuery(dynamicQuery);
102            }
103    
104            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
117            @SuppressWarnings("rawtypes")
118            public static java.util.List dynamicQuery(
119                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120                    int end) throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().dynamicQuery(dynamicQuery, start, end);
122            }
123    
124            /**
125            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
126            *
127            * <p>
128            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
135            * @return the ordered range of matching rows
136            * @throws SystemException if a system exception occurred
137            */
138            @SuppressWarnings("rawtypes")
139            public static java.util.List dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getService()
145                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146            }
147    
148            /**
149            * Returns the number of rows that match the dynamic query.
150            *
151            * @param dynamicQuery the dynamic query
152            * @return the number of rows that match the dynamic query
153            * @throws SystemException if a system exception occurred
154            */
155            public static long dynamicQueryCount(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157                    throws com.liferay.portal.kernel.exception.SystemException {
158                    return getService().dynamicQueryCount(dynamicQuery);
159            }
160    
161            /**
162            * Returns the blogs entry with the primary key.
163            *
164            * @param entryId the primary key of the blogs entry
165            * @return the blogs entry
166            * @throws PortalException if a blogs entry with the primary key could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            public static com.liferay.portlet.blogs.model.BlogsEntry getBlogsEntry(
170                    long entryId)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getService().getBlogsEntry(entryId);
174            }
175    
176            public static com.liferay.portal.model.PersistedModel getPersistedModel(
177                    java.io.Serializable primaryKeyObj)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getService().getPersistedModel(primaryKeyObj);
181            }
182    
183            /**
184            * Returns the blogs entry with the UUID in the group.
185            *
186            * @param uuid the UUID of blogs entry
187            * @param groupId the group id of the blogs entry
188            * @return the blogs entry
189            * @throws PortalException if a blogs entry with the UUID in the group could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public static com.liferay.portlet.blogs.model.BlogsEntry getBlogsEntryByUuidAndGroupId(
193                    java.lang.String uuid, long groupId)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException {
196                    return getService().getBlogsEntryByUuidAndGroupId(uuid, groupId);
197            }
198    
199            /**
200            * Returns a range of all the blogs entries.
201            *
202            * <p>
203            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
204            * </p>
205            *
206            * @param start the lower bound of the range of blogs entries
207            * @param end the upper bound of the range of blogs entries (not inclusive)
208            * @return the range of blogs entries
209            * @throws SystemException if a system exception occurred
210            */
211            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getBlogsEntries(
212                    int start, int end)
213                    throws com.liferay.portal.kernel.exception.SystemException {
214                    return getService().getBlogsEntries(start, end);
215            }
216    
217            /**
218            * Returns the number of blogs entries.
219            *
220            * @return the number of blogs entries
221            * @throws SystemException if a system exception occurred
222            */
223            public static int getBlogsEntriesCount()
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getService().getBlogsEntriesCount();
226            }
227    
228            /**
229            * Updates the blogs entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
230            *
231            * @param blogsEntry the blogs entry
232            * @return the blogs entry that was updated
233            * @throws SystemException if a system exception occurred
234            */
235            public static com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
236                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
237                    throws com.liferay.portal.kernel.exception.SystemException {
238                    return getService().updateBlogsEntry(blogsEntry);
239            }
240    
241            /**
242            * Updates the blogs entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
243            *
244            * @param blogsEntry the blogs entry
245            * @param merge whether to merge the blogs entry with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
246            * @return the blogs entry that was updated
247            * @throws SystemException if a system exception occurred
248            */
249            public static com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
250                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry, boolean merge)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getService().updateBlogsEntry(blogsEntry, merge);
253            }
254    
255            /**
256            * Returns the Spring bean ID for this bean.
257            *
258            * @return the Spring bean ID for this bean
259            */
260            public static java.lang.String getBeanIdentifier() {
261                    return getService().getBeanIdentifier();
262            }
263    
264            /**
265            * Sets the Spring bean ID for this bean.
266            *
267            * @param beanIdentifier the Spring bean ID for this bean
268            */
269            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
270                    getService().setBeanIdentifier(beanIdentifier);
271            }
272    
273            public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
274                    long userId, java.lang.String title, java.lang.String description,
275                    java.lang.String content, int displayDateMonth, int displayDateDay,
276                    int displayDateYear, int displayDateHour, int displayDateMinute,
277                    boolean allowPingbacks, boolean allowTrackbacks,
278                    java.lang.String[] trackbacks, boolean smallImage,
279                    java.lang.String smallImageURL, java.lang.String smallImageFileName,
280                    java.io.InputStream smallImageInputStream,
281                    com.liferay.portal.service.ServiceContext serviceContext)
282                    throws com.liferay.portal.kernel.exception.PortalException,
283                            com.liferay.portal.kernel.exception.SystemException {
284                    return getService()
285                                       .addEntry(userId, title, description, content,
286                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
287                            displayDateMinute, allowPingbacks, allowTrackbacks, trackbacks,
288                            smallImage, smallImageURL, smallImageFileName,
289                            smallImageInputStream, serviceContext);
290            }
291    
292            public static void addEntryResources(
293                    com.liferay.portlet.blogs.model.BlogsEntry entry,
294                    boolean addGroupPermissions, boolean addGuestPermissions)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    getService()
298                            .addEntryResources(entry, addGroupPermissions, addGuestPermissions);
299            }
300    
301            public static void addEntryResources(
302                    com.liferay.portlet.blogs.model.BlogsEntry entry,
303                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
304                    throws com.liferay.portal.kernel.exception.PortalException,
305                            com.liferay.portal.kernel.exception.SystemException {
306                    getService().addEntryResources(entry, groupPermissions, guestPermissions);
307            }
308    
309            public static void addEntryResources(long entryId,
310                    boolean addGroupPermissions, boolean addGuestPermissions)
311                    throws com.liferay.portal.kernel.exception.PortalException,
312                            com.liferay.portal.kernel.exception.SystemException {
313                    getService()
314                            .addEntryResources(entryId, addGroupPermissions, addGuestPermissions);
315            }
316    
317            public static void addEntryResources(long entryId,
318                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    getService()
322                            .addEntryResources(entryId, groupPermissions, guestPermissions);
323            }
324    
325            public static void deleteEntries(long groupId)
326                    throws com.liferay.portal.kernel.exception.PortalException,
327                            com.liferay.portal.kernel.exception.SystemException {
328                    getService().deleteEntries(groupId);
329            }
330    
331            public static void deleteEntry(
332                    com.liferay.portlet.blogs.model.BlogsEntry entry)
333                    throws com.liferay.portal.kernel.exception.PortalException,
334                            com.liferay.portal.kernel.exception.SystemException {
335                    getService().deleteEntry(entry);
336            }
337    
338            public static void deleteEntry(long entryId)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException {
341                    getService().deleteEntry(entryId);
342            }
343    
344            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
345                    long companyId, int status, int start, int end)
346                    throws com.liferay.portal.kernel.exception.SystemException {
347                    return getService().getCompanyEntries(companyId, status, start, end);
348            }
349    
350            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
351                    long companyId, int status, int start, int end,
352                    com.liferay.portal.kernel.util.OrderByComparator obc)
353                    throws com.liferay.portal.kernel.exception.SystemException {
354                    return getService().getCompanyEntries(companyId, status, start, end, obc);
355            }
356    
357            public static int getCompanyEntriesCount(long companyId, int status)
358                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getService().getCompanyEntriesCount(companyId, status);
360            }
361    
362            public static com.liferay.portlet.blogs.model.BlogsEntry[] getEntriesPrevAndNext(
363                    long entryId)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException {
366                    return getService().getEntriesPrevAndNext(entryId);
367            }
368    
369            public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
370                    long entryId)
371                    throws com.liferay.portal.kernel.exception.PortalException,
372                            com.liferay.portal.kernel.exception.SystemException {
373                    return getService().getEntry(entryId);
374            }
375    
376            public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
377                    long groupId, java.lang.String urlTitle)
378                    throws com.liferay.portal.kernel.exception.PortalException,
379                            com.liferay.portal.kernel.exception.SystemException {
380                    return getService().getEntry(groupId, urlTitle);
381            }
382    
383            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
384                    long groupId, int status, int start, int end)
385                    throws com.liferay.portal.kernel.exception.SystemException {
386                    return getService().getGroupEntries(groupId, status, start, end);
387            }
388    
389            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
390                    long groupId, int status, int start, int end,
391                    com.liferay.portal.kernel.util.OrderByComparator obc)
392                    throws com.liferay.portal.kernel.exception.SystemException {
393                    return getService().getGroupEntries(groupId, status, start, end, obc);
394            }
395    
396            public static int getGroupEntriesCount(long groupId, int status)
397                    throws com.liferay.portal.kernel.exception.SystemException {
398                    return getService().getGroupEntriesCount(groupId, status);
399            }
400    
401            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
402                    long companyId, long groupId, int status, int start, int end)
403                    throws com.liferay.portal.kernel.exception.SystemException {
404                    return getService()
405                                       .getGroupsEntries(companyId, groupId, status, start, end);
406            }
407    
408            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
409                    long groupId, long userId, int status, int start, int end)
410                    throws com.liferay.portal.kernel.exception.SystemException {
411                    return getService()
412                                       .getGroupUserEntries(groupId, userId, status, start, end);
413            }
414    
415            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
416                    long groupId, long userId, int status, int start, int end,
417                    com.liferay.portal.kernel.util.OrderByComparator obc)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    return getService()
420                                       .getGroupUserEntries(groupId, userId, status, start, end, obc);
421            }
422    
423            public static int getGroupUserEntriesCount(long groupId, long userId,
424                    int status) throws com.liferay.portal.kernel.exception.SystemException {
425                    return getService().getGroupUserEntriesCount(groupId, userId, status);
426            }
427    
428            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getNoAssetEntries()
429                    throws com.liferay.portal.kernel.exception.SystemException {
430                    return getService().getNoAssetEntries();
431            }
432    
433            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
434                    long organizationId, int status, int start, int end)
435                    throws com.liferay.portal.kernel.exception.SystemException {
436                    return getService()
437                                       .getOrganizationEntries(organizationId, status, start, end);
438            }
439    
440            public static int getOrganizationEntriesCount(long organizationId,
441                    int status) throws com.liferay.portal.kernel.exception.SystemException {
442                    return getService().getOrganizationEntriesCount(organizationId, status);
443            }
444    
445            public static void subscribe(long userId, long groupId)
446                    throws com.liferay.portal.kernel.exception.PortalException,
447                            com.liferay.portal.kernel.exception.SystemException {
448                    getService().subscribe(userId, groupId);
449            }
450    
451            public static void unsubscribe(long userId, long groupId)
452                    throws com.liferay.portal.kernel.exception.PortalException,
453                            com.liferay.portal.kernel.exception.SystemException {
454                    getService().unsubscribe(userId, groupId);
455            }
456    
457            public static void updateAsset(long userId,
458                    com.liferay.portlet.blogs.model.BlogsEntry entry,
459                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
460                    long[] assetLinkEntryIds)
461                    throws com.liferay.portal.kernel.exception.PortalException,
462                            com.liferay.portal.kernel.exception.SystemException {
463                    getService()
464                            .updateAsset(userId, entry, assetCategoryIds, assetTagNames,
465                            assetLinkEntryIds);
466            }
467    
468            public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
469                    long userId, long entryId, java.lang.String title,
470                    java.lang.String description, java.lang.String content,
471                    int displayDateMonth, int displayDateDay, int displayDateYear,
472                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
473                    boolean allowTrackbacks, java.lang.String[] trackbacks,
474                    boolean smallImage, java.lang.String smallImageURL,
475                    java.lang.String smallImageFileName,
476                    java.io.InputStream smallImageInputStream,
477                    com.liferay.portal.service.ServiceContext serviceContext)
478                    throws com.liferay.portal.kernel.exception.PortalException,
479                            com.liferay.portal.kernel.exception.SystemException {
480                    return getService()
481                                       .updateEntry(userId, entryId, title, description, content,
482                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
483                            displayDateMinute, allowPingbacks, allowTrackbacks, trackbacks,
484                            smallImage, smallImageURL, smallImageFileName,
485                            smallImageInputStream, serviceContext);
486            }
487    
488            public static void updateEntryResources(
489                    com.liferay.portlet.blogs.model.BlogsEntry entry,
490                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
491                    throws com.liferay.portal.kernel.exception.PortalException,
492                            com.liferay.portal.kernel.exception.SystemException {
493                    getService()
494                            .updateEntryResources(entry, groupPermissions, guestPermissions);
495            }
496    
497            public static com.liferay.portlet.blogs.model.BlogsEntry updateStatus(
498                    long userId, long entryId, int status,
499                    com.liferay.portal.service.ServiceContext serviceContext)
500                    throws com.liferay.portal.kernel.exception.PortalException,
501                            com.liferay.portal.kernel.exception.SystemException {
502                    return getService().updateStatus(userId, entryId, status, serviceContext);
503            }
504    
505            public static BlogsEntryLocalService getService() {
506                    if (_service == null) {
507                            _service = (BlogsEntryLocalService)PortalBeanLocatorUtil.locate(BlogsEntryLocalService.class.getName());
508    
509                            ReferenceRegistry.registerReference(BlogsEntryLocalServiceUtil.class,
510                                    "_service");
511                            MethodCache.remove(BlogsEntryLocalService.class);
512                    }
513    
514                    return _service;
515            }
516    
517            public void setService(BlogsEntryLocalService service) {
518                    MethodCache.remove(BlogsEntryLocalService.class);
519    
520                    _service = service;
521    
522                    ReferenceRegistry.registerReference(BlogsEntryLocalServiceUtil.class,
523                            "_service");
524                    MethodCache.remove(BlogsEntryLocalService.class);
525            }
526    
527            private static BlogsEntryLocalService _service;
528    }