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