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