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 com.liferay.portlet.messageboards.model.MBThreadFlag addThreadFlag(
063                    long userId, com.liferay.portlet.messageboards.model.MBThread thread,
064                    com.liferay.portal.service.ServiceContext serviceContext)
065                    throws 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) throws PortalException;
096    
097            /**
098            * @throws PortalException
099            */
100            @Override
101            public com.liferay.portal.model.PersistedModel deletePersistedModel(
102                    com.liferay.portal.model.PersistedModel persistedModel)
103                    throws PortalException;
104    
105            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
106            public void deleteThreadFlag(
107                    com.liferay.portlet.messageboards.model.MBThreadFlag threadFlag);
108    
109            public void deleteThreadFlag(long threadFlagId) throws PortalException;
110    
111            public void deleteThreadFlagsByThreadId(long threadId);
112    
113            public void deleteThreadFlagsByUserId(long userId);
114    
115            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
116    
117            /**
118            * Performs a dynamic query on the database and returns the matching rows.
119            *
120            * @param dynamicQuery the dynamic query
121            * @return the matching rows
122            */
123            public <T> java.util.List<T> dynamicQuery(
124                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
125    
126            /**
127            * Performs a dynamic query on the database and returns a 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.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.
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            * @return the range of matching rows
137            */
138            public <T> java.util.List<T> dynamicQuery(
139                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
140                    int end);
141    
142            /**
143            * Performs a dynamic query on the database and returns an ordered 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.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.
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            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
153            * @return the ordered range of matching rows
154            */
155            public <T> java.util.List<T> dynamicQuery(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
157                    int end,
158                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
159    
160            /**
161            * Returns the number of rows matching the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @return the number of rows matching the dynamic query
165            */
166            public long dynamicQueryCount(
167                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
168    
169            /**
170            * Returns the number of rows matching the dynamic query.
171            *
172            * @param dynamicQuery the dynamic query
173            * @param projection the projection to apply to the query
174            * @return the number of rows matching the dynamic query
175            */
176            public long dynamicQueryCount(
177                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
178                    com.liferay.portal.kernel.dao.orm.Projection projection);
179    
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchMBThreadFlag(
182                    long threadFlagId);
183    
184            /**
185            * Returns the message boards thread flag matching the UUID and group.
186            *
187            * @param uuid the message boards thread flag's UUID
188            * @param groupId the primary key of the group
189            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
190            */
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchMBThreadFlagByUuidAndGroupId(
193                    java.lang.String uuid, long groupId);
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
197    
198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
200                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
201    
202            /**
203            * Returns the message boards thread flag with the primary key.
204            *
205            * @param threadFlagId the primary key of the message boards thread flag
206            * @return the message boards thread flag
207            * @throws PortalException if a message boards thread flag with the primary key could not be found
208            */
209            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210            public com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlag(
211                    long threadFlagId) throws PortalException;
212    
213            /**
214            * Returns the message boards thread flag matching the UUID and group.
215            *
216            * @param uuid the message boards thread flag's UUID
217            * @param groupId the primary key of the group
218            * @return the matching message boards thread flag
219            * @throws PortalException if a matching message boards thread flag could not be found
220            */
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlagByUuidAndGroupId(
223                    java.lang.String uuid, long groupId) throws PortalException;
224    
225            /**
226            * Returns a range of all the message boards thread flags.
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.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.
230            * </p>
231            *
232            * @param start the lower bound of the range of message boards thread flags
233            * @param end the upper bound of the range of message boards thread flags (not inclusive)
234            * @return the range of message boards thread flags
235            */
236            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlags(
238                    int start, int end);
239    
240            /**
241            * Returns all the message boards thread flags matching the UUID and company.
242            *
243            * @param uuid the UUID of the message boards thread flags
244            * @param companyId the primary key of the company
245            * @return the matching message boards thread flags, or an empty list if no matches were found
246            */
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
249                    java.lang.String uuid, long companyId);
250    
251            /**
252            * Returns a range of 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            * @param start the lower bound of the range of message boards thread flags
257            * @param end the upper bound of the range of message boards thread flags (not inclusive)
258            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
259            * @return the range of matching message boards thread flags, or an empty list if no matches were found
260            */
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
263                    java.lang.String uuid, long companyId, int start, int end,
264                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThreadFlag> orderByComparator);
265    
266            /**
267            * Returns the number of message boards thread flags.
268            *
269            * @return the number of message boards thread flags
270            */
271            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272            public int getMBThreadFlagsCount();
273    
274            /**
275            * Returns the OSGi service identifier.
276            *
277            * @return the OSGi service identifier
278            */
279            public java.lang.String getOSGiServiceIdentifier();
280    
281            @Override
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public com.liferay.portal.model.PersistedModel getPersistedModel(
284                    java.io.Serializable primaryKeyObj) throws PortalException;
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public com.liferay.portlet.messageboards.model.MBThreadFlag getThreadFlag(
288                    long userId, com.liferay.portlet.messageboards.model.MBThread thread)
289                    throws PortalException;
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public boolean hasThreadFlag(long userId,
293                    com.liferay.portlet.messageboards.model.MBThread thread)
294                    throws PortalException;
295    
296            /**
297            * Updates the message boards thread flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
298            *
299            * @param mbThreadFlag the message boards thread flag
300            * @return the message boards thread flag that was updated
301            */
302            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
303            public com.liferay.portlet.messageboards.model.MBThreadFlag updateMBThreadFlag(
304                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag);
305    }