001 /** 002 * Copyright (c) 2000-2011 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.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#remove(com.liferay.portal.model.BaseModel) 099 */ 100 public static MDRRule remove(MDRRule mdrRule) throws SystemException { 101 return getPersistence().remove(mdrRule); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 106 */ 107 public static MDRRule update(MDRRule mdrRule, boolean merge) 108 throws SystemException { 109 return getPersistence().update(mdrRule, merge); 110 } 111 112 /** 113 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 114 */ 115 public static MDRRule update(MDRRule mdrRule, boolean merge, 116 ServiceContext serviceContext) throws SystemException { 117 return getPersistence().update(mdrRule, merge, serviceContext); 118 } 119 120 /** 121 * Caches the m d r rule in the entity cache if it is enabled. 122 * 123 * @param mdrRule the m d r rule 124 */ 125 public static void cacheResult( 126 com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule) { 127 getPersistence().cacheResult(mdrRule); 128 } 129 130 /** 131 * Caches the m d r rules in the entity cache if it is enabled. 132 * 133 * @param mdrRules the m d r rules 134 */ 135 public static void cacheResult( 136 java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> mdrRules) { 137 getPersistence().cacheResult(mdrRules); 138 } 139 140 /** 141 * Creates a new m d r rule with the primary key. Does not add the m d r rule to the database. 142 * 143 * @param ruleId the primary key for the new m d r rule 144 * @return the new m d r rule 145 */ 146 public static com.liferay.portlet.mobiledevicerules.model.MDRRule create( 147 long ruleId) { 148 return getPersistence().create(ruleId); 149 } 150 151 /** 152 * Removes the m d r rule with the primary key from the database. Also notifies the appropriate model listeners. 153 * 154 * @param ruleId the primary key of the m d r rule 155 * @return the m d r rule that was removed 156 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found 157 * @throws SystemException if a system exception occurred 158 */ 159 public static com.liferay.portlet.mobiledevicerules.model.MDRRule remove( 160 long ruleId) 161 throws com.liferay.portal.kernel.exception.SystemException, 162 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 163 return getPersistence().remove(ruleId); 164 } 165 166 public static com.liferay.portlet.mobiledevicerules.model.MDRRule updateImpl( 167 com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule, 168 boolean merge) 169 throws com.liferay.portal.kernel.exception.SystemException { 170 return getPersistence().updateImpl(mdrRule, merge); 171 } 172 173 /** 174 * 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. 175 * 176 * @param ruleId the primary key of the m d r rule 177 * @return the m d r rule 178 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found 179 * @throws SystemException if a system exception occurred 180 */ 181 public static com.liferay.portlet.mobiledevicerules.model.MDRRule findByPrimaryKey( 182 long ruleId) 183 throws com.liferay.portal.kernel.exception.SystemException, 184 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 185 return getPersistence().findByPrimaryKey(ruleId); 186 } 187 188 /** 189 * Returns the m d r rule with the primary key or returns <code>null</code> if it could not be found. 190 * 191 * @param ruleId the primary key of the m d r rule 192 * @return the m d r rule, or <code>null</code> if a m d r rule with the primary key could not be found 193 * @throws SystemException if a system exception occurred 194 */ 195 public static com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByPrimaryKey( 196 long ruleId) throws com.liferay.portal.kernel.exception.SystemException { 197 return getPersistence().fetchByPrimaryKey(ruleId); 198 } 199 200 /** 201 * Returns all the m d r rules where uuid = ?. 202 * 203 * @param uuid the uuid 204 * @return the matching m d r rules 205 * @throws SystemException if a system exception occurred 206 */ 207 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid( 208 java.lang.String uuid) 209 throws com.liferay.portal.kernel.exception.SystemException { 210 return getPersistence().findByUuid(uuid); 211 } 212 213 /** 214 * Returns a range of all the m d r rules where uuid = ?. 215 * 216 * <p> 217 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 218 * </p> 219 * 220 * @param uuid the uuid 221 * @param start the lower bound of the range of m d r rules 222 * @param end the upper bound of the range of m d r rules (not inclusive) 223 * @return the range of matching m d r rules 224 * @throws SystemException if a system exception occurred 225 */ 226 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid( 227 java.lang.String uuid, int start, int end) 228 throws com.liferay.portal.kernel.exception.SystemException { 229 return getPersistence().findByUuid(uuid, start, end); 230 } 231 232 /** 233 * Returns an ordered range of all the m d r rules where uuid = ?. 234 * 235 * <p> 236 * 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. 237 * </p> 238 * 239 * @param uuid the uuid 240 * @param start the lower bound of the range of m d r rules 241 * @param end the upper bound of the range of m d r rules (not inclusive) 242 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 243 * @return the ordered range of matching m d r rules 244 * @throws SystemException if a system exception occurred 245 */ 246 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid( 247 java.lang.String uuid, int start, int end, 248 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 249 throws com.liferay.portal.kernel.exception.SystemException { 250 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 251 } 252 253 /** 254 * Returns the first m d r rule in the ordered set where uuid = ?. 255 * 256 * <p> 257 * 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. 258 * </p> 259 * 260 * @param uuid the uuid 261 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 262 * @return the first matching m d r rule 263 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 264 * @throws SystemException if a system exception occurred 265 */ 266 public static com.liferay.portlet.mobiledevicerules.model.MDRRule findByUuid_First( 267 java.lang.String uuid, 268 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 269 throws com.liferay.portal.kernel.exception.SystemException, 270 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 271 return getPersistence().findByUuid_First(uuid, orderByComparator); 272 } 273 274 /** 275 * Returns the last m d r rule in the ordered set where uuid = ?. 276 * 277 * <p> 278 * 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. 279 * </p> 280 * 281 * @param uuid the uuid 282 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 283 * @return the last matching m d r rule 284 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 285 * @throws SystemException if a system exception occurred 286 */ 287 public static com.liferay.portlet.mobiledevicerules.model.MDRRule findByUuid_Last( 288 java.lang.String uuid, 289 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 290 throws com.liferay.portal.kernel.exception.SystemException, 291 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 292 return getPersistence().findByUuid_Last(uuid, orderByComparator); 293 } 294 295 /** 296 * Returns the m d r rules before and after the current m d r rule in the ordered set where uuid = ?. 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 ruleId the primary key of the current m d r rule 303 * @param uuid the uuid 304 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 305 * @return the previous, current, and next m d r rule 306 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found 307 * @throws SystemException if a system exception occurred 308 */ 309 public static com.liferay.portlet.mobiledevicerules.model.MDRRule[] findByUuid_PrevAndNext( 310 long ruleId, java.lang.String uuid, 311 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 312 throws com.liferay.portal.kernel.exception.SystemException, 313 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 314 return getPersistence() 315 .findByUuid_PrevAndNext(ruleId, uuid, orderByComparator); 316 } 317 318 /** 319 * 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. 320 * 321 * @param uuid the uuid 322 * @param groupId the group ID 323 * @return the matching m d r rule 324 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 325 * @throws SystemException if a system exception occurred 326 */ 327 public static com.liferay.portlet.mobiledevicerules.model.MDRRule findByUUID_G( 328 java.lang.String uuid, long groupId) 329 throws com.liferay.portal.kernel.exception.SystemException, 330 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 331 return getPersistence().findByUUID_G(uuid, groupId); 332 } 333 334 /** 335 * 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. 336 * 337 * @param uuid the uuid 338 * @param groupId the group ID 339 * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found 340 * @throws SystemException if a system exception occurred 341 */ 342 public static com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByUUID_G( 343 java.lang.String uuid, long groupId) 344 throws com.liferay.portal.kernel.exception.SystemException { 345 return getPersistence().fetchByUUID_G(uuid, groupId); 346 } 347 348 /** 349 * 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. 350 * 351 * @param uuid the uuid 352 * @param groupId the group ID 353 * @param retrieveFromCache whether to use the finder cache 354 * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found 355 * @throws SystemException if a system exception occurred 356 */ 357 public static com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByUUID_G( 358 java.lang.String uuid, long groupId, boolean retrieveFromCache) 359 throws com.liferay.portal.kernel.exception.SystemException { 360 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 361 } 362 363 /** 364 * Returns all the m d r rules where ruleGroupId = ?. 365 * 366 * @param ruleGroupId the rule group ID 367 * @return the matching m d r rules 368 * @throws SystemException if a system exception occurred 369 */ 370 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId( 371 long ruleGroupId) 372 throws com.liferay.portal.kernel.exception.SystemException { 373 return getPersistence().findByRuleGroupId(ruleGroupId); 374 } 375 376 /** 377 * Returns a range of all the m d r rules where ruleGroupId = ?. 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 ruleGroupId the rule group ID 384 * @param start the lower bound of the range of m d r rules 385 * @param end the upper bound of the range of m d r rules (not inclusive) 386 * @return the range of matching m d r rules 387 * @throws SystemException if a system exception occurred 388 */ 389 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId( 390 long ruleGroupId, int start, int end) 391 throws com.liferay.portal.kernel.exception.SystemException { 392 return getPersistence().findByRuleGroupId(ruleGroupId, start, end); 393 } 394 395 /** 396 * Returns an ordered range of all the m d r rules where ruleGroupId = ?. 397 * 398 * <p> 399 * 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. 400 * </p> 401 * 402 * @param ruleGroupId the rule group ID 403 * @param start the lower bound of the range of m d r rules 404 * @param end the upper bound of the range of m d r rules (not inclusive) 405 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 406 * @return the ordered range of matching m d r rules 407 * @throws SystemException if a system exception occurred 408 */ 409 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId( 410 long ruleGroupId, int start, int end, 411 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 412 throws com.liferay.portal.kernel.exception.SystemException { 413 return getPersistence() 414 .findByRuleGroupId(ruleGroupId, start, end, orderByComparator); 415 } 416 417 /** 418 * Returns the first m d r rule in the ordered set where ruleGroupId = ?. 419 * 420 * <p> 421 * 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. 422 * </p> 423 * 424 * @param ruleGroupId the rule group ID 425 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 426 * @return the first matching m d r rule 427 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 428 * @throws SystemException if a system exception occurred 429 */ 430 public static com.liferay.portlet.mobiledevicerules.model.MDRRule findByRuleGroupId_First( 431 long ruleGroupId, 432 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 433 throws com.liferay.portal.kernel.exception.SystemException, 434 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 435 return getPersistence() 436 .findByRuleGroupId_First(ruleGroupId, orderByComparator); 437 } 438 439 /** 440 * Returns the last m d r rule in the ordered set where ruleGroupId = ?. 441 * 442 * <p> 443 * 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. 444 * </p> 445 * 446 * @param ruleGroupId the rule group ID 447 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 448 * @return the last matching m d r rule 449 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 450 * @throws SystemException if a system exception occurred 451 */ 452 public static com.liferay.portlet.mobiledevicerules.model.MDRRule findByRuleGroupId_Last( 453 long ruleGroupId, 454 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 455 throws com.liferay.portal.kernel.exception.SystemException, 456 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 457 return getPersistence() 458 .findByRuleGroupId_Last(ruleGroupId, orderByComparator); 459 } 460 461 /** 462 * Returns the m d r rules before and after the current m d r rule in the ordered set where ruleGroupId = ?. 463 * 464 * <p> 465 * 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. 466 * </p> 467 * 468 * @param ruleId the primary key of the current m d r rule 469 * @param ruleGroupId the rule group ID 470 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 471 * @return the previous, current, and next m d r rule 472 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found 473 * @throws SystemException if a system exception occurred 474 */ 475 public static com.liferay.portlet.mobiledevicerules.model.MDRRule[] findByRuleGroupId_PrevAndNext( 476 long ruleId, long ruleGroupId, 477 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 478 throws com.liferay.portal.kernel.exception.SystemException, 479 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 480 return getPersistence() 481 .findByRuleGroupId_PrevAndNext(ruleId, ruleGroupId, 482 orderByComparator); 483 } 484 485 /** 486 * Returns all the m d r rules. 487 * 488 * @return the m d r rules 489 * @throws SystemException if a system exception occurred 490 */ 491 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll() 492 throws com.liferay.portal.kernel.exception.SystemException { 493 return getPersistence().findAll(); 494 } 495 496 /** 497 * Returns a range of all the m d r rules. 498 * 499 * <p> 500 * 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. 501 * </p> 502 * 503 * @param start the lower bound of the range of m d r rules 504 * @param end the upper bound of the range of m d r rules (not inclusive) 505 * @return the range of m d r rules 506 * @throws SystemException if a system exception occurred 507 */ 508 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll( 509 int start, int end) 510 throws com.liferay.portal.kernel.exception.SystemException { 511 return getPersistence().findAll(start, end); 512 } 513 514 /** 515 * Returns an ordered range of all the m d r rules. 516 * 517 * <p> 518 * 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. 519 * </p> 520 * 521 * @param start the lower bound of the range of m d r rules 522 * @param end the upper bound of the range of m d r rules (not inclusive) 523 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 524 * @return the ordered range of m d r rules 525 * @throws SystemException if a system exception occurred 526 */ 527 public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll( 528 int start, int end, 529 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 530 throws com.liferay.portal.kernel.exception.SystemException { 531 return getPersistence().findAll(start, end, orderByComparator); 532 } 533 534 /** 535 * Removes all the m d r rules where uuid = ? from the database. 536 * 537 * @param uuid the uuid 538 * @throws SystemException if a system exception occurred 539 */ 540 public static void removeByUuid(java.lang.String uuid) 541 throws com.liferay.portal.kernel.exception.SystemException { 542 getPersistence().removeByUuid(uuid); 543 } 544 545 /** 546 * Removes the m d r rule where uuid = ? and groupId = ? from the database. 547 * 548 * @param uuid the uuid 549 * @param groupId the group ID 550 * @throws SystemException if a system exception occurred 551 */ 552 public static void removeByUUID_G(java.lang.String uuid, long groupId) 553 throws com.liferay.portal.kernel.exception.SystemException, 554 com.liferay.portlet.mobiledevicerules.NoSuchRuleException { 555 getPersistence().removeByUUID_G(uuid, groupId); 556 } 557 558 /** 559 * Removes all the m d r rules where ruleGroupId = ? from the database. 560 * 561 * @param ruleGroupId the rule group ID 562 * @throws SystemException if a system exception occurred 563 */ 564 public static void removeByRuleGroupId(long ruleGroupId) 565 throws com.liferay.portal.kernel.exception.SystemException { 566 getPersistence().removeByRuleGroupId(ruleGroupId); 567 } 568 569 /** 570 * Removes all the m d r rules from the database. 571 * 572 * @throws SystemException if a system exception occurred 573 */ 574 public static void removeAll() 575 throws com.liferay.portal.kernel.exception.SystemException { 576 getPersistence().removeAll(); 577 } 578 579 /** 580 * Returns the number of m d r rules where uuid = ?. 581 * 582 * @param uuid the uuid 583 * @return the number of matching m d r rules 584 * @throws SystemException if a system exception occurred 585 */ 586 public static int countByUuid(java.lang.String uuid) 587 throws com.liferay.portal.kernel.exception.SystemException { 588 return getPersistence().countByUuid(uuid); 589 } 590 591 /** 592 * Returns the number of m d r rules where uuid = ? and groupId = ?. 593 * 594 * @param uuid the uuid 595 * @param groupId the group ID 596 * @return the number of matching m d r rules 597 * @throws SystemException if a system exception occurred 598 */ 599 public static int countByUUID_G(java.lang.String uuid, long groupId) 600 throws com.liferay.portal.kernel.exception.SystemException { 601 return getPersistence().countByUUID_G(uuid, groupId); 602 } 603 604 /** 605 * Returns the number of m d r rules where ruleGroupId = ?. 606 * 607 * @param ruleGroupId the rule group ID 608 * @return the number of matching m d r rules 609 * @throws SystemException if a system exception occurred 610 */ 611 public static int countByRuleGroupId(long ruleGroupId) 612 throws com.liferay.portal.kernel.exception.SystemException { 613 return getPersistence().countByRuleGroupId(ruleGroupId); 614 } 615 616 /** 617 * Returns the number of m d r rules. 618 * 619 * @return the number of m d r rules 620 * @throws SystemException if a system exception occurred 621 */ 622 public static int countAll() 623 throws com.liferay.portal.kernel.exception.SystemException { 624 return getPersistence().countAll(); 625 } 626 627 public static MDRRulePersistence getPersistence() { 628 if (_persistence == null) { 629 _persistence = (MDRRulePersistence)PortalBeanLocatorUtil.locate(MDRRulePersistence.class.getName()); 630 631 ReferenceRegistry.registerReference(MDRRuleUtil.class, 632 "_persistence"); 633 } 634 635 return _persistence; 636 } 637 638 public void setPersistence(MDRRulePersistence persistence) { 639 _persistence = persistence; 640 641 ReferenceRegistry.registerReference(MDRRuleUtil.class, "_persistence"); 642 } 643 644 private static MDRRulePersistence _persistence; 645 }