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.service.persistence.BasePersistence; 018 019 import com.liferay.portlet.mobiledevicerules.model.MDRRule; 020 021 /** 022 * The persistence interface for the m d r rule service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Edward C. Han 029 * @see MDRRulePersistenceImpl 030 * @see MDRRuleUtil 031 * @generated 032 */ 033 public interface MDRRulePersistence extends BasePersistence<MDRRule> { 034 /* 035 * NOTE FOR DEVELOPERS: 036 * 037 * Never modify or reference this interface directly. Always use {@link MDRRuleUtil} to access the m d r rule persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 038 */ 039 040 /** 041 * Caches the m d r rule in the entity cache if it is enabled. 042 * 043 * @param mdrRule the m d r rule 044 */ 045 public void cacheResult( 046 com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule); 047 048 /** 049 * Caches the m d r rules in the entity cache if it is enabled. 050 * 051 * @param mdrRules the m d r rules 052 */ 053 public void cacheResult( 054 java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> mdrRules); 055 056 /** 057 * Creates a new m d r rule with the primary key. Does not add the m d r rule to the database. 058 * 059 * @param ruleId the primary key for the new m d r rule 060 * @return the new m d r rule 061 */ 062 public com.liferay.portlet.mobiledevicerules.model.MDRRule create( 063 long ruleId); 064 065 /** 066 * Removes the m d r rule with the primary key from the database. Also notifies the appropriate model listeners. 067 * 068 * @param ruleId the primary key of the m d r rule 069 * @return the m d r rule that was removed 070 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found 071 * @throws SystemException if a system exception occurred 072 */ 073 public com.liferay.portlet.mobiledevicerules.model.MDRRule remove( 074 long ruleId) 075 throws com.liferay.portal.kernel.exception.SystemException, 076 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 077 078 public com.liferay.portlet.mobiledevicerules.model.MDRRule updateImpl( 079 com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule, 080 boolean merge) 081 throws com.liferay.portal.kernel.exception.SystemException; 082 083 /** 084 * 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. 085 * 086 * @param ruleId the primary key of the m d r rule 087 * @return the m d r rule 088 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found 089 * @throws SystemException if a system exception occurred 090 */ 091 public com.liferay.portlet.mobiledevicerules.model.MDRRule findByPrimaryKey( 092 long ruleId) 093 throws com.liferay.portal.kernel.exception.SystemException, 094 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 095 096 /** 097 * Returns the m d r rule with the primary key or returns <code>null</code> if it could not be found. 098 * 099 * @param ruleId the primary key of the m d r rule 100 * @return the m d r rule, or <code>null</code> if a m d r rule with the primary key could not be found 101 * @throws SystemException if a system exception occurred 102 */ 103 public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByPrimaryKey( 104 long ruleId) throws com.liferay.portal.kernel.exception.SystemException; 105 106 /** 107 * Returns all the m d r rules where uuid = ?. 108 * 109 * @param uuid the uuid 110 * @return the matching m d r rules 111 * @throws SystemException if a system exception occurred 112 */ 113 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid( 114 java.lang.String uuid) 115 throws com.liferay.portal.kernel.exception.SystemException; 116 117 /** 118 * Returns a range of all the m d r rules where uuid = ?. 119 * 120 * <p> 121 * 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. 122 * </p> 123 * 124 * @param uuid the uuid 125 * @param start the lower bound of the range of m d r rules 126 * @param end the upper bound of the range of m d r rules (not inclusive) 127 * @return the range of matching m d r rules 128 * @throws SystemException if a system exception occurred 129 */ 130 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid( 131 java.lang.String uuid, int start, int end) 132 throws com.liferay.portal.kernel.exception.SystemException; 133 134 /** 135 * Returns an ordered range of all the m d r rules where uuid = ?. 136 * 137 * <p> 138 * 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. 139 * </p> 140 * 141 * @param uuid the uuid 142 * @param start the lower bound of the range of m d r rules 143 * @param end the upper bound of the range of m d r rules (not inclusive) 144 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 145 * @return the ordered range of matching m d r rules 146 * @throws SystemException if a system exception occurred 147 */ 148 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid( 149 java.lang.String uuid, int start, int end, 150 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 151 throws com.liferay.portal.kernel.exception.SystemException; 152 153 /** 154 * Returns the first m d r rule in the ordered set where uuid = ?. 155 * 156 * <p> 157 * 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. 158 * </p> 159 * 160 * @param uuid the uuid 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the first matching m d r rule 163 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 164 * @throws SystemException if a system exception occurred 165 */ 166 public com.liferay.portlet.mobiledevicerules.model.MDRRule findByUuid_First( 167 java.lang.String uuid, 168 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 169 throws com.liferay.portal.kernel.exception.SystemException, 170 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 171 172 /** 173 * Returns the last m d r rule in the ordered set where uuid = ?. 174 * 175 * <p> 176 * 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. 177 * </p> 178 * 179 * @param uuid the uuid 180 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 181 * @return the last matching m d r rule 182 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public com.liferay.portlet.mobiledevicerules.model.MDRRule findByUuid_Last( 186 java.lang.String uuid, 187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 188 throws com.liferay.portal.kernel.exception.SystemException, 189 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 190 191 /** 192 * Returns the m d r rules before and after the current m d r rule in the ordered set where uuid = ?. 193 * 194 * <p> 195 * 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. 196 * </p> 197 * 198 * @param ruleId the primary key of the current m d r rule 199 * @param uuid the uuid 200 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 201 * @return the previous, current, and next m d r rule 202 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found 203 * @throws SystemException if a system exception occurred 204 */ 205 public com.liferay.portlet.mobiledevicerules.model.MDRRule[] findByUuid_PrevAndNext( 206 long ruleId, java.lang.String uuid, 207 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 208 throws com.liferay.portal.kernel.exception.SystemException, 209 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 210 211 /** 212 * 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. 213 * 214 * @param uuid the uuid 215 * @param groupId the group ID 216 * @return the matching m d r rule 217 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 218 * @throws SystemException if a system exception occurred 219 */ 220 public com.liferay.portlet.mobiledevicerules.model.MDRRule findByUUID_G( 221 java.lang.String uuid, long groupId) 222 throws com.liferay.portal.kernel.exception.SystemException, 223 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 224 225 /** 226 * 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. 227 * 228 * @param uuid the uuid 229 * @param groupId the group ID 230 * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found 231 * @throws SystemException if a system exception occurred 232 */ 233 public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByUUID_G( 234 java.lang.String uuid, long groupId) 235 throws com.liferay.portal.kernel.exception.SystemException; 236 237 /** 238 * 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. 239 * 240 * @param uuid the uuid 241 * @param groupId the group ID 242 * @param retrieveFromCache whether to use the finder cache 243 * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found 244 * @throws SystemException if a system exception occurred 245 */ 246 public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByUUID_G( 247 java.lang.String uuid, long groupId, boolean retrieveFromCache) 248 throws com.liferay.portal.kernel.exception.SystemException; 249 250 /** 251 * Returns all the m d r rules where ruleGroupId = ?. 252 * 253 * @param ruleGroupId the rule group ID 254 * @return the matching m d r rules 255 * @throws SystemException if a system exception occurred 256 */ 257 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId( 258 long ruleGroupId) 259 throws com.liferay.portal.kernel.exception.SystemException; 260 261 /** 262 * Returns a range of all the m d r rules where ruleGroupId = ?. 263 * 264 * <p> 265 * 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. 266 * </p> 267 * 268 * @param ruleGroupId the rule group ID 269 * @param start the lower bound of the range of m d r rules 270 * @param end the upper bound of the range of m d r rules (not inclusive) 271 * @return the range of matching m d r rules 272 * @throws SystemException if a system exception occurred 273 */ 274 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId( 275 long ruleGroupId, int start, int end) 276 throws com.liferay.portal.kernel.exception.SystemException; 277 278 /** 279 * Returns an ordered range of all the m d r rules where ruleGroupId = ?. 280 * 281 * <p> 282 * 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. 283 * </p> 284 * 285 * @param ruleGroupId the rule group ID 286 * @param start the lower bound of the range of m d r rules 287 * @param end the upper bound of the range of m d r rules (not inclusive) 288 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 289 * @return the ordered range of matching m d r rules 290 * @throws SystemException if a system exception occurred 291 */ 292 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId( 293 long ruleGroupId, int start, int end, 294 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 295 throws com.liferay.portal.kernel.exception.SystemException; 296 297 /** 298 * Returns the first m d r rule in the ordered set where ruleGroupId = ?. 299 * 300 * <p> 301 * 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. 302 * </p> 303 * 304 * @param ruleGroupId the rule group ID 305 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 306 * @return the first matching m d r rule 307 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public com.liferay.portlet.mobiledevicerules.model.MDRRule findByRuleGroupId_First( 311 long ruleGroupId, 312 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 313 throws com.liferay.portal.kernel.exception.SystemException, 314 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 315 316 /** 317 * Returns the last m d r rule in the ordered set where ruleGroupId = ?. 318 * 319 * <p> 320 * 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. 321 * </p> 322 * 323 * @param ruleGroupId the rule group ID 324 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 325 * @return the last matching m d r rule 326 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found 327 * @throws SystemException if a system exception occurred 328 */ 329 public com.liferay.portlet.mobiledevicerules.model.MDRRule findByRuleGroupId_Last( 330 long ruleGroupId, 331 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 332 throws com.liferay.portal.kernel.exception.SystemException, 333 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 334 335 /** 336 * Returns the m d r rules before and after the current m d r rule in the ordered set where ruleGroupId = ?. 337 * 338 * <p> 339 * 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. 340 * </p> 341 * 342 * @param ruleId the primary key of the current m d r rule 343 * @param ruleGroupId the rule group ID 344 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 345 * @return the previous, current, and next m d r rule 346 * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found 347 * @throws SystemException if a system exception occurred 348 */ 349 public com.liferay.portlet.mobiledevicerules.model.MDRRule[] findByRuleGroupId_PrevAndNext( 350 long ruleId, long ruleGroupId, 351 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 352 throws com.liferay.portal.kernel.exception.SystemException, 353 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 354 355 /** 356 * Returns all the m d r rules. 357 * 358 * @return the m d r rules 359 * @throws SystemException if a system exception occurred 360 */ 361 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll() 362 throws com.liferay.portal.kernel.exception.SystemException; 363 364 /** 365 * Returns a range of all the m d r rules. 366 * 367 * <p> 368 * 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. 369 * </p> 370 * 371 * @param start the lower bound of the range of m d r rules 372 * @param end the upper bound of the range of m d r rules (not inclusive) 373 * @return the range of m d r rules 374 * @throws SystemException if a system exception occurred 375 */ 376 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll( 377 int start, int end) 378 throws com.liferay.portal.kernel.exception.SystemException; 379 380 /** 381 * Returns an ordered range of all the m d r rules. 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 m d r rules 388 * @param end the upper bound of the range of m d r rules (not inclusive) 389 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 390 * @return the ordered range of m d r rules 391 * @throws SystemException if a system exception occurred 392 */ 393 public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll( 394 int start, int end, 395 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 396 throws com.liferay.portal.kernel.exception.SystemException; 397 398 /** 399 * Removes all the m d r rules where uuid = ? from the database. 400 * 401 * @param uuid the uuid 402 * @throws SystemException if a system exception occurred 403 */ 404 public void removeByUuid(java.lang.String uuid) 405 throws com.liferay.portal.kernel.exception.SystemException; 406 407 /** 408 * Removes the m d r rule where uuid = ? and groupId = ? from the database. 409 * 410 * @param uuid the uuid 411 * @param groupId the group ID 412 * @throws SystemException if a system exception occurred 413 */ 414 public void removeByUUID_G(java.lang.String uuid, long groupId) 415 throws com.liferay.portal.kernel.exception.SystemException, 416 com.liferay.portlet.mobiledevicerules.NoSuchRuleException; 417 418 /** 419 * Removes all the m d r rules where ruleGroupId = ? from the database. 420 * 421 * @param ruleGroupId the rule group ID 422 * @throws SystemException if a system exception occurred 423 */ 424 public void removeByRuleGroupId(long ruleGroupId) 425 throws com.liferay.portal.kernel.exception.SystemException; 426 427 /** 428 * Removes all the m d r rules from the database. 429 * 430 * @throws SystemException if a system exception occurred 431 */ 432 public void removeAll() 433 throws com.liferay.portal.kernel.exception.SystemException; 434 435 /** 436 * Returns the number of m d r rules where uuid = ?. 437 * 438 * @param uuid the uuid 439 * @return the number of matching m d r rules 440 * @throws SystemException if a system exception occurred 441 */ 442 public int countByUuid(java.lang.String uuid) 443 throws com.liferay.portal.kernel.exception.SystemException; 444 445 /** 446 * Returns the number of m d r rules where uuid = ? and groupId = ?. 447 * 448 * @param uuid the uuid 449 * @param groupId the group ID 450 * @return the number of matching m d r rules 451 * @throws SystemException if a system exception occurred 452 */ 453 public int countByUUID_G(java.lang.String uuid, long groupId) 454 throws com.liferay.portal.kernel.exception.SystemException; 455 456 /** 457 * Returns the number of m d r rules where ruleGroupId = ?. 458 * 459 * @param ruleGroupId the rule group ID 460 * @return the number of matching m d r rules 461 * @throws SystemException if a system exception occurred 462 */ 463 public int countByRuleGroupId(long ruleGroupId) 464 throws com.liferay.portal.kernel.exception.SystemException; 465 466 /** 467 * Returns the number of m d r rules. 468 * 469 * @return the number of m d r rules 470 * @throws SystemException if a system exception occurred 471 */ 472 public int countAll() 473 throws com.liferay.portal.kernel.exception.SystemException; 474 }