001 /** 002 * Copyright (c) 2000-2010 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.service.persistence; 016 017 import com.liferay.portal.model.PasswordPolicy; 018 019 /** 020 * The persistence interface for the password policy service. 021 * 022 * <p> 023 * Never modify or reference this interface directly. Always use {@link PasswordPolicyUtil} to access the password policy persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 024 * </p> 025 * 026 * <p> 027 * Caching information and settings can be found in <code>portal.properties</code> 028 * </p> 029 * 030 * @author Brian Wing Shun Chan 031 * @see PasswordPolicyPersistenceImpl 032 * @see PasswordPolicyUtil 033 * @generated 034 */ 035 public interface PasswordPolicyPersistence extends BasePersistence<PasswordPolicy> { 036 /** 037 * Caches the password policy in the entity cache if it is enabled. 038 * 039 * @param passwordPolicy the password policy to cache 040 */ 041 public void cacheResult( 042 com.liferay.portal.model.PasswordPolicy passwordPolicy); 043 044 /** 045 * Caches the password policies in the entity cache if it is enabled. 046 * 047 * @param passwordPolicies the password policies to cache 048 */ 049 public void cacheResult( 050 java.util.List<com.liferay.portal.model.PasswordPolicy> passwordPolicies); 051 052 /** 053 * Creates a new password policy with the primary key. Does not add the password policy to the database. 054 * 055 * @param passwordPolicyId the primary key for the new password policy 056 * @return the new password policy 057 */ 058 public com.liferay.portal.model.PasswordPolicy create(long passwordPolicyId); 059 060 /** 061 * Removes the password policy with the primary key from the database. Also notifies the appropriate model listeners. 062 * 063 * @param passwordPolicyId the primary key of the password policy to remove 064 * @return the password policy that was removed 065 * @throws com.liferay.portal.NoSuchPasswordPolicyException if a password policy with the primary key could not be found 066 * @throws SystemException if a system exception occurred 067 */ 068 public com.liferay.portal.model.PasswordPolicy remove(long passwordPolicyId) 069 throws com.liferay.portal.NoSuchPasswordPolicyException, 070 com.liferay.portal.kernel.exception.SystemException; 071 072 public com.liferay.portal.model.PasswordPolicy updateImpl( 073 com.liferay.portal.model.PasswordPolicy passwordPolicy, boolean merge) 074 throws com.liferay.portal.kernel.exception.SystemException; 075 076 /** 077 * Finds the password policy with the primary key or throws a {@link com.liferay.portal.NoSuchPasswordPolicyException} if it could not be found. 078 * 079 * @param passwordPolicyId the primary key of the password policy to find 080 * @return the password policy 081 * @throws com.liferay.portal.NoSuchPasswordPolicyException if a password policy with the primary key could not be found 082 * @throws SystemException if a system exception occurred 083 */ 084 public com.liferay.portal.model.PasswordPolicy findByPrimaryKey( 085 long passwordPolicyId) 086 throws com.liferay.portal.NoSuchPasswordPolicyException, 087 com.liferay.portal.kernel.exception.SystemException; 088 089 /** 090 * Finds the password policy with the primary key or returns <code>null</code> if it could not be found. 091 * 092 * @param passwordPolicyId the primary key of the password policy to find 093 * @return the password policy, or <code>null</code> if a password policy with the primary key could not be found 094 * @throws SystemException if a system exception occurred 095 */ 096 public com.liferay.portal.model.PasswordPolicy fetchByPrimaryKey( 097 long passwordPolicyId) 098 throws com.liferay.portal.kernel.exception.SystemException; 099 100 /** 101 * Finds the password policy where companyId = ? and defaultPolicy = ? or throws a {@link com.liferay.portal.NoSuchPasswordPolicyException} if it could not be found. 102 * 103 * @param companyId the company id to search with 104 * @param defaultPolicy the default policy to search with 105 * @return the matching password policy 106 * @throws com.liferay.portal.NoSuchPasswordPolicyException if a matching password policy could not be found 107 * @throws SystemException if a system exception occurred 108 */ 109 public com.liferay.portal.model.PasswordPolicy findByC_DP(long companyId, 110 boolean defaultPolicy) 111 throws com.liferay.portal.NoSuchPasswordPolicyException, 112 com.liferay.portal.kernel.exception.SystemException; 113 114 /** 115 * Finds the password policy where companyId = ? and defaultPolicy = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 116 * 117 * @param companyId the company id to search with 118 * @param defaultPolicy the default policy to search with 119 * @return the matching password policy, or <code>null</code> if a matching password policy could not be found 120 * @throws SystemException if a system exception occurred 121 */ 122 public com.liferay.portal.model.PasswordPolicy fetchByC_DP(long companyId, 123 boolean defaultPolicy) 124 throws com.liferay.portal.kernel.exception.SystemException; 125 126 /** 127 * Finds the password policy where companyId = ? and defaultPolicy = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 128 * 129 * @param companyId the company id to search with 130 * @param defaultPolicy the default policy to search with 131 * @return the matching password policy, or <code>null</code> if a matching password policy could not be found 132 * @throws SystemException if a system exception occurred 133 */ 134 public com.liferay.portal.model.PasswordPolicy fetchByC_DP(long companyId, 135 boolean defaultPolicy, boolean retrieveFromCache) 136 throws com.liferay.portal.kernel.exception.SystemException; 137 138 /** 139 * Finds the password policy where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchPasswordPolicyException} if it could not be found. 140 * 141 * @param companyId the company id to search with 142 * @param name the name to search with 143 * @return the matching password policy 144 * @throws com.liferay.portal.NoSuchPasswordPolicyException if a matching password policy could not be found 145 * @throws SystemException if a system exception occurred 146 */ 147 public com.liferay.portal.model.PasswordPolicy findByC_N(long companyId, 148 java.lang.String name) 149 throws com.liferay.portal.NoSuchPasswordPolicyException, 150 com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Finds the password policy where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 154 * 155 * @param companyId the company id to search with 156 * @param name the name to search with 157 * @return the matching password policy, or <code>null</code> if a matching password policy could not be found 158 * @throws SystemException if a system exception occurred 159 */ 160 public com.liferay.portal.model.PasswordPolicy fetchByC_N(long companyId, 161 java.lang.String name) 162 throws com.liferay.portal.kernel.exception.SystemException; 163 164 /** 165 * Finds the password policy where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 166 * 167 * @param companyId the company id to search with 168 * @param name the name to search with 169 * @return the matching password policy, or <code>null</code> if a matching password policy could not be found 170 * @throws SystemException if a system exception occurred 171 */ 172 public com.liferay.portal.model.PasswordPolicy fetchByC_N(long companyId, 173 java.lang.String name, boolean retrieveFromCache) 174 throws com.liferay.portal.kernel.exception.SystemException; 175 176 /** 177 * Finds all the password policies. 178 * 179 * @return the password policies 180 * @throws SystemException if a system exception occurred 181 */ 182 public java.util.List<com.liferay.portal.model.PasswordPolicy> findAll() 183 throws com.liferay.portal.kernel.exception.SystemException; 184 185 /** 186 * Finds a range of all the password policies. 187 * 188 * <p> 189 * 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. 190 * </p> 191 * 192 * @param start the lower bound of the range of password policies to return 193 * @param end the upper bound of the range of password policies to return (not inclusive) 194 * @return the range of password policies 195 * @throws SystemException if a system exception occurred 196 */ 197 public java.util.List<com.liferay.portal.model.PasswordPolicy> findAll( 198 int start, int end) 199 throws com.liferay.portal.kernel.exception.SystemException; 200 201 /** 202 * Finds an ordered range of all the password policies. 203 * 204 * <p> 205 * 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. 206 * </p> 207 * 208 * @param start the lower bound of the range of password policies to return 209 * @param end the upper bound of the range of password policies to return (not inclusive) 210 * @param orderByComparator the comparator to order the results by 211 * @return the ordered range of password policies 212 * @throws SystemException if a system exception occurred 213 */ 214 public java.util.List<com.liferay.portal.model.PasswordPolicy> findAll( 215 int start, int end, 216 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 217 throws com.liferay.portal.kernel.exception.SystemException; 218 219 /** 220 * Removes the password policy where companyId = ? and defaultPolicy = ? from the database. 221 * 222 * @param companyId the company id to search with 223 * @param defaultPolicy the default policy to search with 224 * @throws SystemException if a system exception occurred 225 */ 226 public void removeByC_DP(long companyId, boolean defaultPolicy) 227 throws com.liferay.portal.NoSuchPasswordPolicyException, 228 com.liferay.portal.kernel.exception.SystemException; 229 230 /** 231 * Removes the password policy where companyId = ? and name = ? from the database. 232 * 233 * @param companyId the company id to search with 234 * @param name the name to search with 235 * @throws SystemException if a system exception occurred 236 */ 237 public void removeByC_N(long companyId, java.lang.String name) 238 throws com.liferay.portal.NoSuchPasswordPolicyException, 239 com.liferay.portal.kernel.exception.SystemException; 240 241 /** 242 * Removes all the password policies from the database. 243 * 244 * @throws SystemException if a system exception occurred 245 */ 246 public void removeAll() 247 throws com.liferay.portal.kernel.exception.SystemException; 248 249 /** 250 * Counts all the password policies where companyId = ? and defaultPolicy = ?. 251 * 252 * @param companyId the company id to search with 253 * @param defaultPolicy the default policy to search with 254 * @return the number of matching password policies 255 * @throws SystemException if a system exception occurred 256 */ 257 public int countByC_DP(long companyId, boolean defaultPolicy) 258 throws com.liferay.portal.kernel.exception.SystemException; 259 260 /** 261 * Counts all the password policies where companyId = ? and name = ?. 262 * 263 * @param companyId the company id to search with 264 * @param name the name to search with 265 * @return the number of matching password policies 266 * @throws SystemException if a system exception occurred 267 */ 268 public int countByC_N(long companyId, java.lang.String name) 269 throws com.liferay.portal.kernel.exception.SystemException; 270 271 /** 272 * Counts all the password policies. 273 * 274 * @return the number of password policies 275 * @throws SystemException if a system exception occurred 276 */ 277 public int countAll() 278 throws com.liferay.portal.kernel.exception.SystemException; 279 }