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.messageboards.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.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for MBThreadFlag. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see MBThreadFlagLocalServiceUtil
037     * @see com.liferay.portlet.messageboards.service.base.MBThreadFlagLocalServiceBaseImpl
038     * @see com.liferay.portlet.messageboards.service.impl.MBThreadFlagLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface MBThreadFlagLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link MBThreadFlagLocalServiceUtil} to access the message boards thread flag local service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBThreadFlagLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051    
052            /**
053            * Adds the message boards thread flag to the database. Also notifies the appropriate model listeners.
054            *
055            * @param mbThreadFlag the message boards thread flag
056            * @return the message boards thread flag that was added
057            */
058            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
059            public com.liferay.portlet.messageboards.model.MBThreadFlag addMBThreadFlag(
060                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag);
061    
062            public void addThreadFlag(long userId,
063                    com.liferay.portlet.messageboards.model.MBThread thread,
064                    com.liferay.portal.service.ServiceContext serviceContext)
065                    throws com.liferay.portal.kernel.exception.PortalException;
066    
067            /**
068            * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database.
069            *
070            * @param threadFlagId the primary key for the new message boards thread flag
071            * @return the new message boards thread flag
072            */
073            public com.liferay.portlet.messageboards.model.MBThreadFlag createMBThreadFlag(
074                    long threadFlagId);
075    
076            /**
077            * Deletes the message boards thread flag from the database. Also notifies the appropriate model listeners.
078            *
079            * @param mbThreadFlag the message boards thread flag
080            * @return the message boards thread flag that was removed
081            */
082            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
083            public com.liferay.portlet.messageboards.model.MBThreadFlag deleteMBThreadFlag(
084                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag);
085    
086            /**
087            * Deletes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners.
088            *
089            * @param threadFlagId the primary key of the message boards thread flag
090            * @return the message boards thread flag that was removed
091            * @throws PortalException if a message boards thread flag with the primary key could not be found
092            */
093            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
094            public com.liferay.portlet.messageboards.model.MBThreadFlag deleteMBThreadFlag(
095                    long threadFlagId)
096                    throws com.liferay.portal.kernel.exception.PortalException;
097    
098            /**
099            * @throws PortalException
100            */
101            @Override
102            public com.liferay.portal.model.PersistedModel deletePersistedModel(
103                    com.liferay.portal.model.PersistedModel persistedModel)
104                    throws com.liferay.portal.kernel.exception.PortalException;
105    
106            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
107            public void deleteThreadFlag(
108                    com.liferay.portlet.messageboards.model.MBThreadFlag threadFlag);
109    
110            public void deleteThreadFlag(long threadFlagId)
111                    throws com.liferay.portal.kernel.exception.PortalException;
112    
113            public void deleteThreadFlagsByThreadId(long threadId);
114    
115            public void deleteThreadFlagsByUserId(long userId);
116    
117            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
118    
119            /**
120            * Performs a dynamic query on the database and returns the matching rows.
121            *
122            * @param dynamicQuery the dynamic query
123            * @return the matching rows
124            */
125            public <T> java.util.List<T> dynamicQuery(
126                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
127    
128            /**
129            * Performs a dynamic query on the database and returns a range of the matching rows.
130            *
131            * <p>
132            * 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.messageboards.model.impl.MBThreadFlagModelImpl}. 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.
133            * </p>
134            *
135            * @param dynamicQuery the dynamic query
136            * @param start the lower bound of the range of model instances
137            * @param end the upper bound of the range of model instances (not inclusive)
138            * @return the range of matching rows
139            */
140            public <T> java.util.List<T> dynamicQuery(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
142                    int end);
143    
144            /**
145            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
146            *
147            * <p>
148            * 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.messageboards.model.impl.MBThreadFlagModelImpl}. 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.
149            * </p>
150            *
151            * @param dynamicQuery the dynamic query
152            * @param start the lower bound of the range of model instances
153            * @param end the upper bound of the range of model instances (not inclusive)
154            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
155            * @return the ordered range of matching rows
156            */
157            public <T> java.util.List<T> dynamicQuery(
158                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
159                    int end,
160                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
161    
162            /**
163            * Returns the number of rows matching the dynamic query.
164            *
165            * @param dynamicQuery the dynamic query
166            * @return the number of rows matching the dynamic query
167            */
168            public long dynamicQueryCount(
169                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
170    
171            /**
172            * Returns the number of rows matching the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @param projection the projection to apply to the query
176            * @return the number of rows matching the dynamic query
177            */
178            public long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
180                    com.liferay.portal.kernel.dao.orm.Projection projection);
181    
182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchMBThreadFlag(
184                    long threadFlagId);
185    
186            /**
187            * Returns the message boards thread flag matching the UUID and group.
188            *
189            * @param uuid the message boards thread flag's UUID
190            * @param groupId the primary key of the group
191            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
192            */
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchMBThreadFlagByUuidAndGroupId(
195                    java.lang.String uuid, long groupId);
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
199    
200            /**
201            * Returns the Spring bean ID for this bean.
202            *
203            * @return the Spring bean ID for this bean
204            */
205            public java.lang.String getBeanIdentifier();
206    
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
209                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
210    
211            /**
212            * Returns the message boards thread flag with the primary key.
213            *
214            * @param threadFlagId the primary key of the message boards thread flag
215            * @return the message boards thread flag
216            * @throws PortalException if a message boards thread flag with the primary key could not be found
217            */
218            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219            public com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlag(
220                    long threadFlagId)
221                    throws com.liferay.portal.kernel.exception.PortalException;
222    
223            /**
224            * Returns the message boards thread flag matching the UUID and group.
225            *
226            * @param uuid the message boards thread flag's UUID
227            * @param groupId the primary key of the group
228            * @return the matching message boards thread flag
229            * @throws PortalException if a matching message boards thread flag could not be found
230            */
231            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232            public com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlagByUuidAndGroupId(
233                    java.lang.String uuid, long groupId)
234                    throws com.liferay.portal.kernel.exception.PortalException;
235    
236            /**
237            * Returns a range of all the message boards thread flags.
238            *
239            * <p>
240            * 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.messageboards.model.impl.MBThreadFlagModelImpl}. 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.
241            * </p>
242            *
243            * @param start the lower bound of the range of message boards thread flags
244            * @param end the upper bound of the range of message boards thread flags (not inclusive)
245            * @return the range of message boards thread flags
246            */
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlags(
249                    int start, int end);
250    
251            /**
252            * Returns all the message boards thread flags matching the UUID and company.
253            *
254            * @param uuid the UUID of the message boards thread flags
255            * @param companyId the primary key of the company
256            * @return the matching message boards thread flags, or an empty list if no matches were found
257            */
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
260                    java.lang.String uuid, long companyId);
261    
262            /**
263            * Returns a range of message boards thread flags matching the UUID and company.
264            *
265            * @param uuid the UUID of the message boards thread flags
266            * @param companyId the primary key of the company
267            * @param start the lower bound of the range of message boards thread flags
268            * @param end the upper bound of the range of message boards thread flags (not inclusive)
269            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
270            * @return the range of matching message boards thread flags, or an empty list if no matches were found
271            */
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
274                    java.lang.String uuid, long companyId, int start, int end,
275                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThreadFlag> orderByComparator);
276    
277            /**
278            * Returns the number of message boards thread flags.
279            *
280            * @return the number of message boards thread flags
281            */
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public int getMBThreadFlagsCount();
284    
285            @Override
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public com.liferay.portal.model.PersistedModel getPersistedModel(
288                    java.io.Serializable primaryKeyObj)
289                    throws com.liferay.portal.kernel.exception.PortalException;
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public com.liferay.portlet.messageboards.model.MBThreadFlag getThreadFlag(
293                    long userId, com.liferay.portlet.messageboards.model.MBThread thread)
294                    throws com.liferay.portal.kernel.exception.PortalException;
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public boolean hasThreadFlag(long userId,
298                    com.liferay.portlet.messageboards.model.MBThread thread)
299                    throws com.liferay.portal.kernel.exception.PortalException;
300    
301            /**
302            * Sets the Spring bean ID for this bean.
303            *
304            * @param beanIdentifier the Spring bean ID for this bean
305            */
306            public void setBeanIdentifier(java.lang.String beanIdentifier);
307    
308            /**
309            * Updates the message boards thread flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
310            *
311            * @param mbThreadFlag the message boards thread flag
312            * @return the message boards thread flag that was updated
313            */
314            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
315            public com.liferay.portlet.messageboards.model.MBThreadFlag updateMBThreadFlag(
316                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag);
317    }