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