001 /** 002 * Copyright (c) 2000-2011 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.social.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.social.model.SocialEquitySetting; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the social equity setting service. This utility wraps {@link SocialEquitySettingPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see SocialEquitySettingPersistence 037 * @see SocialEquitySettingPersistenceImpl 038 * @generated 039 */ 040 public class SocialEquitySettingUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(SocialEquitySetting socialEquitySetting) { 058 getPersistence().clearCache(socialEquitySetting); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<SocialEquitySetting> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<SocialEquitySetting> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<SocialEquitySetting> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 099 */ 100 public static SocialEquitySetting remove( 101 SocialEquitySetting socialEquitySetting) throws SystemException { 102 return getPersistence().remove(socialEquitySetting); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 107 */ 108 public static SocialEquitySetting update( 109 SocialEquitySetting socialEquitySetting, boolean merge) 110 throws SystemException { 111 return getPersistence().update(socialEquitySetting, merge); 112 } 113 114 /** 115 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 116 */ 117 public static SocialEquitySetting update( 118 SocialEquitySetting socialEquitySetting, boolean merge, 119 ServiceContext serviceContext) throws SystemException { 120 return getPersistence() 121 .update(socialEquitySetting, merge, serviceContext); 122 } 123 124 /** 125 * Caches the social equity setting in the entity cache if it is enabled. 126 * 127 * @param socialEquitySetting the social equity setting 128 */ 129 public static void cacheResult( 130 com.liferay.portlet.social.model.SocialEquitySetting socialEquitySetting) { 131 getPersistence().cacheResult(socialEquitySetting); 132 } 133 134 /** 135 * Caches the social equity settings in the entity cache if it is enabled. 136 * 137 * @param socialEquitySettings the social equity settings 138 */ 139 public static void cacheResult( 140 java.util.List<com.liferay.portlet.social.model.SocialEquitySetting> socialEquitySettings) { 141 getPersistence().cacheResult(socialEquitySettings); 142 } 143 144 /** 145 * Creates a new social equity setting with the primary key. Does not add the social equity setting to the database. 146 * 147 * @param equitySettingId the primary key for the new social equity setting 148 * @return the new social equity setting 149 */ 150 public static com.liferay.portlet.social.model.SocialEquitySetting create( 151 long equitySettingId) { 152 return getPersistence().create(equitySettingId); 153 } 154 155 /** 156 * Removes the social equity setting with the primary key from the database. Also notifies the appropriate model listeners. 157 * 158 * @param equitySettingId the primary key of the social equity setting 159 * @return the social equity setting that was removed 160 * @throws com.liferay.portlet.social.NoSuchEquitySettingException if a social equity setting with the primary key could not be found 161 * @throws SystemException if a system exception occurred 162 */ 163 public static com.liferay.portlet.social.model.SocialEquitySetting remove( 164 long equitySettingId) 165 throws com.liferay.portal.kernel.exception.SystemException, 166 com.liferay.portlet.social.NoSuchEquitySettingException { 167 return getPersistence().remove(equitySettingId); 168 } 169 170 public static com.liferay.portlet.social.model.SocialEquitySetting updateImpl( 171 com.liferay.portlet.social.model.SocialEquitySetting socialEquitySetting, 172 boolean merge) 173 throws com.liferay.portal.kernel.exception.SystemException { 174 return getPersistence().updateImpl(socialEquitySetting, merge); 175 } 176 177 /** 178 * Returns the social equity setting with the primary key or throws a {@link com.liferay.portlet.social.NoSuchEquitySettingException} if it could not be found. 179 * 180 * @param equitySettingId the primary key of the social equity setting 181 * @return the social equity setting 182 * @throws com.liferay.portlet.social.NoSuchEquitySettingException if a social equity setting with the primary key could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public static com.liferay.portlet.social.model.SocialEquitySetting findByPrimaryKey( 186 long equitySettingId) 187 throws com.liferay.portal.kernel.exception.SystemException, 188 com.liferay.portlet.social.NoSuchEquitySettingException { 189 return getPersistence().findByPrimaryKey(equitySettingId); 190 } 191 192 /** 193 * Returns the social equity setting with the primary key or returns <code>null</code> if it could not be found. 194 * 195 * @param equitySettingId the primary key of the social equity setting 196 * @return the social equity setting, or <code>null</code> if a social equity setting with the primary key could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 public static com.liferay.portlet.social.model.SocialEquitySetting fetchByPrimaryKey( 200 long equitySettingId) 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return getPersistence().fetchByPrimaryKey(equitySettingId); 203 } 204 205 /** 206 * Returns all the social equity settings where groupId = ? and classNameId = ? and actionId = ?. 207 * 208 * @param groupId the group ID 209 * @param classNameId the class name ID 210 * @param actionId the action ID 211 * @return the matching social equity settings 212 * @throws SystemException if a system exception occurred 213 */ 214 public static java.util.List<com.liferay.portlet.social.model.SocialEquitySetting> findByG_C_A( 215 long groupId, long classNameId, java.lang.String actionId) 216 throws com.liferay.portal.kernel.exception.SystemException { 217 return getPersistence().findByG_C_A(groupId, classNameId, actionId); 218 } 219 220 /** 221 * Returns a range of all the social equity settings where groupId = ? and classNameId = ? and actionId = ?. 222 * 223 * <p> 224 * 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. 225 * </p> 226 * 227 * @param groupId the group ID 228 * @param classNameId the class name ID 229 * @param actionId the action ID 230 * @param start the lower bound of the range of social equity settings 231 * @param end the upper bound of the range of social equity settings (not inclusive) 232 * @return the range of matching social equity settings 233 * @throws SystemException if a system exception occurred 234 */ 235 public static java.util.List<com.liferay.portlet.social.model.SocialEquitySetting> findByG_C_A( 236 long groupId, long classNameId, java.lang.String actionId, int start, 237 int end) throws com.liferay.portal.kernel.exception.SystemException { 238 return getPersistence() 239 .findByG_C_A(groupId, classNameId, actionId, start, end); 240 } 241 242 /** 243 * Returns an ordered range of all the social equity settings where groupId = ? and classNameId = ? and actionId = ?. 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. 247 * </p> 248 * 249 * @param groupId the group ID 250 * @param classNameId the class name ID 251 * @param actionId the action ID 252 * @param start the lower bound of the range of social equity settings 253 * @param end the upper bound of the range of social equity settings (not inclusive) 254 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 255 * @return the ordered range of matching social equity settings 256 * @throws SystemException if a system exception occurred 257 */ 258 public static java.util.List<com.liferay.portlet.social.model.SocialEquitySetting> findByG_C_A( 259 long groupId, long classNameId, java.lang.String actionId, int start, 260 int end, 261 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 262 throws com.liferay.portal.kernel.exception.SystemException { 263 return getPersistence() 264 .findByG_C_A(groupId, classNameId, actionId, start, end, 265 orderByComparator); 266 } 267 268 /** 269 * Returns the first social equity setting in the ordered set where groupId = ? and classNameId = ? and actionId = ?. 270 * 271 * <p> 272 * 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. 273 * </p> 274 * 275 * @param groupId the group ID 276 * @param classNameId the class name ID 277 * @param actionId the action ID 278 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 279 * @return the first matching social equity setting 280 * @throws com.liferay.portlet.social.NoSuchEquitySettingException if a matching social equity setting could not be found 281 * @throws SystemException if a system exception occurred 282 */ 283 public static com.liferay.portlet.social.model.SocialEquitySetting findByG_C_A_First( 284 long groupId, long classNameId, java.lang.String actionId, 285 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 286 throws com.liferay.portal.kernel.exception.SystemException, 287 com.liferay.portlet.social.NoSuchEquitySettingException { 288 return getPersistence() 289 .findByG_C_A_First(groupId, classNameId, actionId, 290 orderByComparator); 291 } 292 293 /** 294 * Returns the last social equity setting in the ordered set where groupId = ? and classNameId = ? and actionId = ?. 295 * 296 * <p> 297 * 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. 298 * </p> 299 * 300 * @param groupId the group ID 301 * @param classNameId the class name ID 302 * @param actionId the action ID 303 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 304 * @return the last matching social equity setting 305 * @throws com.liferay.portlet.social.NoSuchEquitySettingException if a matching social equity setting could not be found 306 * @throws SystemException if a system exception occurred 307 */ 308 public static com.liferay.portlet.social.model.SocialEquitySetting findByG_C_A_Last( 309 long groupId, long classNameId, java.lang.String actionId, 310 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 311 throws com.liferay.portal.kernel.exception.SystemException, 312 com.liferay.portlet.social.NoSuchEquitySettingException { 313 return getPersistence() 314 .findByG_C_A_Last(groupId, classNameId, actionId, 315 orderByComparator); 316 } 317 318 /** 319 * Returns the social equity settings before and after the current social equity setting in the ordered set where groupId = ? and classNameId = ? and actionId = ?. 320 * 321 * <p> 322 * 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. 323 * </p> 324 * 325 * @param equitySettingId the primary key of the current social equity setting 326 * @param groupId the group ID 327 * @param classNameId the class name ID 328 * @param actionId the action ID 329 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 330 * @return the previous, current, and next social equity setting 331 * @throws com.liferay.portlet.social.NoSuchEquitySettingException if a social equity setting with the primary key could not be found 332 * @throws SystemException if a system exception occurred 333 */ 334 public static com.liferay.portlet.social.model.SocialEquitySetting[] findByG_C_A_PrevAndNext( 335 long equitySettingId, long groupId, long classNameId, 336 java.lang.String actionId, 337 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 338 throws com.liferay.portal.kernel.exception.SystemException, 339 com.liferay.portlet.social.NoSuchEquitySettingException { 340 return getPersistence() 341 .findByG_C_A_PrevAndNext(equitySettingId, groupId, 342 classNameId, actionId, orderByComparator); 343 } 344 345 /** 346 * Returns the social equity setting where groupId = ? and classNameId = ? and actionId = ? and type = ? or throws a {@link com.liferay.portlet.social.NoSuchEquitySettingException} if it could not be found. 347 * 348 * @param groupId the group ID 349 * @param classNameId the class name ID 350 * @param actionId the action ID 351 * @param type the type 352 * @return the matching social equity setting 353 * @throws com.liferay.portlet.social.NoSuchEquitySettingException if a matching social equity setting could not be found 354 * @throws SystemException if a system exception occurred 355 */ 356 public static com.liferay.portlet.social.model.SocialEquitySetting findByG_C_A_T( 357 long groupId, long classNameId, java.lang.String actionId, int type) 358 throws com.liferay.portal.kernel.exception.SystemException, 359 com.liferay.portlet.social.NoSuchEquitySettingException { 360 return getPersistence() 361 .findByG_C_A_T(groupId, classNameId, actionId, type); 362 } 363 364 /** 365 * Returns the social equity setting where groupId = ? and classNameId = ? and actionId = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 366 * 367 * @param groupId the group ID 368 * @param classNameId the class name ID 369 * @param actionId the action ID 370 * @param type the type 371 * @return the matching social equity setting, or <code>null</code> if a matching social equity setting could not be found 372 * @throws SystemException if a system exception occurred 373 */ 374 public static com.liferay.portlet.social.model.SocialEquitySetting fetchByG_C_A_T( 375 long groupId, long classNameId, java.lang.String actionId, int type) 376 throws com.liferay.portal.kernel.exception.SystemException { 377 return getPersistence() 378 .fetchByG_C_A_T(groupId, classNameId, actionId, type); 379 } 380 381 /** 382 * Returns the social equity setting where groupId = ? and classNameId = ? and actionId = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 383 * 384 * @param groupId the group ID 385 * @param classNameId the class name ID 386 * @param actionId the action ID 387 * @param type the type 388 * @param retrieveFromCache whether to use the finder cache 389 * @return the matching social equity setting, or <code>null</code> if a matching social equity setting could not be found 390 * @throws SystemException if a system exception occurred 391 */ 392 public static com.liferay.portlet.social.model.SocialEquitySetting fetchByG_C_A_T( 393 long groupId, long classNameId, java.lang.String actionId, int type, 394 boolean retrieveFromCache) 395 throws com.liferay.portal.kernel.exception.SystemException { 396 return getPersistence() 397 .fetchByG_C_A_T(groupId, classNameId, actionId, type, 398 retrieveFromCache); 399 } 400 401 /** 402 * Returns all the social equity settings. 403 * 404 * @return the social equity settings 405 * @throws SystemException if a system exception occurred 406 */ 407 public static java.util.List<com.liferay.portlet.social.model.SocialEquitySetting> findAll() 408 throws com.liferay.portal.kernel.exception.SystemException { 409 return getPersistence().findAll(); 410 } 411 412 /** 413 * Returns a range of all the social equity settings. 414 * 415 * <p> 416 * 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. 417 * </p> 418 * 419 * @param start the lower bound of the range of social equity settings 420 * @param end the upper bound of the range of social equity settings (not inclusive) 421 * @return the range of social equity settings 422 * @throws SystemException if a system exception occurred 423 */ 424 public static java.util.List<com.liferay.portlet.social.model.SocialEquitySetting> findAll( 425 int start, int end) 426 throws com.liferay.portal.kernel.exception.SystemException { 427 return getPersistence().findAll(start, end); 428 } 429 430 /** 431 * Returns an ordered range of all the social equity settings. 432 * 433 * <p> 434 * 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. 435 * </p> 436 * 437 * @param start the lower bound of the range of social equity settings 438 * @param end the upper bound of the range of social equity settings (not inclusive) 439 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 440 * @return the ordered range of social equity settings 441 * @throws SystemException if a system exception occurred 442 */ 443 public static java.util.List<com.liferay.portlet.social.model.SocialEquitySetting> findAll( 444 int start, int end, 445 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 446 throws com.liferay.portal.kernel.exception.SystemException { 447 return getPersistence().findAll(start, end, orderByComparator); 448 } 449 450 /** 451 * Removes all the social equity settings where groupId = ? and classNameId = ? and actionId = ? from the database. 452 * 453 * @param groupId the group ID 454 * @param classNameId the class name ID 455 * @param actionId the action ID 456 * @throws SystemException if a system exception occurred 457 */ 458 public static void removeByG_C_A(long groupId, long classNameId, 459 java.lang.String actionId) 460 throws com.liferay.portal.kernel.exception.SystemException { 461 getPersistence().removeByG_C_A(groupId, classNameId, actionId); 462 } 463 464 /** 465 * Removes the social equity setting where groupId = ? and classNameId = ? and actionId = ? and type = ? from the database. 466 * 467 * @param groupId the group ID 468 * @param classNameId the class name ID 469 * @param actionId the action ID 470 * @param type the type 471 * @throws SystemException if a system exception occurred 472 */ 473 public static void removeByG_C_A_T(long groupId, long classNameId, 474 java.lang.String actionId, int type) 475 throws com.liferay.portal.kernel.exception.SystemException, 476 com.liferay.portlet.social.NoSuchEquitySettingException { 477 getPersistence().removeByG_C_A_T(groupId, classNameId, actionId, type); 478 } 479 480 /** 481 * Removes all the social equity settings from the database. 482 * 483 * @throws SystemException if a system exception occurred 484 */ 485 public static void removeAll() 486 throws com.liferay.portal.kernel.exception.SystemException { 487 getPersistence().removeAll(); 488 } 489 490 /** 491 * Returns the number of social equity settings where groupId = ? and classNameId = ? and actionId = ?. 492 * 493 * @param groupId the group ID 494 * @param classNameId the class name ID 495 * @param actionId the action ID 496 * @return the number of matching social equity settings 497 * @throws SystemException if a system exception occurred 498 */ 499 public static int countByG_C_A(long groupId, long classNameId, 500 java.lang.String actionId) 501 throws com.liferay.portal.kernel.exception.SystemException { 502 return getPersistence().countByG_C_A(groupId, classNameId, actionId); 503 } 504 505 /** 506 * Returns the number of social equity settings where groupId = ? and classNameId = ? and actionId = ? and type = ?. 507 * 508 * @param groupId the group ID 509 * @param classNameId the class name ID 510 * @param actionId the action ID 511 * @param type the type 512 * @return the number of matching social equity settings 513 * @throws SystemException if a system exception occurred 514 */ 515 public static int countByG_C_A_T(long groupId, long classNameId, 516 java.lang.String actionId, int type) 517 throws com.liferay.portal.kernel.exception.SystemException { 518 return getPersistence() 519 .countByG_C_A_T(groupId, classNameId, actionId, type); 520 } 521 522 /** 523 * Returns the number of social equity settings. 524 * 525 * @return the number of social equity settings 526 * @throws SystemException if a system exception occurred 527 */ 528 public static int countAll() 529 throws com.liferay.portal.kernel.exception.SystemException { 530 return getPersistence().countAll(); 531 } 532 533 public static SocialEquitySettingPersistence getPersistence() { 534 if (_persistence == null) { 535 _persistence = (SocialEquitySettingPersistence)PortalBeanLocatorUtil.locate(SocialEquitySettingPersistence.class.getName()); 536 537 ReferenceRegistry.registerReference(SocialEquitySettingUtil.class, 538 "_persistence"); 539 } 540 541 return _persistence; 542 } 543 544 public void setPersistence(SocialEquitySettingPersistence persistence) { 545 _persistence = persistence; 546 547 ReferenceRegistry.registerReference(SocialEquitySettingUtil.class, 548 "_persistence"); 549 } 550 551 private static SocialEquitySettingPersistence _persistence; 552 }