Class RememberMeTokenUtil
com.liferay.portal.service.persistence.impl.RememberMeTokenPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
Caching information and settings can be found in portal.properties
- Author:
- Brian Wing Shun Chan
- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(RememberMeToken rememberMeToken) Caches the remember me token in the entity cache if it is enabled.static voidcacheResult(List<RememberMeToken> rememberMeTokens) Caches the remember me tokens in the entity cache if it is enabled.static voidstatic voidclearCache(RememberMeToken rememberMeToken) static intcountAll()Returns the number of remember me tokens.static intcountByLteExpirationDate(Date expirationDate) Returns the number of remember me tokens where expirationDate ≤ ?.static intcountByUserId(long userId) Returns the number of remember me tokens where userId = ?.static longcountWithDynamicQuery(DynamicQuery dynamicQuery) static RememberMeTokencreate(long rememberMeTokenId) Creates a new remember me token with the primary key.static RememberMeTokenfetchByLteExpirationDate_First(Date expirationDate, OrderByComparator<RememberMeToken> orderByComparator) Returns the first remember me token in the ordered set where expirationDate ≤ ?.static RememberMeTokenfetchByPrimaryKey(long rememberMeTokenId) Returns the remember me token with the primary key or returnsnullif it could not be found.static Map<Serializable, RememberMeToken> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static RememberMeTokenfetchByUserId_First(long userId, OrderByComparator<RememberMeToken> orderByComparator) Returns the first remember me token in the ordered set where userId = ?.static List<RememberMeToken> findAll()Returns all the remember me tokens.static List<RememberMeToken> findAll(int start, int end) Returns a range of all the remember me tokens.static List<RememberMeToken> findAll(int start, int end, OrderByComparator<RememberMeToken> orderByComparator) Returns an ordered range of all the remember me tokens.static List<RememberMeToken> findAll(int start, int end, OrderByComparator<RememberMeToken> orderByComparator, boolean useFinderCache) Returns an ordered range of all the remember me tokens.static List<RememberMeToken> findByLteExpirationDate(Date expirationDate) Returns all the remember me tokens where expirationDate ≤ ?.static List<RememberMeToken> findByLteExpirationDate(Date expirationDate, int start, int end) Returns a range of all the remember me tokens where expirationDate ≤ ?.static List<RememberMeToken> findByLteExpirationDate(Date expirationDate, int start, int end, OrderByComparator<RememberMeToken> orderByComparator) Returns an ordered range of all the remember me tokens where expirationDate ≤ ?.static List<RememberMeToken> findByLteExpirationDate(Date expirationDate, int start, int end, OrderByComparator<RememberMeToken> orderByComparator, boolean useFinderCache) Returns an ordered range of all the remember me tokens where expirationDate ≤ ?.static RememberMeTokenfindByLteExpirationDate_First(Date expirationDate, OrderByComparator<RememberMeToken> orderByComparator) Returns the first remember me token in the ordered set where expirationDate ≤ ?.static RememberMeTokenfindByPrimaryKey(long rememberMeTokenId) Returns the remember me token with the primary key or throws aNoSuchRememberMeTokenExceptionif it could not be found.static List<RememberMeToken> findByUserId(long userId) Returns all the remember me tokens where userId = ?.static List<RememberMeToken> findByUserId(long userId, int start, int end) Returns a range of all the remember me tokens where userId = ?.static List<RememberMeToken> findByUserId(long userId, int start, int end, OrderByComparator<RememberMeToken> orderByComparator) Returns an ordered range of all the remember me tokens where userId = ?.static List<RememberMeToken> findByUserId(long userId, int start, int end, OrderByComparator<RememberMeToken> orderByComparator, boolean useFinderCache) Returns an ordered range of all the remember me tokens where userId = ?.static RememberMeTokenfindByUserId_First(long userId, OrderByComparator<RememberMeToken> orderByComparator) Returns the first remember me token in the ordered set where userId = ?.static List<RememberMeToken> findWithDynamicQuery(DynamicQuery dynamicQuery) static List<RememberMeToken> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) static List<RememberMeToken> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<RememberMeToken> orderByComparator) static RememberMeTokenPersistencestatic RememberMeTokenremove(long rememberMeTokenId) Removes the remember me token with the primary key from the database.static voidRemoves all the remember me tokens from the database.static voidremoveByLteExpirationDate(Date expirationDate) Removes all the remember me tokens where expirationDate ≤ ? from the database.static voidremoveByUserId(long userId) Removes all the remember me tokens where userId = ? from the database.static voidsetPersistence(RememberMeTokenPersistence persistence) static RememberMeTokenupdate(RememberMeToken rememberMeToken) static RememberMeTokenupdate(RememberMeToken rememberMeToken, ServiceContext serviceContext) static RememberMeTokenupdateImpl(RememberMeToken rememberMeToken)
-
Constructor Details
-
RememberMeTokenUtil
public RememberMeTokenUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
- See Also:
-
countWithDynamicQuery
- See Also:
-
fetchByPrimaryKeys
- See Also:
-
findWithDynamicQuery
- See Also:
-
findWithDynamicQuery
public static List<RememberMeToken> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) - See Also:
-
findWithDynamicQuery
public static List<RememberMeToken> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<RememberMeToken> orderByComparator) - See Also:
-
update
- See Also:
-
update
public static RememberMeToken update(RememberMeToken rememberMeToken, ServiceContext serviceContext) - See Also:
-
findByUserId
Returns all the remember me tokens where userId = ?.- Parameters:
userId- the user ID- Returns:
- the matching remember me tokens
-
findByUserId
Returns a range of all the remember me tokens where userId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
userId- the user IDstart- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)- Returns:
- the range of matching remember me tokens
-
findByUserId
public static List<RememberMeToken> findByUserId(long userId, int start, int end, OrderByComparator<RememberMeToken> orderByComparator) Returns an ordered range of all the remember me tokens where userId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
userId- the user IDstart- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching remember me tokens
-
findByUserId
public static List<RememberMeToken> findByUserId(long userId, int start, int end, OrderByComparator<RememberMeToken> orderByComparator, boolean useFinderCache) Returns an ordered range of all the remember me tokens where userId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
userId- the user IDstart- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching remember me tokens
-
findByUserId_First
public static RememberMeToken findByUserId_First(long userId, OrderByComparator<RememberMeToken> orderByComparator) throws NoSuchRememberMeTokenException Returns the first remember me token in the ordered set where userId = ?.- Parameters:
userId- the user IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching remember me token
-
fetchByUserId_First
public static RememberMeToken fetchByUserId_First(long userId, OrderByComparator<RememberMeToken> orderByComparator) Returns the first remember me token in the ordered set where userId = ?.- Parameters:
userId- the user IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching remember me token, or
nullif a matching remember me token could not be found
-
removeByUserId
public static void removeByUserId(long userId) Removes all the remember me tokens where userId = ? from the database.- Parameters:
userId- the user ID
-
countByUserId
public static int countByUserId(long userId) Returns the number of remember me tokens where userId = ?.- Parameters:
userId- the user ID- Returns:
- the number of matching remember me tokens
-
findByLteExpirationDate
Returns all the remember me tokens where expirationDate ≤ ?.- Parameters:
expirationDate- the expiration date- Returns:
- the matching remember me tokens
-
findByLteExpirationDate
public static List<RememberMeToken> findByLteExpirationDate(Date expirationDate, int start, int end) Returns a range of all the remember me tokens where expirationDate ≤ ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
expirationDate- the expiration datestart- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)- Returns:
- the range of matching remember me tokens
-
findByLteExpirationDate
public static List<RememberMeToken> findByLteExpirationDate(Date expirationDate, int start, int end, OrderByComparator<RememberMeToken> orderByComparator) Returns an ordered range of all the remember me tokens where expirationDate ≤ ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
expirationDate- the expiration datestart- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching remember me tokens
-
findByLteExpirationDate
public static List<RememberMeToken> findByLteExpirationDate(Date expirationDate, int start, int end, OrderByComparator<RememberMeToken> orderByComparator, boolean useFinderCache) Returns an ordered range of all the remember me tokens where expirationDate ≤ ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
expirationDate- the expiration datestart- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching remember me tokens
-
findByLteExpirationDate_First
public static RememberMeToken findByLteExpirationDate_First(Date expirationDate, OrderByComparator<RememberMeToken> orderByComparator) throws NoSuchRememberMeTokenException Returns the first remember me token in the ordered set where expirationDate ≤ ?.- Parameters:
expirationDate- the expiration dateorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching remember me token
-
fetchByLteExpirationDate_First
public static RememberMeToken fetchByLteExpirationDate_First(Date expirationDate, OrderByComparator<RememberMeToken> orderByComparator) Returns the first remember me token in the ordered set where expirationDate ≤ ?.- Parameters:
expirationDate- the expiration dateorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching remember me token, or
nullif a matching remember me token could not be found
-
removeByLteExpirationDate
Removes all the remember me tokens where expirationDate ≤ ? from the database.- Parameters:
expirationDate- the expiration date
-
countByLteExpirationDate
Returns the number of remember me tokens where expirationDate ≤ ?.- Parameters:
expirationDate- the expiration date- Returns:
- the number of matching remember me tokens
-
cacheResult
Caches the remember me token in the entity cache if it is enabled.- Parameters:
rememberMeToken- the remember me token
-
cacheResult
Caches the remember me tokens in the entity cache if it is enabled.- Parameters:
rememberMeTokens- the remember me tokens
-
create
Creates a new remember me token with the primary key. Does not add the remember me token to the database.- Parameters:
rememberMeTokenId- the primary key for the new remember me token- Returns:
- the new remember me token
-
remove
Removes the remember me token with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
rememberMeTokenId- the primary key of the remember me token- Returns:
- the remember me token that was removed
-
updateImpl
-
findByPrimaryKey
public static RememberMeToken findByPrimaryKey(long rememberMeTokenId) throws NoSuchRememberMeTokenException Returns the remember me token with the primary key or throws aNoSuchRememberMeTokenExceptionif it could not be found.- Parameters:
rememberMeTokenId- the primary key of the remember me token- Returns:
- the remember me token
-
fetchByPrimaryKey
Returns the remember me token with the primary key or returnsnullif it could not be found.- Parameters:
rememberMeTokenId- the primary key of the remember me token- Returns:
- the remember me token, or
nullif a remember me token with the primary key could not be found
-
findAll
Returns all the remember me tokens.- Returns:
- the remember me tokens
-
findAll
Returns a range of all the remember me tokens.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
start- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)- Returns:
- the range of remember me tokens
-
findAll
public static List<RememberMeToken> findAll(int start, int end, OrderByComparator<RememberMeToken> orderByComparator) Returns an ordered range of all the remember me tokens.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
start- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of remember me tokens
-
findAll
public static List<RememberMeToken> findAll(int start, int end, OrderByComparator<RememberMeToken> orderByComparator, boolean useFinderCache) Returns an ordered range of all the remember me tokens.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RememberMeTokenModelImpl.- Parameters:
start- the lower bound of the range of remember me tokensend- the upper bound of the range of remember me tokens (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of remember me tokens
-
removeAll
public static void removeAll()Removes all the remember me tokens from the database. -
countAll
public static int countAll()Returns the number of remember me tokens.- Returns:
- the number of remember me tokens
-
getPersistence
-
setPersistence
-