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) throws PortalException;
069    
070            /**
071            * @deprecated As of 6.2.0, replaced by {@link #addEntry(long, long, long,
072            String, String, String, String, int, int, int, int, int,
073            boolean, int, int, int, int, int, int, boolean)}
074            */
075            @java.lang.Deprecated
076            public com.liferay.portlet.announcements.model.AnnouncementsEntry addEntry(
077                    long userId, long classNameId, long classPK, java.lang.String title,
078                    java.lang.String content, java.lang.String url, java.lang.String type,
079                    int displayDateMonth, int displayDateDay, int displayDateYear,
080                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
081                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
082                    int expirationDateMinute, int priority, boolean alert)
083                    throws PortalException;
084    
085            public void checkEntries() throws PortalException;
086    
087            /**
088            * Creates a new announcements entry with the primary key. Does not add the announcements entry to the database.
089            *
090            * @param entryId the primary key for the new announcements entry
091            * @return the new announcements entry
092            */
093            public com.liferay.portlet.announcements.model.AnnouncementsEntry createAnnouncementsEntry(
094                    long entryId);
095    
096            /**
097            * Deletes the announcements entry from the database. Also notifies the appropriate model listeners.
098            *
099            * @param announcementsEntry the announcements entry
100            * @return the announcements entry that was removed
101            */
102            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
103            public com.liferay.portlet.announcements.model.AnnouncementsEntry deleteAnnouncementsEntry(
104                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry);
105    
106            /**
107            * Deletes the announcements entry with the primary key from the database. Also notifies the appropriate model listeners.
108            *
109            * @param entryId the primary key of the announcements entry
110            * @return the announcements entry that was removed
111            * @throws PortalException if a announcements entry with the primary key could not be found
112            */
113            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
114            public com.liferay.portlet.announcements.model.AnnouncementsEntry deleteAnnouncementsEntry(
115                    long entryId) throws PortalException;
116    
117            public void deleteEntry(
118                    com.liferay.portlet.announcements.model.AnnouncementsEntry entry)
119                    throws PortalException;
120    
121            public void deleteEntry(long entryId) throws PortalException;
122    
123            /**
124            * @throws PortalException
125            */
126            @Override
127            public com.liferay.portal.model.PersistedModel deletePersistedModel(
128                    com.liferay.portal.model.PersistedModel persistedModel)
129                    throws PortalException;
130    
131            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
132    
133            /**
134            * Performs a dynamic query on the database and returns the matching rows.
135            *
136            * @param dynamicQuery the dynamic query
137            * @return the matching rows
138            */
139            public <T> java.util.List<T> dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
141    
142            /**
143            * Performs a dynamic query on the database and returns a range of the matching rows.
144            *
145            * <p>
146            * 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.
147            * </p>
148            *
149            * @param dynamicQuery the dynamic query
150            * @param start the lower bound of the range of model instances
151            * @param end the upper bound of the range of model instances (not inclusive)
152            * @return the range of matching rows
153            */
154            public <T> java.util.List<T> dynamicQuery(
155                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
156                    int end);
157    
158            /**
159            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
160            *
161            * <p>
162            * 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.
163            * </p>
164            *
165            * @param dynamicQuery the dynamic query
166            * @param start the lower bound of the range of model instances
167            * @param end the upper bound of the range of model instances (not inclusive)
168            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
169            * @return the ordered range of matching rows
170            */
171            public <T> java.util.List<T> dynamicQuery(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
173                    int end,
174                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
175    
176            /**
177            * Returns the number of rows matching the dynamic query.
178            *
179            * @param dynamicQuery the dynamic query
180            * @return the number of rows matching the dynamic query
181            */
182            public long dynamicQueryCount(
183                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
184    
185            /**
186            * Returns the number of rows matching the dynamic query.
187            *
188            * @param dynamicQuery the dynamic query
189            * @param projection the projection to apply to the query
190            * @return the number of rows matching the dynamic query
191            */
192            public long dynamicQueryCount(
193                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
194                    com.liferay.portal.kernel.dao.orm.Projection projection);
195    
196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197            public com.liferay.portlet.announcements.model.AnnouncementsEntry fetchAnnouncementsEntry(
198                    long entryId);
199    
200            /**
201            * Returns the announcements entry with the matching UUID and company.
202            *
203            * @param uuid the announcements entry's UUID
204            * @param companyId the primary key of the company
205            * @return the matching announcements entry, or <code>null</code> if a matching announcements entry could not be found
206            */
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public com.liferay.portlet.announcements.model.AnnouncementsEntry fetchAnnouncementsEntryByUuidAndCompanyId(
209                    java.lang.String uuid, long companyId);
210    
211            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
213    
214            /**
215            * Returns a range of all the announcements entries.
216            *
217            * <p>
218            * 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.
219            * </p>
220            *
221            * @param start the lower bound of the range of announcements entries
222            * @param end the upper bound of the range of announcements entries (not inclusive)
223            * @return the range of announcements entries
224            */
225            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getAnnouncementsEntries(
227                    int start, int end);
228    
229            /**
230            * Returns the number of announcements entries.
231            *
232            * @return the number of announcements entries
233            */
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public int getAnnouncementsEntriesCount();
236    
237            /**
238            * Returns the announcements entry with the primary key.
239            *
240            * @param entryId the primary key of the announcements entry
241            * @return the announcements entry
242            * @throws PortalException if a announcements entry with the primary key could not be found
243            */
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public com.liferay.portlet.announcements.model.AnnouncementsEntry getAnnouncementsEntry(
246                    long entryId) throws PortalException;
247    
248            /**
249            * Returns the announcements entry with the matching UUID and company.
250            *
251            * @param uuid the announcements entry's UUID
252            * @param companyId the primary key of the company
253            * @return the matching announcements entry
254            * @throws PortalException if a matching announcements entry could not be found
255            */
256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257            public com.liferay.portlet.announcements.model.AnnouncementsEntry getAnnouncementsEntryByUuidAndCompanyId(
258                    java.lang.String uuid, long companyId) throws PortalException;
259    
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
262                    long classNameId, long classPK, boolean alert, int start, int end);
263    
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
266                    long userId, long classNameId, long[] classPKs, int displayDateMonth,
267                    int displayDateDay, int displayDateYear, int displayDateHour,
268                    int displayDateMinute, int expirationDateMonth, int expirationDateDay,
269                    int expirationDateYear, int expirationDateHour,
270                    int expirationDateMinute, boolean alert, int flagValue, int start,
271                    int end);
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
275                    long userId, java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
276                    boolean alert, int flagValue, int start, int end);
277    
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
280                    long userId, java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
281                    int displayDateMonth, int displayDateDay, int displayDateYear,
282                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
283                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
284                    int expirationDateMinute, boolean alert, int flagValue, int start,
285                    int end);
286    
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public int getEntriesCount(long classNameId, long classPK, boolean alert);
289    
290            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
291            public int getEntriesCount(long userId, long classNameId, long[] classPKs,
292                    boolean alert, int flagValue);
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public int getEntriesCount(long userId, long classNameId, long[] classPKs,
296                    int displayDateMonth, int displayDateDay, int displayDateYear,
297                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
298                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
299                    int expirationDateMinute, boolean alert, int flagValue);
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public int getEntriesCount(long userId,
303                    java.util.LinkedHashMap<java.lang.Long, long[]> scopes, boolean alert,
304                    int flagValue);
305    
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public int getEntriesCount(long userId,
308                    java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
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 com.liferay.portlet.announcements.model.AnnouncementsEntry getEntry(
316                    long entryId) throws PortalException;
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
320                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
324    
325            /**
326            * Returns the OSGi service identifier.
327            *
328            * @return the OSGi service identifier
329            */
330            public java.lang.String getOSGiServiceIdentifier();
331    
332            @Override
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public com.liferay.portal.model.PersistedModel getPersistedModel(
335                    java.io.Serializable primaryKeyObj) throws PortalException;
336    
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getUserEntries(
339                    long userId, int start, int end);
340    
341            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
342            public int getUserEntriesCount(long userId);
343    
344            /**
345            * Updates the announcements entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
346            *
347            * @param announcementsEntry the announcements entry
348            * @return the announcements entry that was updated
349            */
350            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
351            public com.liferay.portlet.announcements.model.AnnouncementsEntry updateAnnouncementsEntry(
352                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry);
353    
354            public com.liferay.portlet.announcements.model.AnnouncementsEntry updateEntry(
355                    long userId, long entryId, java.lang.String title,
356                    java.lang.String content, java.lang.String url, java.lang.String type,
357                    int displayDateMonth, int displayDateDay, int displayDateYear,
358                    int displayDateHour, int displayDateMinute, boolean displayImmediately,
359                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
360                    int expirationDateHour, int expirationDateMinute, int priority)
361                    throws PortalException;
362    }