public class RememberMeTokenUtil
extends Object
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
RememberMeTokenPersistence
Constructor and Description |
---|
RememberMeTokenUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(List<RememberMeToken> rememberMeTokens)
Caches the remember me tokens in the entity cache if it is enabled.
|
static void |
cacheResult(RememberMeToken rememberMeToken)
Caches the remember me token in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(RememberMeToken rememberMeToken) |
static int |
countAll()
Returns the number of remember me tokens.
|
static int |
countByUserId(long userId)
Returns the number of remember me tokens where userId = ?.
|
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery) |
static RememberMeToken |
create(long rememberMeTokenId)
Creates a new remember me token with the primary key.
|
static RememberMeToken |
fetchByPrimaryKey(long rememberMeTokenId)
Returns the remember me token with the primary key or returns
null if it could not be found. |
static Map<Serializable,RememberMeToken> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
static RememberMeToken |
fetchByUserId_First(long userId,
OrderByComparator<RememberMeToken> orderByComparator)
Returns the first remember me token in the ordered set where userId = ?.
|
static RememberMeToken |
fetchByUserId_Last(long userId,
OrderByComparator<RememberMeToken> orderByComparator)
Returns the last 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 RememberMeToken |
findByPrimaryKey(long rememberMeTokenId)
Returns the remember me token with the primary key or throws a
NoSuchRememberMeTokenException if it could not be found. |
static RememberMeToken |
findByUserId_First(long userId,
OrderByComparator<RememberMeToken> orderByComparator)
Returns the first remember me token in the ordered set where userId = ?.
|
static RememberMeToken |
findByUserId_Last(long userId,
OrderByComparator<RememberMeToken> orderByComparator)
Returns the last remember me token in the ordered set where userId = ?.
|
static RememberMeToken[] |
findByUserId_PrevAndNext(long rememberMeTokenId,
long userId,
OrderByComparator<RememberMeToken> orderByComparator)
Returns the remember me tokens before and after the current remember me token in the ordered set where userId = ?.
|
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 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 RememberMeTokenPersistence |
getPersistence() |
static RememberMeToken |
remove(long rememberMeTokenId)
Removes the remember me token with the primary key from the database.
|
static void |
removeAll()
Removes all the remember me tokens from the database.
|
static void |
removeByUserId(long userId)
Removes all the remember me tokens where userId = ? from the database.
|
static void |
setPersistence(RememberMeTokenPersistence persistence) |
static RememberMeToken |
update(RememberMeToken rememberMeToken) |
static RememberMeToken |
update(RememberMeToken rememberMeToken,
ServiceContext serviceContext) |
static RememberMeToken |
updateImpl(RememberMeToken rememberMeToken) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(RememberMeToken rememberMeToken)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static Map<Serializable,RememberMeToken> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static List<RememberMeToken> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static List<RememberMeToken> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static List<RememberMeToken> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<RememberMeToken> orderByComparator)
public static RememberMeToken update(RememberMeToken rememberMeToken)
public static RememberMeToken update(RememberMeToken rememberMeToken, ServiceContext serviceContext)
public static List<RememberMeToken> findByUserId(long userId)
userId
- the user IDpublic static List<RememberMeToken> findByUserId(long userId, int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from RememberMeTokenModelImpl
.
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)public static List<RememberMeToken> findByUserId(long userId, int start, int end, OrderByComparator<RememberMeToken> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from RememberMeTokenModelImpl
.
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 (optionally null
)public static List<RememberMeToken> findByUserId(long userId, int start, int end, OrderByComparator<RememberMeToken> orderByComparator, boolean useFinderCache)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from RememberMeTokenModelImpl
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static RememberMeToken findByUserId_First(long userId, OrderByComparator<RememberMeToken> orderByComparator) throws NoSuchRememberMeTokenException
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRememberMeTokenException
- if a matching remember me token could not be foundpublic static RememberMeToken fetchByUserId_First(long userId, OrderByComparator<RememberMeToken> orderByComparator)
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching remember me token could not be foundpublic static RememberMeToken findByUserId_Last(long userId, OrderByComparator<RememberMeToken> orderByComparator) throws NoSuchRememberMeTokenException
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRememberMeTokenException
- if a matching remember me token could not be foundpublic static RememberMeToken fetchByUserId_Last(long userId, OrderByComparator<RememberMeToken> orderByComparator)
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching remember me token could not be foundpublic static RememberMeToken[] findByUserId_PrevAndNext(long rememberMeTokenId, long userId, OrderByComparator<RememberMeToken> orderByComparator) throws NoSuchRememberMeTokenException
rememberMeTokenId
- the primary key of the current remember me tokenuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRememberMeTokenException
- if a remember me token with the primary key could not be foundpublic static void removeByUserId(long userId)
userId
- the user IDpublic static int countByUserId(long userId)
userId
- the user IDpublic static void cacheResult(RememberMeToken rememberMeToken)
rememberMeToken
- the remember me tokenpublic static void cacheResult(List<RememberMeToken> rememberMeTokens)
rememberMeTokens
- the remember me tokenspublic static RememberMeToken create(long rememberMeTokenId)
rememberMeTokenId
- the primary key for the new remember me tokenpublic static RememberMeToken remove(long rememberMeTokenId) throws NoSuchRememberMeTokenException
rememberMeTokenId
- the primary key of the remember me tokenNoSuchRememberMeTokenException
- if a remember me token with the primary key could not be foundpublic static RememberMeToken updateImpl(RememberMeToken rememberMeToken)
public static RememberMeToken findByPrimaryKey(long rememberMeTokenId) throws NoSuchRememberMeTokenException
NoSuchRememberMeTokenException
if it could not be found.rememberMeTokenId
- the primary key of the remember me tokenNoSuchRememberMeTokenException
- if a remember me token with the primary key could not be foundpublic static RememberMeToken fetchByPrimaryKey(long rememberMeTokenId)
null
if it could not be found.rememberMeTokenId
- the primary key of the remember me tokennull
if a remember me token with the primary key could not be foundpublic static List<RememberMeToken> findAll()
public static List<RememberMeToken> findAll(int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from RememberMeTokenModelImpl
.
start
- the lower bound of the range of remember me tokensend
- the upper bound of the range of remember me tokens (not inclusive)public static List<RememberMeToken> findAll(int start, int end, OrderByComparator<RememberMeToken> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from RememberMeTokenModelImpl
.
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 (optionally null
)public static List<RememberMeToken> findAll(int start, int end, OrderByComparator<RememberMeToken> orderByComparator, boolean useFinderCache)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from RememberMeTokenModelImpl
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static RememberMeTokenPersistence getPersistence()
public static void setPersistence(RememberMeTokenPersistence persistence)