public class MFATimeBasedOTPEntryUtil
extends java.lang.Object
com.liferay.multi.factor.authentication.timebased.otp.service.persistence.impl.MFATimeBasedOTPEntryPersistenceImpl
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
MFATimeBasedOTPEntryPersistence
Constructor and Description |
---|
MFATimeBasedOTPEntryUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(java.util.List<MFATimeBasedOTPEntry> mfaTimeBasedOTPEntries)
Caches the mfa time based otp entries in the entity cache if it is enabled.
|
static void |
cacheResult(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry)
Caches the mfa time based otp entry in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry) |
static int |
countAll()
Returns the number of mfa time based otp entries.
|
static int |
countByUserId(long userId)
Returns the number of mfa time based otp entries where userId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static MFATimeBasedOTPEntry |
create(long mfaTimeBasedOTPEntryId)
Creates a new mfa time based otp entry with the primary key.
|
static MFATimeBasedOTPEntry |
fetchByPrimaryKey(long mfaTimeBasedOTPEntryId)
Returns the mfa time based otp entry with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,MFATimeBasedOTPEntry> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static MFATimeBasedOTPEntry |
fetchByUserId(long userId)
Returns the mfa time based otp entry where userId = ? or returns
null if it could not be found. |
static MFATimeBasedOTPEntry |
fetchByUserId(long userId,
boolean useFinderCache)
Returns the mfa time based otp entry where userId = ? or returns
null if it could not be found, optionally using the finder cache. |
static java.util.List<MFATimeBasedOTPEntry> |
findAll()
Returns all the mfa time based otp entries.
|
static java.util.List<MFATimeBasedOTPEntry> |
findAll(int start,
int end)
Returns a range of all the mfa time based otp entries.
|
static java.util.List<MFATimeBasedOTPEntry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<MFATimeBasedOTPEntry> orderByComparator)
Returns an ordered range of all the mfa time based otp entries.
|
static java.util.List<MFATimeBasedOTPEntry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<MFATimeBasedOTPEntry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the mfa time based otp entries.
|
static MFATimeBasedOTPEntry |
findByPrimaryKey(long mfaTimeBasedOTPEntryId)
Returns the mfa time based otp entry with the primary key or throws a
NoSuchEntryException if it could not be found. |
static MFATimeBasedOTPEntry |
findByUserId(long userId)
Returns the mfa time based otp entry where userId = ? or throws a
NoSuchEntryException if it could not be found. |
static java.util.List<MFATimeBasedOTPEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<MFATimeBasedOTPEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<MFATimeBasedOTPEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<MFATimeBasedOTPEntry> orderByComparator) |
static MFATimeBasedOTPEntryPersistence |
getPersistence() |
static MFATimeBasedOTPEntry |
remove(long mfaTimeBasedOTPEntryId)
Removes the mfa time based otp entry with the primary key from the database.
|
static void |
removeAll()
Removes all the mfa time based otp entries from the database.
|
static MFATimeBasedOTPEntry |
removeByUserId(long userId)
Removes the mfa time based otp entry where userId = ? from the database.
|
static MFATimeBasedOTPEntry |
update(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry) |
static MFATimeBasedOTPEntry |
update(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static MFATimeBasedOTPEntry |
updateImpl(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.Map<java.io.Serializable,MFATimeBasedOTPEntry> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MFATimeBasedOTPEntry> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static MFATimeBasedOTPEntry update(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static MFATimeBasedOTPEntry update(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static MFATimeBasedOTPEntry findByUserId(long userId) throws NoSuchEntryException
NoSuchEntryException
if it could not be found.userId
- the user IDNoSuchEntryException
- if a matching mfa time based otp entry could not be foundpublic static MFATimeBasedOTPEntry fetchByUserId(long userId)
null
if it could not be found. Uses the finder cache.userId
- the user IDnull
if a matching mfa time based otp entry could not be foundpublic static MFATimeBasedOTPEntry fetchByUserId(long userId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.userId
- the user IDuseFinderCache
- whether to use the finder cachenull
if a matching mfa time based otp entry could not be foundpublic static MFATimeBasedOTPEntry removeByUserId(long userId) throws NoSuchEntryException
userId
- the user IDNoSuchEntryException
public static int countByUserId(long userId)
userId
- the user IDpublic static void cacheResult(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry)
mfaTimeBasedOTPEntry
- the mfa time based otp entrypublic static void cacheResult(java.util.List<MFATimeBasedOTPEntry> mfaTimeBasedOTPEntries)
mfaTimeBasedOTPEntries
- the mfa time based otp entriespublic static MFATimeBasedOTPEntry create(long mfaTimeBasedOTPEntryId)
mfaTimeBasedOTPEntryId
- the primary key for the new mfa time based otp entrypublic static MFATimeBasedOTPEntry remove(long mfaTimeBasedOTPEntryId) throws NoSuchEntryException
mfaTimeBasedOTPEntryId
- the primary key of the mfa time based otp entryNoSuchEntryException
- if a mfa time based otp entry with the primary key could not be foundpublic static MFATimeBasedOTPEntry updateImpl(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry)
public static MFATimeBasedOTPEntry findByPrimaryKey(long mfaTimeBasedOTPEntryId) throws NoSuchEntryException
NoSuchEntryException
if it could not be found.mfaTimeBasedOTPEntryId
- the primary key of the mfa time based otp entryNoSuchEntryException
- if a mfa time based otp entry with the primary key could not be foundpublic static MFATimeBasedOTPEntry fetchByPrimaryKey(long mfaTimeBasedOTPEntryId)
null
if it could not be found.mfaTimeBasedOTPEntryId
- the primary key of the mfa time based otp entrynull
if a mfa time based otp entry with the primary key could not be foundpublic static java.util.List<MFATimeBasedOTPEntry> findAll()
public static java.util.List<MFATimeBasedOTPEntry> 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 MFATimeBasedOTPEntryModelImpl
.
start
- the lower bound of the range of mfa time based otp entriesend
- the upper bound of the range of mfa time based otp entries (not inclusive)public static java.util.List<MFATimeBasedOTPEntry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MFATimeBasedOTPEntry> 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 MFATimeBasedOTPEntryModelImpl
.
start
- the lower bound of the range of mfa time based otp entriesend
- the upper bound of the range of mfa time based otp entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<MFATimeBasedOTPEntry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MFATimeBasedOTPEntry> 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 MFATimeBasedOTPEntryModelImpl
.
start
- the lower bound of the range of mfa time based otp entriesend
- the upper bound of the range of mfa time based otp entries (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 MFATimeBasedOTPEntryPersistence getPersistence()