Package com.avoka.fc.core.dao
Class UserAuthEventDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.UserAuthEventDao
-
public class UserAuthEventDao extends AbstractDao
Provides a UserAuthEvent Data Access Object (DAO).- Since:
- 4.1.3
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description UserAuthEventDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserAuthEvent
getLastUserAuthEvent(UserAccount userAccount, Portal portal)
Return the last user auth event for the given user and portal.UserAuthEvent
getUserAuthEvent(String sessionId, Portal portal, String ipAddress)
Returns the last UserAuthEvent for a given sessionID, and ipAddress made within the session timeout for the portal.List<UserAuthEvent>
getUserAuthEventList(String clientId, String loginName, String eventType, Portal portal, String ipAddress, Date startDate, Date endDate)
Return the user authentication event list for the given search criteria.List<UserAuthEvent>
getUserAuthEventList(String clientId, String loginName, String eventType, Portal portal, String ipAddress, Date startDate, Date endDate, int pageSize, int fetchLimit)
Return the user authentication event list for the given search criteria.List<UserAuthEvent>
getUserAuthEventsForUser(UserAccount userAccount, int fetchLimit)
Return the user authentication events for the given user, ordered by event time descending.int
purgeUserAuthEvents(int maxAgeDays, int fetchLimit, long maxTimeMs)
Purge user auth event log records older than a specified number of days-
Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
-
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
-
-
-
Method Detail
-
getUserAuthEventsForUser
public List<UserAuthEvent> getUserAuthEventsForUser(UserAccount userAccount, int fetchLimit)
Return the user authentication events for the given user, ordered by event time descending.- Parameters:
userAccount
- the user to return (required)fetchLimit
- the maximum number of rows to return- Returns:
- the user authentication events for the given user, ordered by event time descending.
-
getLastUserAuthEvent
public UserAuthEvent getLastUserAuthEvent(UserAccount userAccount, Portal portal)
Return the last user auth event for the given user and portal.- Parameters:
userAccount
- the user to return (required)portal
- the the portal (required)- Returns:
- the last user auth event for the given user and portal
- Since:
- 17.10.0
-
getUserAuthEventList
public List<UserAuthEvent> getUserAuthEventList(String clientId, String loginName, String eventType, Portal portal, String ipAddress, Date startDate, Date endDate)
Return the user authentication event list for the given search criteria.- Parameters:
clientId
- the selected client idloginName
- the user login nameeventType
- the event typeportal
- the selected portalipAddress
- the user IP addressstartDate
- the search start dateendDate
- the search end date- Returns:
- the user authentication event list for the given search criteria
-
getUserAuthEventList
public List<UserAuthEvent> getUserAuthEventList(String clientId, String loginName, String eventType, Portal portal, String ipAddress, Date startDate, Date endDate, int pageSize, int fetchLimit)
Return the user authentication event list for the given search criteria.- Parameters:
clientId
- the selected client idloginName
- the user login nameeventType
- the event typeportal
- the selected portalipAddress
- the user IP addressstartDate
- the search start dateendDate
- the search end datepageSize
- the query page sizefetchLimit
- the query fetch limit- Returns:
- the user authentication event list for the given search criteria
- Since:
- 4.3.0
-
purgeUserAuthEvents
public int purgeUserAuthEvents(int maxAgeDays, int fetchLimit, long maxTimeMs)
Purge user auth event log records older than a specified number of days- Parameters:
maxAgeDays
- The age in days above which records will be deleted. If this value is negative or equal to 0, no records will be purged.fetchLimit
- the maximum number of records to delete (only used if > 0)maxTimeMs
- the maximum time that can be used to purge records- Returns:
- the number of records that were deleted
-
getUserAuthEvent
public UserAuthEvent getUserAuthEvent(String sessionId, Portal portal, String ipAddress)
Returns the last UserAuthEvent for a given sessionID, and ipAddress made within the session timeout for the portal. The security manager for the portal provides the session timeout.- Parameters:
sessionId
- the sessionId for the module portalportal
- the module portalipAddress
- the request ip address- Returns:
- the last UserAuthEvent for the query.
- Since:
- 5.1.0
-
-