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