001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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            public static com.liferay.portlet.blogs.model.BlogsEntry fetchBlogsEntry(
162                    long entryId)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getService().fetchBlogsEntry(entryId);
165            }
166    
167            /**
168            * Returns the blogs entry with the primary key.
169            *
170            * @param entryId the primary key of the blogs entry
171            * @return the blogs entry
172            * @throws PortalException if a blogs entry with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portlet.blogs.model.BlogsEntry getBlogsEntry(
176                    long entryId)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return getService().getBlogsEntry(entryId);
180            }
181    
182            public static com.liferay.portal.model.PersistedModel getPersistedModel(
183                    java.io.Serializable primaryKeyObj)
184                    throws com.liferay.portal.kernel.exception.PortalException,
185                            com.liferay.portal.kernel.exception.SystemException {
186                    return getService().getPersistedModel(primaryKeyObj);
187            }
188    
189            /**
190            * Returns the blogs entry with the UUID in the group.
191            *
192            * @param uuid the UUID of blogs entry
193            * @param groupId the group id of the blogs entry
194            * @return the blogs entry
195            * @throws PortalException if a blogs entry with the UUID in the group could not be found
196            * @throws SystemException if a system exception occurred
197            */
198            public static com.liferay.portlet.blogs.model.BlogsEntry getBlogsEntryByUuidAndGroupId(
199                    java.lang.String uuid, long groupId)
200                    throws com.liferay.portal.kernel.exception.PortalException,
201                            com.liferay.portal.kernel.exception.SystemException {
202                    return getService().getBlogsEntryByUuidAndGroupId(uuid, groupId);
203            }
204    
205            /**
206            * Returns a range of all the blogs entries.
207            *
208            * <p>
209            * 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.
210            * </p>
211            *
212            * @param start the lower bound of the range of blogs entries
213            * @param end the upper bound of the range of blogs entries (not inclusive)
214            * @return the range of blogs entries
215            * @throws SystemException if a system exception occurred
216            */
217            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getBlogsEntries(
218                    int start, int end)
219                    throws com.liferay.portal.kernel.exception.SystemException {
220                    return getService().getBlogsEntries(start, end);
221            }
222    
223            /**
224            * Returns the number of blogs entries.
225            *
226            * @return the number of blogs entries
227            * @throws SystemException if a system exception occurred
228            */
229            public static int getBlogsEntriesCount()
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getService().getBlogsEntriesCount();
232            }
233    
234            /**
235            * Updates the blogs entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
236            *
237            * @param blogsEntry the blogs entry
238            * @return the blogs entry that was updated
239            * @throws SystemException if a system exception occurred
240            */
241            public static com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
242                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getService().updateBlogsEntry(blogsEntry);
245            }
246    
247            /**
248            * Updates the blogs entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
249            *
250            * @param blogsEntry the blogs entry
251            * @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.
252            * @return the blogs entry that was updated
253            * @throws SystemException if a system exception occurred
254            */
255            public static com.liferay.portlet.blogs.model.BlogsEntry updateBlogsEntry(
256                    com.liferay.portlet.blogs.model.BlogsEntry blogsEntry, boolean merge)
257                    throws com.liferay.portal.kernel.exception.SystemException {
258                    return getService().updateBlogsEntry(blogsEntry, merge);
259            }
260    
261            /**
262            * Returns the Spring bean ID for this bean.
263            *
264            * @return the Spring bean ID for this bean
265            */
266            public static java.lang.String getBeanIdentifier() {
267                    return getService().getBeanIdentifier();
268            }
269    
270            /**
271            * Sets the Spring bean ID for this bean.
272            *
273            * @param beanIdentifier the Spring bean ID for this bean
274            */
275            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
276                    getService().setBeanIdentifier(beanIdentifier);
277            }
278    
279            public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
280                    long userId, java.lang.String title, java.lang.String description,
281                    java.lang.String content, int displayDateMonth, int displayDateDay,
282                    int displayDateYear, int displayDateHour, int displayDateMinute,
283                    boolean allowPingbacks, boolean allowTrackbacks,
284                    java.lang.String[] trackbacks, boolean smallImage,
285                    java.lang.String smallImageURL, java.lang.String smallImageFileName,
286                    java.io.InputStream smallImageInputStream,
287                    com.liferay.portal.service.ServiceContext serviceContext)
288                    throws com.liferay.portal.kernel.exception.PortalException,
289                            com.liferay.portal.kernel.exception.SystemException {
290                    return getService()
291                                       .addEntry(userId, title, description, content,
292                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
293                            displayDateMinute, allowPingbacks, allowTrackbacks, trackbacks,
294                            smallImage, smallImageURL, smallImageFileName,
295                            smallImageInputStream, serviceContext);
296            }
297    
298            public static void addEntryResources(
299                    com.liferay.portlet.blogs.model.BlogsEntry entry,
300                    boolean addGroupPermissions, boolean addGuestPermissions)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    getService()
304                            .addEntryResources(entry, addGroupPermissions, addGuestPermissions);
305            }
306    
307            public static void addEntryResources(
308                    com.liferay.portlet.blogs.model.BlogsEntry entry,
309                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
310                    throws com.liferay.portal.kernel.exception.PortalException,
311                            com.liferay.portal.kernel.exception.SystemException {
312                    getService().addEntryResources(entry, groupPermissions, guestPermissions);
313            }
314    
315            public static void addEntryResources(long entryId,
316                    boolean addGroupPermissions, boolean addGuestPermissions)
317                    throws com.liferay.portal.kernel.exception.PortalException,
318                            com.liferay.portal.kernel.exception.SystemException {
319                    getService()
320                            .addEntryResources(entryId, addGroupPermissions, addGuestPermissions);
321            }
322    
323            public static void addEntryResources(long entryId,
324                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
325                    throws com.liferay.portal.kernel.exception.PortalException,
326                            com.liferay.portal.kernel.exception.SystemException {
327                    getService()
328                            .addEntryResources(entryId, groupPermissions, guestPermissions);
329            }
330    
331            public static void deleteEntries(long groupId)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException {
334                    getService().deleteEntries(groupId);
335            }
336    
337            public static void deleteEntry(
338                    com.liferay.portlet.blogs.model.BlogsEntry entry)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException {
341                    getService().deleteEntry(entry);
342            }
343    
344            public static void deleteEntry(long entryId)
345                    throws com.liferay.portal.kernel.exception.PortalException,
346                            com.liferay.portal.kernel.exception.SystemException {
347                    getService().deleteEntry(entryId);
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                    throws com.liferay.portal.kernel.exception.SystemException {
353                    return getService().getCompanyEntries(companyId, status, start, end);
354            }
355    
356            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
357                    long companyId, int status, int start, int end,
358                    com.liferay.portal.kernel.util.OrderByComparator obc)
359                    throws com.liferay.portal.kernel.exception.SystemException {
360                    return getService().getCompanyEntries(companyId, status, start, end, obc);
361            }
362    
363            public static int getCompanyEntriesCount(long companyId, int status)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return getService().getCompanyEntriesCount(companyId, status);
366            }
367    
368            public static com.liferay.portlet.blogs.model.BlogsEntry[] getEntriesPrevAndNext(
369                    long entryId)
370                    throws com.liferay.portal.kernel.exception.PortalException,
371                            com.liferay.portal.kernel.exception.SystemException {
372                    return getService().getEntriesPrevAndNext(entryId);
373            }
374    
375            public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
376                    long entryId)
377                    throws com.liferay.portal.kernel.exception.PortalException,
378                            com.liferay.portal.kernel.exception.SystemException {
379                    return getService().getEntry(entryId);
380            }
381    
382            public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
383                    long groupId, java.lang.String urlTitle)
384                    throws com.liferay.portal.kernel.exception.PortalException,
385                            com.liferay.portal.kernel.exception.SystemException {
386                    return getService().getEntry(groupId, urlTitle);
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                    throws com.liferay.portal.kernel.exception.SystemException {
392                    return getService().getGroupEntries(groupId, status, start, end);
393            }
394    
395            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
396                    long groupId, int status, int start, int end,
397                    com.liferay.portal.kernel.util.OrderByComparator obc)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getService().getGroupEntries(groupId, status, start, end, obc);
400            }
401    
402            public static int getGroupEntriesCount(long groupId, int status)
403                    throws com.liferay.portal.kernel.exception.SystemException {
404                    return getService().getGroupEntriesCount(groupId, status);
405            }
406    
407            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
408                    long companyId, long groupId, int status, int start, int end)
409                    throws com.liferay.portal.kernel.exception.SystemException {
410                    return getService()
411                                       .getGroupsEntries(companyId, groupId, status, start, end);
412            }
413    
414            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
415                    long groupId, long userId, int status, int start, int end)
416                    throws com.liferay.portal.kernel.exception.SystemException {
417                    return getService()
418                                       .getGroupUserEntries(groupId, userId, status, start, end);
419            }
420    
421            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupUserEntries(
422                    long groupId, long userId, int status, int start, int end,
423                    com.liferay.portal.kernel.util.OrderByComparator obc)
424                    throws com.liferay.portal.kernel.exception.SystemException {
425                    return getService()
426                                       .getGroupUserEntries(groupId, userId, status, start, end, obc);
427            }
428    
429            public static int getGroupUserEntriesCount(long groupId, long userId,
430                    int status) throws com.liferay.portal.kernel.exception.SystemException {
431                    return getService().getGroupUserEntriesCount(groupId, userId, status);
432            }
433    
434            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getNoAssetEntries()
435                    throws com.liferay.portal.kernel.exception.SystemException {
436                    return getService().getNoAssetEntries();
437            }
438    
439            public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
440                    long organizationId, int status, int start, int end)
441                    throws com.liferay.portal.kernel.exception.SystemException {
442                    return getService()
443                                       .getOrganizationEntries(organizationId, status, start, end);
444            }
445    
446            public static int getOrganizationEntriesCount(long organizationId,
447                    int status) throws com.liferay.portal.kernel.exception.SystemException {
448                    return getService().getOrganizationEntriesCount(organizationId, status);
449            }
450    
451            public static void subscribe(long userId, long groupId)
452                    throws com.liferay.portal.kernel.exception.PortalException,
453                            com.liferay.portal.kernel.exception.SystemException {
454                    getService().subscribe(userId, groupId);
455            }
456    
457            public static void unsubscribe(long userId, long groupId)
458                    throws com.liferay.portal.kernel.exception.PortalException,
459                            com.liferay.portal.kernel.exception.SystemException {
460                    getService().unsubscribe(userId, groupId);
461            }
462    
463            public static void updateAsset(long userId,
464                    com.liferay.portlet.blogs.model.BlogsEntry entry,
465                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
466                    long[] assetLinkEntryIds)
467                    throws com.liferay.portal.kernel.exception.PortalException,
468                            com.liferay.portal.kernel.exception.SystemException {
469                    getService()
470                            .updateAsset(userId, entry, assetCategoryIds, assetTagNames,
471                            assetLinkEntryIds);
472            }
473    
474            public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
475                    long userId, long entryId, java.lang.String title,
476                    java.lang.String description, java.lang.String content,
477                    int displayDateMonth, int displayDateDay, int displayDateYear,
478                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
479                    boolean allowTrackbacks, java.lang.String[] trackbacks,
480                    boolean smallImage, java.lang.String smallImageURL,
481                    java.lang.String smallImageFileName,
482                    java.io.InputStream smallImageInputStream,
483                    com.liferay.portal.service.ServiceContext serviceContext)
484                    throws com.liferay.portal.kernel.exception.PortalException,
485                            com.liferay.portal.kernel.exception.SystemException {
486                    return getService()
487                                       .updateEntry(userId, entryId, title, description, content,
488                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
489                            displayDateMinute, allowPingbacks, allowTrackbacks, trackbacks,
490                            smallImage, smallImageURL, smallImageFileName,
491                            smallImageInputStream, serviceContext);
492            }
493    
494            public static void updateEntryResources(
495                    com.liferay.portlet.blogs.model.BlogsEntry entry,
496                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
497                    throws com.liferay.portal.kernel.exception.PortalException,
498                            com.liferay.portal.kernel.exception.SystemException {
499                    getService()
500                            .updateEntryResources(entry, groupPermissions, guestPermissions);
501            }
502    
503            public static com.liferay.portlet.blogs.model.BlogsEntry updateStatus(
504                    long userId, long entryId, int status,
505                    com.liferay.portal.service.ServiceContext serviceContext)
506                    throws com.liferay.portal.kernel.exception.PortalException,
507                            com.liferay.portal.kernel.exception.SystemException {
508                    return getService().updateStatus(userId, entryId, status, serviceContext);
509            }
510    
511            public static BlogsEntryLocalService getService() {
512                    if (_service == null) {
513                            _service = (BlogsEntryLocalService)PortalBeanLocatorUtil.locate(BlogsEntryLocalService.class.getName());
514    
515                            ReferenceRegistry.registerReference(BlogsEntryLocalServiceUtil.class,
516                                    "_service");
517                            MethodCache.remove(BlogsEntryLocalService.class);
518                    }
519    
520                    return _service;
521            }
522    
523            public void setService(BlogsEntryLocalService service) {
524                    MethodCache.remove(BlogsEntryLocalService.class);
525    
526                    _service = service;
527    
528                    ReferenceRegistry.registerReference(BlogsEntryLocalServiceUtil.class,
529                            "_service");
530                    MethodCache.remove(BlogsEntryLocalService.class);
531            }
532    
533            private static BlogsEntryLocalService _service;
534    }