Interface IAiUserRateLimitDAO
- All Known Implementing Classes:
AiUserRateLimitDAO
public interface IAiUserRateLimitDAO
IAiUserRateLimitDAO Interface
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the tablefindByUserId(String strUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Find the rate limit by user IDvoidinsert(AiUserRateLimit aiUserRateLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the tableload(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tablevoidremoveExpiredEntries(Timestamp cutoffTimestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove expired rate limit entriesvoidstore(AiUserRateLimit aiUserRateLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the record in the table
-
Method Details
-
insert
Insert a new record in the table- Parameters:
aiUserRateLimit- instance of the AiUserRateLimit object to insertplugin- the Plugin
-
store
Update the record in the table- Parameters:
aiUserRateLimit- the reference of the AiUserRateLimitplugin- the Plugin
-
delete
void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the table- Parameters:
nKey- The identifier of the AiUserRateLimit to deleteplugin- the Plugin
-
load
Load the data from the table- Parameters:
nKey- The identifier of the aiUserRateLimitplugin- the Plugin- Returns:
- The instance of the aiUserRateLimit
-
findByUserId
Optional<AiUserRateLimit> findByUserId(String strUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Find the rate limit by user ID- Parameters:
strUserId- The user IDplugin- the Plugin- Returns:
- The instance of the AiUserRateLimit
-
removeExpiredEntries
void removeExpiredEntries(Timestamp cutoffTimestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove expired rate limit entries- Parameters:
cutoffTimestamp- The cutoff timestampplugin- the Plugin
-