Package org.keycloak.events.jpa
Class JpaEventQuery
java.lang.Object
org.keycloak.events.jpa.JpaEventQuery
- All Implemented Interfaces:
EventQuery
- Author:
- Stian Thorgersen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSearch events for only one clientfirstResult
(int firstResult) Index of the first result to return.Search events that are newer thanfromDate
Returns requested results that match given criteria as a stream.Search events from ipAddressmaxResults
(int maxResults) Maximum number of results to return.Order the result by ascending timeOrder the result by descending timeSearch events within realmSearch events that are older thantoDate
Search events with given typesSearch events for only one user
-
Constructor Details
-
JpaEventQuery
public JpaEventQuery(jakarta.persistence.EntityManager em)
-
-
Method Details
-
type
Description copied from interface:EventQuery
Search events with given types- Specified by:
type
in interfaceEventQuery
- Parameters:
types
- requested types- Returns:
- this object for method chaining
-
realm
Description copied from interface:EventQuery
Search events within realm- Specified by:
realm
in interfaceEventQuery
- Parameters:
realmId
- id of realm- Returns:
- this object for method chaining
-
client
Description copied from interface:EventQuery
Search events for only one client- Specified by:
client
in interfaceEventQuery
- Parameters:
clientId
- id of client- Returns:
- this object for method chaining
-
user
Description copied from interface:EventQuery
Search events for only one user- Specified by:
user
in interfaceEventQuery
- Parameters:
userId
- id of user- Returns:
- this object for method chaining
-
fromDate
Description copied from interface:EventQuery
Search events that are newer thanfromDate
- Specified by:
fromDate
in interfaceEventQuery
- Parameters:
fromDate
- date- Returns:
- this object for method chaining
-
toDate
Description copied from interface:EventQuery
Search events that are older thantoDate
- Specified by:
toDate
in interfaceEventQuery
- Parameters:
toDate
- date- Returns:
- this object for method chaining
-
ipAddress
Description copied from interface:EventQuery
Search events from ipAddress- Specified by:
ipAddress
in interfaceEventQuery
- Parameters:
ipAddress
- ip- Returns:
- this object for method chaining
-
firstResult
Description copied from interface:EventQuery
Index of the first result to return.- Specified by:
firstResult
in interfaceEventQuery
- Parameters:
firstResult
- the index. Ignored if negative.- Returns:
- this object for method chaining
-
maxResults
Description copied from interface:EventQuery
Maximum number of results to return.- Specified by:
maxResults
in interfaceEventQuery
- Parameters:
maxResults
- a number. Ignored if negative.- Returns:
- this object for method chaining
-
orderByDescTime
Description copied from interface:EventQuery
Order the result by descending time- Specified by:
orderByDescTime
in interfaceEventQuery
- Returns:
this
for method chaining
-
orderByAscTime
Description copied from interface:EventQuery
Order the result by ascending time- Specified by:
orderByAscTime
in interfaceEventQuery
- Returns:
this
for method chaining
-
getResultStream
Description copied from interface:EventQuery
Returns requested results that match given criteria as a stream.- Specified by:
getResultStream
in interfaceEventQuery
- Returns:
- Stream of events. Never returns
null
.
-