Class MFATimeBasedOTPEntryUtil
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
- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry) Caches the mfa time based otp entry in the entity cache if it is enabled.static voidcacheResult(List<MFATimeBasedOTPEntry> mfaTimeBasedOTPEntries) Caches the mfa time based otp entries in the entity cache if it is enabled.static voidstatic voidclearCache(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry) static intcountAll()Returns the number of mfa time based otp entries.static intcountByUserId(long userId) Returns the number of mfa time based otp entries where userId = ?.static longcountWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static MFATimeBasedOTPEntrycreate(long mfaTimeBasedOTPEntryId) Creates a new mfa time based otp entry with the primary key.static MFATimeBasedOTPEntryfetchByPrimaryKey(long mfaTimeBasedOTPEntryId) Returns the mfa time based otp entry with the primary key or returnsnullif it could not be found.static Map<Serializable, MFATimeBasedOTPEntry> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static MFATimeBasedOTPEntryfetchByUserId(long userId) Returns the mfa time based otp entry where userId = ? or returnsnullif it could not be found.static MFATimeBasedOTPEntryfetchByUserId(long userId, boolean useFinderCache) Returns the mfa time based otp entry where userId = ? or returnsnullif it could not be found, optionally using the finder cache.static List<MFATimeBasedOTPEntry> findAll()Returns all the mfa time based otp entries.static List<MFATimeBasedOTPEntry> findAll(int start, int end) Returns a range of all the mfa time based otp entries.static 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 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 MFATimeBasedOTPEntryfindByPrimaryKey(long mfaTimeBasedOTPEntryId) Returns the mfa time based otp entry with the primary key or throws aNoSuchEntryExceptionif it could not be found.static MFATimeBasedOTPEntryfindByUserId(long userId) Returns the mfa time based otp entry where userId = ? or throws aNoSuchEntryExceptionif it could not be found.static List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) static List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MFATimeBasedOTPEntry> orderByComparator) static MFATimeBasedOTPEntryremove(long mfaTimeBasedOTPEntryId) Removes the mfa time based otp entry with the primary key from the database.static voidRemoves all the mfa time based otp entries from the database.static MFATimeBasedOTPEntryremoveByUserId(long userId) Removes the mfa time based otp entry where userId = ? from the database.static voidsetPersistence(MFATimeBasedOTPEntryPersistence persistence) static MFATimeBasedOTPEntryupdate(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry) static MFATimeBasedOTPEntryupdate(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry, com.liferay.portal.kernel.service.ServiceContext serviceContext) static MFATimeBasedOTPEntryupdateImpl(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry)
-
Constructor Details
-
MFATimeBasedOTPEntryUtil
public MFATimeBasedOTPEntryUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
- See Also:
-
countWithDynamicQuery
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
fetchByPrimaryKeys
public static Map<Serializable,MFATimeBasedOTPEntry> fetchByPrimaryKeys(Set<Serializable> primaryKeys) - See Also:
-
findWithDynamicQuery
public static List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
findWithDynamicQuery
public static List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) - See Also:
-
findWithDynamicQuery
public static List<MFATimeBasedOTPEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MFATimeBasedOTPEntry> orderByComparator) - See Also:
-
update
- See Also:
-
update
public static MFATimeBasedOTPEntry update(MFATimeBasedOTPEntry mfaTimeBasedOTPEntry, com.liferay.portal.kernel.service.ServiceContext serviceContext) - See Also:
-
findByUserId
Returns the mfa time based otp entry where userId = ? or throws aNoSuchEntryExceptionif it could not be found.- Parameters:
userId- the user ID- Returns:
- the matching mfa time based otp entry
-
fetchByUserId
Returns the mfa time based otp entry where userId = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
userId- the user ID- Returns:
- the matching mfa time based otp entry, or
nullif a matching mfa time based otp entry could not be found
-
fetchByUserId
Returns the mfa time based otp entry where userId = ? or returnsnullif it could not be found, optionally using the finder cache.- Parameters:
userId- the user IDuseFinderCache- whether to use the finder cache- Returns:
- the matching mfa time based otp entry, or
nullif a matching mfa time based otp entry could not be found
-
removeByUserId
Removes the mfa time based otp entry where userId = ? from the database.- Parameters:
userId- the user ID- Returns:
- the mfa time based otp entry that was removed
- Throws:
NoSuchEntryException
-
countByUserId
public static int countByUserId(long userId) Returns the number of mfa time based otp entries where userId = ?.- Parameters:
userId- the user ID- Returns:
- the number of matching mfa time based otp entries
-
cacheResult
Caches the mfa time based otp entry in the entity cache if it is enabled.- Parameters:
mfaTimeBasedOTPEntry- the mfa time based otp entry
-
cacheResult
Caches the mfa time based otp entries in the entity cache if it is enabled.- Parameters:
mfaTimeBasedOTPEntries- the mfa time based otp entries
-
create
Creates a new mfa time based otp entry with the primary key. Does not add the mfa time based otp entry to the database.- Parameters:
mfaTimeBasedOTPEntryId- the primary key for the new mfa time based otp entry- Returns:
- the new mfa time based otp entry
-
remove
Removes the mfa time based otp entry with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
mfaTimeBasedOTPEntryId- the primary key of the mfa time based otp entry- Returns:
- the mfa time based otp entry that was removed
-
updateImpl
-
findByPrimaryKey
public static MFATimeBasedOTPEntry findByPrimaryKey(long mfaTimeBasedOTPEntryId) throws NoSuchEntryException Returns the mfa time based otp entry with the primary key or throws aNoSuchEntryExceptionif it could not be found.- Parameters:
mfaTimeBasedOTPEntryId- the primary key of the mfa time based otp entry- Returns:
- the mfa time based otp entry
-
fetchByPrimaryKey
Returns the mfa time based otp entry with the primary key or returnsnullif it could not be found.- Parameters:
mfaTimeBasedOTPEntryId- the primary key of the mfa time based otp entry- Returns:
- the mfa time based otp entry, or
nullif a mfa time based otp entry with the primary key could not be found
-
findAll
Returns all the mfa time based otp entries.- Returns:
- the mfa time based otp entries
-
findAll
Returns a range of all the mfa time based otp entries.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 bothstartandendtoQueryUtil#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 fromMFATimeBasedOTPEntryModelImpl.- Parameters:
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)- Returns:
- the range of mfa time based otp entries
-
findAll
public static 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.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 bothstartandendtoQueryUtil#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 fromMFATimeBasedOTPEntryModelImpl.- Parameters:
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 (optionallynull)- Returns:
- the ordered range of mfa time based otp entries
-
findAll
public static 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.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 bothstartandendtoQueryUtil#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 fromMFATimeBasedOTPEntryModelImpl.- Parameters:
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 (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of mfa time based otp entries
-
removeAll
public static void removeAll()Removes all the mfa time based otp entries from the database. -
countAll
public static int countAll()Returns the number of mfa time based otp entries.- Returns:
- the number of mfa time based otp entries
-
getPersistence
-
setPersistence
-