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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
204    
205            /**
206            * Returns the message boards thread flag with the primary key.
207            *
208            * @param threadFlagId the primary key of the message boards thread flag
209            * @return the message boards thread flag
210            * @throws PortalException if a message boards thread flag with the primary key could not be found
211            */
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlag(
214                    long threadFlagId) throws PortalException;
215    
216            /**
217            * Returns the message boards thread flag matching the UUID and group.
218            *
219            * @param uuid the message boards thread flag's UUID
220            * @param groupId the primary key of the group
221            * @return the matching message boards thread flag
222            * @throws PortalException if a matching message boards thread flag could not be found
223            */
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlagByUuidAndGroupId(
226                    java.lang.String uuid, long groupId) throws PortalException;
227    
228            /**
229            * Returns a range of all the message boards thread flags.
230            *
231            * <p>
232            * 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.
233            * </p>
234            *
235            * @param start the lower bound of the range of message boards thread flags
236            * @param end the upper bound of the range of message boards thread flags (not inclusive)
237            * @return the range of message boards thread flags
238            */
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlags(
241                    int start, int end);
242    
243            /**
244            * Returns all the message boards thread flags matching the UUID and company.
245            *
246            * @param uuid the UUID of the message boards thread flags
247            * @param companyId the primary key of the company
248            * @return the matching message boards thread flags, or an empty list if no matches were found
249            */
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
252                    java.lang.String uuid, long companyId);
253    
254            /**
255            * Returns a range of message boards thread flags matching the UUID and company.
256            *
257            * @param uuid the UUID of the message boards thread flags
258            * @param companyId the primary key of the company
259            * @param start the lower bound of the range of message boards thread flags
260            * @param end the upper bound of the range of message boards thread flags (not inclusive)
261            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
262            * @return the range of matching message boards thread flags, or an empty list if no matches were found
263            */
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
266                    java.lang.String uuid, long companyId, int start, int end,
267                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThreadFlag> orderByComparator);
268    
269            /**
270            * Returns the number of message boards thread flags.
271            *
272            * @return the number of message boards thread flags
273            */
274            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275            public int getMBThreadFlagsCount();
276    
277            /**
278            * Returns the OSGi service identifier.
279            *
280            * @return the OSGi service identifier
281            */
282            public java.lang.String getOSGiServiceIdentifier();
283    
284            @Override
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public com.liferay.portal.model.PersistedModel getPersistedModel(
287                    java.io.Serializable primaryKeyObj) throws PortalException;
288    
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public com.liferay.portlet.messageboards.model.MBThreadFlag getThreadFlag(
291                    long userId, com.liferay.portlet.messageboards.model.MBThread thread)
292                    throws PortalException;
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public boolean hasThreadFlag(long userId,
296                    com.liferay.portlet.messageboards.model.MBThread thread)
297                    throws PortalException;
298    
299            /**
300            * Updates the message boards thread flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
301            *
302            * @param mbThreadFlag the message boards thread flag
303            * @return the message boards thread flag that was updated
304            */
305            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
306            public com.liferay.portlet.messageboards.model.MBThreadFlag updateMBThreadFlag(
307                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag);
308    }