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