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            /**
261            * Returns the Spring bean ID for this bean.
262            *
263            * @return the Spring bean ID for this bean
264            */
265            public java.lang.String getBeanIdentifier();
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
269                    long classNameId, long classPK, boolean alert, int start, int end);
270    
271            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
273                    long userId, long classNameId, long[] classPKs, int displayDateMonth,
274                    int displayDateDay, int displayDateYear, int displayDateHour,
275                    int displayDateMinute, int expirationDateMonth, int expirationDateDay,
276                    int expirationDateYear, int expirationDateHour,
277                    int expirationDateMinute, boolean alert, int flagValue, int start,
278                    int end);
279    
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
282                    long userId, java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
283                    boolean alert, int flagValue, int start, int end);
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getEntries(
287                    long userId, java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
288                    int displayDateMonth, int displayDateDay, int displayDateYear,
289                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
290                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
291                    int expirationDateMinute, boolean alert, int flagValue, int start,
292                    int end);
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public int getEntriesCount(long classNameId, long classPK, boolean alert);
296    
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public int getEntriesCount(long userId, long classNameId, long[] classPKs,
299                    boolean alert, int flagValue);
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public int getEntriesCount(long userId, long classNameId, long[] classPKs,
303                    int displayDateMonth, int displayDateDay, int displayDateYear,
304                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
305                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
306                    int expirationDateMinute, boolean alert, int flagValue);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public int getEntriesCount(long userId,
310                    java.util.LinkedHashMap<java.lang.Long, long[]> scopes, boolean alert,
311                    int flagValue);
312    
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public int getEntriesCount(long userId,
315                    java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
316                    int displayDateMonth, int displayDateDay, int displayDateYear,
317                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
318                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
319                    int expirationDateMinute, boolean alert, int flagValue);
320    
321            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322            public com.liferay.portlet.announcements.model.AnnouncementsEntry getEntry(
323                    long entryId) throws PortalException;
324    
325            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
327                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
328    
329            @Override
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public com.liferay.portal.model.PersistedModel getPersistedModel(
332                    java.io.Serializable primaryKeyObj) throws PortalException;
333    
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> getUserEntries(
336                    long userId, int start, int end);
337    
338            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339            public int getUserEntriesCount(long userId);
340    
341            /**
342            * Sets the Spring bean ID for this bean.
343            *
344            * @param beanIdentifier the Spring bean ID for this bean
345            */
346            public void setBeanIdentifier(java.lang.String beanIdentifier);
347    
348            /**
349            * Updates the announcements entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
350            *
351            * @param announcementsEntry the announcements entry
352            * @return the announcements entry that was updated
353            */
354            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
355            public com.liferay.portlet.announcements.model.AnnouncementsEntry updateAnnouncementsEntry(
356                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry);
357    
358            public com.liferay.portlet.announcements.model.AnnouncementsEntry updateEntry(
359                    long userId, long entryId, java.lang.String title,
360                    java.lang.String content, java.lang.String url, java.lang.String type,
361                    int displayDateMonth, int displayDateDay, int displayDateYear,
362                    int displayDateHour, int displayDateMinute, boolean displayImmediately,
363                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
364                    int expirationDateHour, int expirationDateMinute, int priority)
365                    throws PortalException;
366    }