001    /**
002     * Copyright (c) 2000-present 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.announcements.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.service.BaseLocalService;
026    import com.liferay.portal.service.PersistedModelLocalService;
027    
028    /**
029     * Provides the local service interface for AnnouncementsEntry. Methods of this
030     * service will not have security checks based on the propagated JAAS
031     * credentials because this service can only be accessed from within the same
032     * VM.
033     *
034     * @author Brian Wing Shun Chan
035     * @see AnnouncementsEntryLocalServiceUtil
036     * @see com.liferay.portlet.announcements.service.base.AnnouncementsEntryLocalServiceBaseImpl
037     * @see com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl
038     * @generated
039     */
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface AnnouncementsEntryLocalService extends BaseLocalService,
044            PersistedModelLocalService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link AnnouncementsEntryLocalServiceUtil} to access the announcements entry local service. Add custom service methods to {@link com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050    
051            /**
052            * Adds the announcements entry to the database. Also notifies the appropriate model listeners.
053            *
054            * @param announcementsEntry the announcements entry
055            * @return the announcements entry that was added
056            */
057            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
058            public com.liferay.portlet.announcements.model.AnnouncementsEntry addAnnouncementsEntry(
059                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry);
060    
061            public com.liferay.portlet.announcements.model.AnnouncementsEntry addEntry(
062                    long userId, long classNameId, long classPK, java.lang.String title,
063                    java.lang.String content, java.lang.String url, java.lang.String type,
064                    int displayDateMonth, int displayDateDay, int displayDateYear,
065                    int displayDateHour, int displayDateMinute, boolean displayImmediately,
066                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
067                    int expirationDateHour, int expirationDateMinute, int priority,
068                    boolean alert)
069                    throws com.liferay.portal.kernel.exception.PortalException;
070    
071            /**
072            * @deprecated As of 6.2.0, replaced by {@link #addEntry(long, long, long,
073            String, String, String, String, int, int, int, int, int,
074            boolean, int, int, int, int, int, int, boolean)}
075            */
076            @java.lang.Deprecated
077            public com.liferay.portlet.announcements.model.AnnouncementsEntry addEntry(
078                    long userId, long classNameId, long classPK, java.lang.String title,
079                    java.lang.String content, java.lang.String url, java.lang.String type,
080                    int displayDateMonth, int displayDateDay, int displayDateYear,
081                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
082                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
083                    int expirationDateMinute, int priority, boolean alert)
084                    throws com.liferay.portal.kernel.exception.PortalException;
085    
086            public void checkEntries()
087                    throws com.liferay.portal.kernel.exception.PortalException;
088    
089            /**
090            * Creates a new announcements entry with the primary key. Does not add the announcements entry to the database.
091            *
092            * @param entryId the primary key for the new announcements entry
093            * @return the new announcements entry
094            */
095            public com.liferay.portlet.announcements.model.AnnouncementsEntry createAnnouncementsEntry(
096                    long entryId);
097    
098            /**
099            * Deletes the announcements entry from the database. Also notifies the appropriate model listeners.
100            *
101            * @param announcementsEntry the announcements entry
102            * @return the announcements entry that was removed
103            */
104            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
105            public com.liferay.portlet.announcements.model.AnnouncementsEntry deleteAnnouncementsEntry(
106                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry);
107    
108            /**
109            * Deletes the announcements entry with the primary key from the database. Also notifies the appropriate model listeners.
110            *
111            * @param entryId the primary key of the announcements entry
112            * @return the announcements entry that was removed
113            * @throws PortalException if a announcements entry with the primary key could not be found
114            */
115            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
116            public com.liferay.portlet.announcements.model.AnnouncementsEntry deleteAnnouncementsEntry(
117                    long entryId)
118                    throws com.liferay.portal.kernel.exception.PortalException;
119    
120            public void deleteEntry(
121                    com.liferay.portlet.announcements.model.AnnouncementsEntry entry)
122                    throws com.liferay.portal.kernel.exception.PortalException;
123    
124            public void deleteEntry(long entryId)
125                    throws com.liferay.portal.kernel.exception.PortalException;
126    
127            /**
128            * @throws PortalException
129            */
130            @Override
131            public com.liferay.portal.model.PersistedModel deletePersistedModel(
132                    com.liferay.portal.model.PersistedModel persistedModel)
133                    throws com.liferay.portal.kernel.exception.PortalException;
134    
135            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
136    
137            /**
138            * Performs a dynamic query on the database and returns the matching rows.
139            *
140            * @param dynamicQuery the dynamic query
141            * @return the matching rows
142            */
143            public <T> java.util.List<T> dynamicQuery(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
145    
146            /**
147            * Performs a dynamic query on the database and returns a range of the matching rows.
148            *
149            * <p>
150            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
151            * </p>
152            *
153            * @param dynamicQuery the dynamic query
154            * @param start the lower bound of the range of model instances
155            * @param end the upper bound of the range of model instances (not inclusive)
156            * @return the range of matching rows
157            */
158            public <T> java.util.List<T> dynamicQuery(
159                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
160                    int end);
161    
162            /**
163            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
164            *
165            * <p>
166            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
167            * </p>
168            *
169            * @param dynamicQuery the dynamic query
170            * @param start the lower bound of the range of model instances
171            * @param end the upper bound of the range of model instances (not inclusive)
172            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
173            * @return the ordered range of matching rows
174            */
175            public <T> java.util.List<T> dynamicQuery(
176                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
177                    int end,
178                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
179    
180            /**
181            * Returns the number of rows matching the dynamic query.
182            *
183            * @param dynamicQuery the dynamic query
184            * @return the number of rows matching the dynamic query
185            */
186            public long dynamicQueryCount(
187                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
188    
189            /**
190            * Returns the number of rows matching the dynamic query.
191            *
192            * @param dynamicQuery the dynamic query
193            * @param projection the projection to apply to the query
194            * @return the number of rows matching the dynamic query
195            */
196            public long dynamicQueryCount(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
198                    com.liferay.portal.kernel.dao.orm.Projection projection);
199    
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public com.liferay.portlet.announcements.model.AnnouncementsEntry fetchAnnouncementsEntry(
202                    long entryId);
203    
204            /**
205            * Returns the announcements entry with the matching UUID and company.
206            *
207            * @param uuid the announcements entry's UUID
208            * @param companyId the primary key of the company
209            * @return the matching announcements entry, or <code>null</code> if a matching announcements entry could not be found
210            */
211            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212            public com.liferay.portlet.announcements.model.AnnouncementsEntry fetchAnnouncementsEntryByUuidAndCompanyId(
213                    java.lang.String uuid, long companyId);
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
217    
218            /**
219            * Returns a range of all the announcements entries.
220            *
221            * <p>
222            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
223            * </p>
224            *
225            * @param start the lower bound of the range of announcements entries
226            * @param end the upper bound of the range of announcements entries (not inclusive)
227            * @return the range of announcements entries
228            */
229            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getAnnouncementsEntries(
231                    int start, int end);
232    
233            /**
234            * Returns the number of announcements entries.
235            *
236            * @return the number of announcements entries
237            */
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public int getAnnouncementsEntriesCount();
240    
241            /**
242            * Returns the announcements entry with the primary key.
243            *
244            * @param entryId the primary key of the announcements entry
245            * @return the announcements entry
246            * @throws PortalException if a announcements entry with the primary key could not be found
247            */
248            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249            public com.liferay.portlet.announcements.model.AnnouncementsEntry getAnnouncementsEntry(
250                    long entryId)
251                    throws com.liferay.portal.kernel.exception.PortalException;
252    
253            /**
254            * Returns the announcements entry with the matching UUID and company.
255            *
256            * @param uuid the announcements entry's UUID
257            * @param companyId the primary key of the company
258            * @return the matching announcements entry
259            * @throws PortalException if a matching announcements entry could not be found
260            */
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public com.liferay.portlet.announcements.model.AnnouncementsEntry getAnnouncementsEntryByUuidAndCompanyId(
263                    java.lang.String uuid, long companyId)
264                    throws com.liferay.portal.kernel.exception.PortalException;
265    
266            /**
267            * Returns the Spring bean ID for this bean.
268            *
269            * @return the Spring bean ID for this bean
270            */
271            public java.lang.String getBeanIdentifier();
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
275                    long classNameId, long classPK, boolean alert, int start, int end);
276    
277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
279                    long userId, long classNameId, long[] classPKs, int displayDateMonth,
280                    int displayDateDay, int displayDateYear, int displayDateHour,
281                    int displayDateMinute, int expirationDateMonth, int expirationDateDay,
282                    int expirationDateYear, int expirationDateHour,
283                    int expirationDateMinute, boolean alert, int flagValue, int start,
284                    int end);
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
288                    long userId, java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
289                    boolean alert, int flagValue, int start, int end);
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
293                    long userId, java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
294                    int displayDateMonth, int displayDateDay, int displayDateYear,
295                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
296                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
297                    int expirationDateMinute, boolean alert, int flagValue, int start,
298                    int end);
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public int getEntriesCount(long classNameId, long classPK, boolean alert);
302    
303            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304            public int getEntriesCount(long userId, long classNameId, long[] classPKs,
305                    boolean alert, int flagValue);
306    
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public int getEntriesCount(long userId, long classNameId, long[] classPKs,
309                    int displayDateMonth, int displayDateDay, int displayDateYear,
310                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
311                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
312                    int expirationDateMinute, boolean alert, int flagValue);
313    
314            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315            public int getEntriesCount(long userId,
316                    java.util.LinkedHashMap<java.lang.Long, long[]> scopes, boolean alert,
317                    int flagValue);
318    
319            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320            public int getEntriesCount(long userId,
321                    java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
322                    int displayDateMonth, int displayDateDay, int displayDateYear,
323                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
324                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
325                    int expirationDateMinute, boolean alert, int flagValue);
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public com.liferay.portlet.announcements.model.AnnouncementsEntry getEntry(
329                    long entryId)
330                    throws com.liferay.portal.kernel.exception.PortalException;
331    
332            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
334                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
335    
336            @Override
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public com.liferay.portal.model.PersistedModel getPersistedModel(
339                    java.io.Serializable primaryKeyObj)
340                    throws com.liferay.portal.kernel.exception.PortalException;
341    
342            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
343            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getUserEntries(
344                    long userId, int start, int end);
345    
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public int getUserEntriesCount(long userId);
348    
349            /**
350            * Sets the Spring bean ID for this bean.
351            *
352            * @param beanIdentifier the Spring bean ID for this bean
353            */
354            public void setBeanIdentifier(java.lang.String beanIdentifier);
355    
356            /**
357            * Updates the announcements entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
358            *
359            * @param announcementsEntry the announcements entry
360            * @return the announcements entry that was updated
361            */
362            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
363            public com.liferay.portlet.announcements.model.AnnouncementsEntry updateAnnouncementsEntry(
364                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry);
365    
366            public com.liferay.portlet.announcements.model.AnnouncementsEntry updateEntry(
367                    long userId, long entryId, java.lang.String title,
368                    java.lang.String content, java.lang.String url, java.lang.String type,
369                    int displayDateMonth, int displayDateDay, int displayDateYear,
370                    int displayDateHour, int displayDateMinute, boolean displayImmediately,
371                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
372                    int expirationDateHour, int expirationDateMinute, int priority)
373                    throws com.liferay.portal.kernel.exception.PortalException;
374    }