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 AnnouncementsDelivery. 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 AnnouncementsDeliveryLocalServiceUtil
036     * @see com.liferay.portlet.announcements.service.base.AnnouncementsDeliveryLocalServiceBaseImpl
037     * @see com.liferay.portlet.announcements.service.impl.AnnouncementsDeliveryLocalServiceImpl
038     * @generated
039     */
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface AnnouncementsDeliveryLocalService extends BaseLocalService,
044            PersistedModelLocalService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link AnnouncementsDeliveryLocalServiceUtil} to access the announcements delivery local service. Add custom service methods to {@link com.liferay.portlet.announcements.service.impl.AnnouncementsDeliveryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050    
051            /**
052            * Adds the announcements delivery to the database. Also notifies the appropriate model listeners.
053            *
054            * @param announcementsDelivery the announcements delivery
055            * @return the announcements delivery that was added
056            */
057            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
058            public com.liferay.portlet.announcements.model.AnnouncementsDelivery addAnnouncementsDelivery(
059                    com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery);
060    
061            public com.liferay.portlet.announcements.model.AnnouncementsDelivery addUserDelivery(
062                    long userId, java.lang.String type)
063                    throws com.liferay.portal.kernel.exception.PortalException;
064    
065            /**
066            * Creates a new announcements delivery with the primary key. Does not add the announcements delivery to the database.
067            *
068            * @param deliveryId the primary key for the new announcements delivery
069            * @return the new announcements delivery
070            */
071            public com.liferay.portlet.announcements.model.AnnouncementsDelivery createAnnouncementsDelivery(
072                    long deliveryId);
073    
074            /**
075            * Deletes the announcements delivery from the database. Also notifies the appropriate model listeners.
076            *
077            * @param announcementsDelivery the announcements delivery
078            * @return the announcements delivery that was removed
079            */
080            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
081            public com.liferay.portlet.announcements.model.AnnouncementsDelivery deleteAnnouncementsDelivery(
082                    com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery);
083    
084            /**
085            * Deletes the announcements delivery with the primary key from the database. Also notifies the appropriate model listeners.
086            *
087            * @param deliveryId the primary key of the announcements delivery
088            * @return the announcements delivery that was removed
089            * @throws PortalException if a announcements delivery with the primary key could not be found
090            */
091            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
092            public com.liferay.portlet.announcements.model.AnnouncementsDelivery deleteAnnouncementsDelivery(
093                    long deliveryId)
094                    throws com.liferay.portal.kernel.exception.PortalException;
095    
096            public void deleteDeliveries(long userId);
097    
098            public void deleteDelivery(
099                    com.liferay.portlet.announcements.model.AnnouncementsDelivery delivery);
100    
101            public void deleteDelivery(long deliveryId)
102                    throws com.liferay.portal.kernel.exception.PortalException;
103    
104            public void deleteDelivery(long userId, java.lang.String type);
105    
106            /**
107            * @throws PortalException
108            */
109            @Override
110            public com.liferay.portal.model.PersistedModel deletePersistedModel(
111                    com.liferay.portal.model.PersistedModel persistedModel)
112                    throws com.liferay.portal.kernel.exception.PortalException;
113    
114            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
115    
116            /**
117            * Performs a dynamic query on the database and returns the matching rows.
118            *
119            * @param dynamicQuery the dynamic query
120            * @return the matching rows
121            */
122            public <T> java.util.List<T> dynamicQuery(
123                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
124    
125            /**
126            * Performs a dynamic query on the database and returns a range of the matching rows.
127            *
128            * <p>
129            * 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.AnnouncementsDeliveryModelImpl}. 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.
130            * </p>
131            *
132            * @param dynamicQuery the dynamic query
133            * @param start the lower bound of the range of model instances
134            * @param end the upper bound of the range of model instances (not inclusive)
135            * @return the range of matching rows
136            */
137            public <T> java.util.List<T> dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139                    int end);
140    
141            /**
142            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
143            *
144            * <p>
145            * 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.AnnouncementsDeliveryModelImpl}. 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.
146            * </p>
147            *
148            * @param dynamicQuery the dynamic query
149            * @param start the lower bound of the range of model instances
150            * @param end the upper bound of the range of model instances (not inclusive)
151            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
152            * @return the ordered 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                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
158    
159            /**
160            * Returns the number of rows matching the dynamic query.
161            *
162            * @param dynamicQuery the dynamic query
163            * @return the number of rows matching the dynamic query
164            */
165            public long dynamicQueryCount(
166                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
167    
168            /**
169            * Returns the number of rows matching the dynamic query.
170            *
171            * @param dynamicQuery the dynamic query
172            * @param projection the projection to apply to the query
173            * @return the number of rows matching the dynamic query
174            */
175            public long dynamicQueryCount(
176                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
177                    com.liferay.portal.kernel.dao.orm.Projection projection);
178    
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchAnnouncementsDelivery(
181                    long deliveryId);
182    
183            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
185    
186            /**
187            * Returns a range of all the announcements deliveries.
188            *
189            * <p>
190            * 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.AnnouncementsDeliveryModelImpl}. 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.
191            * </p>
192            *
193            * @param start the lower bound of the range of announcements deliveries
194            * @param end the upper bound of the range of announcements deliveries (not inclusive)
195            * @return the range of announcements deliveries
196            */
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> getAnnouncementsDeliveries(
199                    int start, int end);
200    
201            /**
202            * Returns the number of announcements deliveries.
203            *
204            * @return the number of announcements deliveries
205            */
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public int getAnnouncementsDeliveriesCount();
208    
209            /**
210            * Returns the announcements delivery with the primary key.
211            *
212            * @param deliveryId the primary key of the announcements delivery
213            * @return the announcements delivery
214            * @throws PortalException if a announcements delivery with the primary key could not be found
215            */
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public com.liferay.portlet.announcements.model.AnnouncementsDelivery getAnnouncementsDelivery(
218                    long deliveryId)
219                    throws com.liferay.portal.kernel.exception.PortalException;
220    
221            /**
222            * Returns the Spring bean ID for this bean.
223            *
224            * @return the Spring bean ID for this bean
225            */
226            public java.lang.String getBeanIdentifier();
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public com.liferay.portlet.announcements.model.AnnouncementsDelivery getDelivery(
230                    long deliveryId)
231                    throws com.liferay.portal.kernel.exception.PortalException;
232    
233            @Override
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public com.liferay.portal.model.PersistedModel getPersistedModel(
236                    java.io.Serializable primaryKeyObj)
237                    throws com.liferay.portal.kernel.exception.PortalException;
238    
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> getUserDeliveries(
241                    long userId) throws com.liferay.portal.kernel.exception.PortalException;
242    
243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244            public com.liferay.portlet.announcements.model.AnnouncementsDelivery getUserDelivery(
245                    long userId, java.lang.String type)
246                    throws com.liferay.portal.kernel.exception.PortalException;
247    
248            /**
249            * Sets the Spring bean ID for this bean.
250            *
251            * @param beanIdentifier the Spring bean ID for this bean
252            */
253            public void setBeanIdentifier(java.lang.String beanIdentifier);
254    
255            /**
256            * Updates the announcements delivery in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
257            *
258            * @param announcementsDelivery the announcements delivery
259            * @return the announcements delivery that was updated
260            */
261            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
262            public com.liferay.portlet.announcements.model.AnnouncementsDelivery updateAnnouncementsDelivery(
263                    com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery);
264    
265            public com.liferay.portlet.announcements.model.AnnouncementsDelivery updateDelivery(
266                    long userId, java.lang.String type, boolean email, boolean sms,
267                    boolean website)
268                    throws com.liferay.portal.kernel.exception.PortalException;
269    }