Liferay 6.0.5

com.liferay.portal.service.persistence
Interface PasswordPolicyPersistence

All Superinterfaces:
BasePersistence<PasswordPolicy>
All Known Implementing Classes:
PasswordPolicyPersistenceImpl

public interface PasswordPolicyPersistence
extends BasePersistence<PasswordPolicy>

The persistence interface for the password policy service.

Never modify or reference this interface directly. Always use PasswordPolicyUtil to access the password policy persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface.

Caching information and settings can be found in portal.properties

See Also:
PasswordPolicyPersistenceImpl, PasswordPolicyUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Method Summary
 void cacheResult(List<PasswordPolicy> passwordPolicies)
          Caches the password policies in the entity cache if it is enabled.
 void cacheResult(PasswordPolicy passwordPolicy)
          Caches the password policy in the entity cache if it is enabled.
 int countAll()
          Counts all the password policies.
 int countByC_DP(long companyId, boolean defaultPolicy)
          Counts all the password policies where companyId = ? and defaultPolicy = ?.
 int countByC_N(long companyId, String name)
          Counts all the password policies where companyId = ? and name = ?.
 PasswordPolicy create(long passwordPolicyId)
          Creates a new password policy with the primary key.
 PasswordPolicy fetchByC_DP(long companyId, boolean defaultPolicy)
          Finds the password policy where companyId = ? and defaultPolicy = ? or returns null if it could not be found.
 PasswordPolicy fetchByC_DP(long companyId, boolean defaultPolicy, boolean retrieveFromCache)
          Finds the password policy where companyId = ? and defaultPolicy = ? or returns null if it could not be found, optionally using the finder cache.
 PasswordPolicy fetchByC_N(long companyId, String name)
          Finds the password policy where companyId = ? and name = ? or returns null if it could not be found.
 PasswordPolicy fetchByC_N(long companyId, String name, boolean retrieveFromCache)
          Finds the password policy where companyId = ? and name = ? or returns null if it could not be found, optionally using the finder cache.
 PasswordPolicy fetchByPrimaryKey(long passwordPolicyId)
          Finds the password policy with the primary key or returns null if it could not be found.
 List<PasswordPolicy> findAll()
          Finds all the password policies.
 List<PasswordPolicy> findAll(int start, int end)
          Finds a range of all the password policies.
 List<PasswordPolicy> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the password policies.
 PasswordPolicy findByC_DP(long companyId, boolean defaultPolicy)
          Finds the password policy where companyId = ? and defaultPolicy = ? or throws a NoSuchPasswordPolicyException if it could not be found.
 PasswordPolicy findByC_N(long companyId, String name)
          Finds the password policy where companyId = ? and name = ? or throws a NoSuchPasswordPolicyException if it could not be found.
 PasswordPolicy findByPrimaryKey(long passwordPolicyId)
          Finds the password policy with the primary key or throws a NoSuchPasswordPolicyException if it could not be found.
 PasswordPolicy remove(long passwordPolicyId)
          Removes the password policy with the primary key from the database.
 void removeAll()
          Removes all the password policies from the database.
 void removeByC_DP(long companyId, boolean defaultPolicy)
          Removes the password policy where companyId = ? and defaultPolicy = ? from the database.
 void removeByC_N(long companyId, String name)
          Removes the password policy where companyId = ? and name = ? from the database.
 PasswordPolicy updateImpl(PasswordPolicy passwordPolicy, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(PasswordPolicy passwordPolicy)
Caches the password policy in the entity cache if it is enabled.

Parameters:
passwordPolicy - the password policy to cache

cacheResult

void cacheResult(List<PasswordPolicy> passwordPolicies)
Caches the password policies in the entity cache if it is enabled.

Parameters:
passwordPolicies - the password policies to cache

create

PasswordPolicy create(long passwordPolicyId)
Creates a new password policy with the primary key. Does not add the password policy to the database.

Parameters:
passwordPolicyId - the primary key for the new password policy
Returns:
the new password policy

remove

PasswordPolicy remove(long passwordPolicyId)
                      throws NoSuchPasswordPolicyException,
                             SystemException
Removes the password policy with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
passwordPolicyId - the primary key of the password policy to remove
Returns:
the password policy that was removed
Throws:
NoSuchPasswordPolicyException - if a password policy with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

PasswordPolicy updateImpl(PasswordPolicy passwordPolicy,
                          boolean merge)
                          throws SystemException
Throws:
SystemException

findByPrimaryKey

PasswordPolicy findByPrimaryKey(long passwordPolicyId)
                                throws NoSuchPasswordPolicyException,
                                       SystemException
Finds the password policy with the primary key or throws a NoSuchPasswordPolicyException if it could not be found.

Parameters:
passwordPolicyId - the primary key of the password policy to find
Returns:
the password policy
Throws:
NoSuchPasswordPolicyException - if a password policy with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

PasswordPolicy fetchByPrimaryKey(long passwordPolicyId)
                                 throws SystemException
Finds the password policy with the primary key or returns null if it could not be found.

Parameters:
passwordPolicyId - the primary key of the password policy to find
Returns:
the password policy, or null if a password policy with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByC_DP

PasswordPolicy findByC_DP(long companyId,
                          boolean defaultPolicy)
                          throws NoSuchPasswordPolicyException,
                                 SystemException
Finds the password policy where companyId = ? and defaultPolicy = ? or throws a NoSuchPasswordPolicyException if it could not be found.

Parameters:
companyId - the company id to search with
defaultPolicy - the default policy to search with
Returns:
the matching password policy
Throws:
NoSuchPasswordPolicyException - if a matching password policy could not be found
SystemException - if a system exception occurred

fetchByC_DP

PasswordPolicy fetchByC_DP(long companyId,
                           boolean defaultPolicy)
                           throws SystemException
Finds the password policy where companyId = ? and defaultPolicy = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
defaultPolicy - the default policy to search with
Returns:
the matching password policy, or null if a matching password policy could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_DP

PasswordPolicy fetchByC_DP(long companyId,
                           boolean defaultPolicy,
                           boolean retrieveFromCache)
                           throws SystemException
Finds the password policy where companyId = ? and defaultPolicy = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
defaultPolicy - the default policy to search with
Returns:
the matching password policy, or null if a matching password policy could not be found
Throws:
SystemException - if a system exception occurred

findByC_N

PasswordPolicy findByC_N(long companyId,
                         String name)
                         throws NoSuchPasswordPolicyException,
                                SystemException
Finds the password policy where companyId = ? and name = ? or throws a NoSuchPasswordPolicyException if it could not be found.

Parameters:
companyId - the company id to search with
name - the name to search with
Returns:
the matching password policy
Throws:
NoSuchPasswordPolicyException - if a matching password policy could not be found
SystemException - if a system exception occurred

fetchByC_N

PasswordPolicy fetchByC_N(long companyId,
                          String name)
                          throws SystemException
Finds the password policy where companyId = ? and name = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
name - the name to search with
Returns:
the matching password policy, or null if a matching password policy could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_N

PasswordPolicy fetchByC_N(long companyId,
                          String name,
                          boolean retrieveFromCache)
                          throws SystemException
Finds the password policy where companyId = ? and name = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
name - the name to search with
Returns:
the matching password policy, or null if a matching password policy could not be found
Throws:
SystemException - if a system exception occurred

findAll

List<PasswordPolicy> findAll()
                             throws SystemException
Finds all the password policies.

Returns:
the password policies
Throws:
SystemException - if a system exception occurred

findAll

List<PasswordPolicy> findAll(int start,
                             int end)
                             throws SystemException
Finds a range of all the password policies.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of password policies to return
end - the upper bound of the range of password policies to return (not inclusive)
Returns:
the range of password policies
Throws:
SystemException - if a system exception occurred

findAll

List<PasswordPolicy> findAll(int start,
                             int end,
                             OrderByComparator orderByComparator)
                             throws SystemException
Finds an ordered range of all the password policies.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of password policies to return
end - the upper bound of the range of password policies to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of password policies
Throws:
SystemException - if a system exception occurred

removeByC_DP

void removeByC_DP(long companyId,
                  boolean defaultPolicy)
                  throws NoSuchPasswordPolicyException,
                         SystemException
Removes the password policy where companyId = ? and defaultPolicy = ? from the database.

Parameters:
companyId - the company id to search with
defaultPolicy - the default policy to search with
Throws:
SystemException - if a system exception occurred
NoSuchPasswordPolicyException

removeByC_N

void removeByC_N(long companyId,
                 String name)
                 throws NoSuchPasswordPolicyException,
                        SystemException
Removes the password policy where companyId = ? and name = ? from the database.

Parameters:
companyId - the company id to search with
name - the name to search with
Throws:
SystemException - if a system exception occurred
NoSuchPasswordPolicyException

removeAll

void removeAll()
               throws SystemException
Removes all the password policies from the database.

Throws:
SystemException - if a system exception occurred

countByC_DP

int countByC_DP(long companyId,
                boolean defaultPolicy)
                throws SystemException
Counts all the password policies where companyId = ? and defaultPolicy = ?.

Parameters:
companyId - the company id to search with
defaultPolicy - the default policy to search with
Returns:
the number of matching password policies
Throws:
SystemException - if a system exception occurred

countByC_N

int countByC_N(long companyId,
               String name)
               throws SystemException
Counts all the password policies where companyId = ? and name = ?.

Parameters:
companyId - the company id to search with
name - the name to search with
Returns:
the number of matching password policies
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Counts all the password policies.

Returns:
the number of password policies
Throws:
SystemException - if a system exception occurred

Liferay 6.0.5