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