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