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