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