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