001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.kernel.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.NoSuchPasswordPolicyRelException; 020 import com.liferay.portal.kernel.model.PasswordPolicyRel; 021 022 /** 023 * The persistence interface for the password policy rel service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see com.liferay.portal.service.persistence.impl.PasswordPolicyRelPersistenceImpl 031 * @see PasswordPolicyRelUtil 032 * @generated 033 */ 034 @ProviderType 035 public interface PasswordPolicyRelPersistence extends BasePersistence<PasswordPolicyRel> { 036 /* 037 * NOTE FOR DEVELOPERS: 038 * 039 * Never modify or reference this interface directly. Always use {@link PasswordPolicyRelUtil} to access the password policy rel persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 040 */ 041 042 /** 043 * Returns all the password policy rels where passwordPolicyId = ?. 044 * 045 * @param passwordPolicyId the password policy ID 046 * @return the matching password policy rels 047 */ 048 public java.util.List<PasswordPolicyRel> findByPasswordPolicyId( 049 long passwordPolicyId); 050 051 /** 052 * Returns a range of all the password policy rels where passwordPolicyId = ?. 053 * 054 * <p> 055 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordPolicyRelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 056 * </p> 057 * 058 * @param passwordPolicyId the password policy ID 059 * @param start the lower bound of the range of password policy rels 060 * @param end the upper bound of the range of password policy rels (not inclusive) 061 * @return the range of matching password policy rels 062 */ 063 public java.util.List<PasswordPolicyRel> findByPasswordPolicyId( 064 long passwordPolicyId, int start, int end); 065 066 /** 067 * Returns an ordered range of all the password policy rels where passwordPolicyId = ?. 068 * 069 * <p> 070 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordPolicyRelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 071 * </p> 072 * 073 * @param passwordPolicyId the password policy ID 074 * @param start the lower bound of the range of password policy rels 075 * @param end the upper bound of the range of password policy rels (not inclusive) 076 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 077 * @return the ordered range of matching password policy rels 078 */ 079 public java.util.List<PasswordPolicyRel> findByPasswordPolicyId( 080 long passwordPolicyId, int start, int end, 081 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator); 082 083 /** 084 * Returns an ordered range of all the password policy rels where passwordPolicyId = ?. 085 * 086 * <p> 087 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordPolicyRelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 088 * </p> 089 * 090 * @param passwordPolicyId the password policy ID 091 * @param start the lower bound of the range of password policy rels 092 * @param end the upper bound of the range of password policy rels (not inclusive) 093 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 094 * @param retrieveFromCache whether to retrieve from the finder cache 095 * @return the ordered range of matching password policy rels 096 */ 097 public java.util.List<PasswordPolicyRel> findByPasswordPolicyId( 098 long passwordPolicyId, int start, int end, 099 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator, 100 boolean retrieveFromCache); 101 102 /** 103 * Returns the first password policy rel in the ordered set where passwordPolicyId = ?. 104 * 105 * @param passwordPolicyId the password policy ID 106 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 107 * @return the first matching password policy rel 108 * @throws NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 109 */ 110 public PasswordPolicyRel findByPasswordPolicyId_First( 111 long passwordPolicyId, 112 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator) 113 throws NoSuchPasswordPolicyRelException; 114 115 /** 116 * Returns the first password policy rel in the ordered set where passwordPolicyId = ?. 117 * 118 * @param passwordPolicyId the password policy ID 119 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 120 * @return the first matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 121 */ 122 public PasswordPolicyRel fetchByPasswordPolicyId_First( 123 long passwordPolicyId, 124 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator); 125 126 /** 127 * Returns the last password policy rel in the ordered set where passwordPolicyId = ?. 128 * 129 * @param passwordPolicyId the password policy ID 130 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 131 * @return the last matching password policy rel 132 * @throws NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 133 */ 134 public PasswordPolicyRel findByPasswordPolicyId_Last( 135 long passwordPolicyId, 136 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator) 137 throws NoSuchPasswordPolicyRelException; 138 139 /** 140 * Returns the last password policy rel in the ordered set where passwordPolicyId = ?. 141 * 142 * @param passwordPolicyId the password policy ID 143 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 144 * @return the last matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 145 */ 146 public PasswordPolicyRel fetchByPasswordPolicyId_Last( 147 long passwordPolicyId, 148 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator); 149 150 /** 151 * Returns the password policy rels before and after the current password policy rel in the ordered set where passwordPolicyId = ?. 152 * 153 * @param passwordPolicyRelId the primary key of the current password policy rel 154 * @param passwordPolicyId the password policy ID 155 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 156 * @return the previous, current, and next password policy rel 157 * @throws NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 158 */ 159 public PasswordPolicyRel[] findByPasswordPolicyId_PrevAndNext( 160 long passwordPolicyRelId, long passwordPolicyId, 161 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator) 162 throws NoSuchPasswordPolicyRelException; 163 164 /** 165 * Removes all the password policy rels where passwordPolicyId = ? from the database. 166 * 167 * @param passwordPolicyId the password policy ID 168 */ 169 public void removeByPasswordPolicyId(long passwordPolicyId); 170 171 /** 172 * Returns the number of password policy rels where passwordPolicyId = ?. 173 * 174 * @param passwordPolicyId the password policy ID 175 * @return the number of matching password policy rels 176 */ 177 public int countByPasswordPolicyId(long passwordPolicyId); 178 179 /** 180 * Returns the password policy rel where classNameId = ? and classPK = ? or throws a {@link NoSuchPasswordPolicyRelException} if it could not be found. 181 * 182 * @param classNameId the class name ID 183 * @param classPK the class p k 184 * @return the matching password policy rel 185 * @throws NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 186 */ 187 public PasswordPolicyRel findByC_C(long classNameId, long classPK) 188 throws NoSuchPasswordPolicyRelException; 189 190 /** 191 * Returns the password policy rel where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 192 * 193 * @param classNameId the class name ID 194 * @param classPK the class p k 195 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 196 */ 197 public PasswordPolicyRel fetchByC_C(long classNameId, long classPK); 198 199 /** 200 * Returns the password policy rel where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 201 * 202 * @param classNameId the class name ID 203 * @param classPK the class p k 204 * @param retrieveFromCache whether to retrieve from the finder cache 205 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 206 */ 207 public PasswordPolicyRel fetchByC_C(long classNameId, long classPK, 208 boolean retrieveFromCache); 209 210 /** 211 * Removes the password policy rel where classNameId = ? and classPK = ? from the database. 212 * 213 * @param classNameId the class name ID 214 * @param classPK the class p k 215 * @return the password policy rel that was removed 216 */ 217 public PasswordPolicyRel removeByC_C(long classNameId, long classPK) 218 throws NoSuchPasswordPolicyRelException; 219 220 /** 221 * Returns the number of password policy rels where classNameId = ? and classPK = ?. 222 * 223 * @param classNameId the class name ID 224 * @param classPK the class p k 225 * @return the number of matching password policy rels 226 */ 227 public int countByC_C(long classNameId, long classPK); 228 229 /** 230 * Caches the password policy rel in the entity cache if it is enabled. 231 * 232 * @param passwordPolicyRel the password policy rel 233 */ 234 public void cacheResult(PasswordPolicyRel passwordPolicyRel); 235 236 /** 237 * Caches the password policy rels in the entity cache if it is enabled. 238 * 239 * @param passwordPolicyRels the password policy rels 240 */ 241 public void cacheResult( 242 java.util.List<PasswordPolicyRel> passwordPolicyRels); 243 244 /** 245 * Creates a new password policy rel with the primary key. Does not add the password policy rel to the database. 246 * 247 * @param passwordPolicyRelId the primary key for the new password policy rel 248 * @return the new password policy rel 249 */ 250 public PasswordPolicyRel create(long passwordPolicyRelId); 251 252 /** 253 * Removes the password policy rel with the primary key from the database. Also notifies the appropriate model listeners. 254 * 255 * @param passwordPolicyRelId the primary key of the password policy rel 256 * @return the password policy rel that was removed 257 * @throws NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 258 */ 259 public PasswordPolicyRel remove(long passwordPolicyRelId) 260 throws NoSuchPasswordPolicyRelException; 261 262 public PasswordPolicyRel updateImpl(PasswordPolicyRel passwordPolicyRel); 263 264 /** 265 * Returns the password policy rel with the primary key or throws a {@link NoSuchPasswordPolicyRelException} if it could not be found. 266 * 267 * @param passwordPolicyRelId the primary key of the password policy rel 268 * @return the password policy rel 269 * @throws NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 270 */ 271 public PasswordPolicyRel findByPrimaryKey(long passwordPolicyRelId) 272 throws NoSuchPasswordPolicyRelException; 273 274 /** 275 * Returns the password policy rel with the primary key or returns <code>null</code> if it could not be found. 276 * 277 * @param passwordPolicyRelId the primary key of the password policy rel 278 * @return the password policy rel, or <code>null</code> if a password policy rel with the primary key could not be found 279 */ 280 public PasswordPolicyRel fetchByPrimaryKey(long passwordPolicyRelId); 281 282 @Override 283 public java.util.Map<java.io.Serializable, PasswordPolicyRel> fetchByPrimaryKeys( 284 java.util.Set<java.io.Serializable> primaryKeys); 285 286 /** 287 * Returns all the password policy rels. 288 * 289 * @return the password policy rels 290 */ 291 public java.util.List<PasswordPolicyRel> findAll(); 292 293 /** 294 * Returns a range of all the password policy rels. 295 * 296 * <p> 297 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordPolicyRelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 298 * </p> 299 * 300 * @param start the lower bound of the range of password policy rels 301 * @param end the upper bound of the range of password policy rels (not inclusive) 302 * @return the range of password policy rels 303 */ 304 public java.util.List<PasswordPolicyRel> findAll(int start, int end); 305 306 /** 307 * Returns an ordered range of all the password policy rels. 308 * 309 * <p> 310 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordPolicyRelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 311 * </p> 312 * 313 * @param start the lower bound of the range of password policy rels 314 * @param end the upper bound of the range of password policy rels (not inclusive) 315 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 316 * @return the ordered range of password policy rels 317 */ 318 public java.util.List<PasswordPolicyRel> findAll(int start, int end, 319 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator); 320 321 /** 322 * Returns an ordered range of all the password policy rels. 323 * 324 * <p> 325 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordPolicyRelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 326 * </p> 327 * 328 * @param start the lower bound of the range of password policy rels 329 * @param end the upper bound of the range of password policy rels (not inclusive) 330 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 331 * @param retrieveFromCache whether to retrieve from the finder cache 332 * @return the ordered range of password policy rels 333 */ 334 public java.util.List<PasswordPolicyRel> findAll(int start, int end, 335 com.liferay.portal.kernel.util.OrderByComparator<PasswordPolicyRel> orderByComparator, 336 boolean retrieveFromCache); 337 338 /** 339 * Removes all the password policy rels from the database. 340 */ 341 public void removeAll(); 342 343 /** 344 * Returns the number of password policy rels. 345 * 346 * @return the number of password policy rels 347 */ 348 public int countAll(); 349 }