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