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