Package org.keycloak.events.jpa
Class JpaAdminEventQuery
- java.lang.Object
-
- org.keycloak.events.jpa.JpaAdminEventQuery
-
- All Implemented Interfaces:
AdminEventQuery
public class JpaAdminEventQuery extends Object implements AdminEventQuery
- Author:
- Giriraj Sharma
-
-
Constructor Summary
Constructors Constructor Description JpaAdminEventQuery(javax.persistence.EntityManager em)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdminEventQuery
authClient(String authClientId)
Search by authenticated clientAdminEventQuery
authIpAddress(String ipAddress)
Search by request ip addressAdminEventQuery
authRealm(String authRealmId)
Search by authentication realmAdminEventQuery
authUser(String authUserId)
Search by authenticated userAdminEventQuery
firstResult(int firstResult)
Used for paginationAdminEventQuery
fromTime(Date fromTime)
Search by events after the specified timeStream<AdminEvent>
getResultStream()
Executes the query and returns the results as a stream.AdminEventQuery
maxResults(int maxResults)
Use for paginationAdminEventQuery
operation(OperationType... operations)
Search by operation typeAdminEventQuery
orderByAscTime()
Order the result by ascending timeAdminEventQuery
orderByDescTime()
Order the result by descending timeAdminEventQuery
realm(String realmId)
Search by resource realmAdminEventQuery
resourcePath(String resourcePath)
Search by resource path.AdminEventQuery
resourceType(ResourceType... resourceTypes)
Search byResourceType
.AdminEventQuery
toTime(Date toTime)
Search by events before the specified time
-
-
-
Method Detail
-
realm
public AdminEventQuery realm(String realmId)
Description copied from interface:AdminEventQuery
Search by resource realm- Specified by:
realm
in interfaceAdminEventQuery
- Parameters:
realmId
- realm id- Returns:
- Associated
AdminEventQuery
for method chaining
-
operation
public AdminEventQuery operation(OperationType... operations)
Description copied from interface:AdminEventQuery
Search by operation type- Specified by:
operation
in interfaceAdminEventQuery
- Returns:
this
for method chaining
-
resourceType
public AdminEventQuery resourceType(ResourceType... resourceTypes)
Description copied from interface:AdminEventQuery
Search byResourceType
.- Specified by:
resourceType
in interfaceAdminEventQuery
- Returns:
this
for method chaining
-
authRealm
public AdminEventQuery authRealm(String authRealmId)
Description copied from interface:AdminEventQuery
Search by authentication realm- Specified by:
authRealm
in interfaceAdminEventQuery
- Parameters:
authRealmId
- realm id- Returns:
- Associated
AdminEventQuery
for method chaining
-
authClient
public AdminEventQuery authClient(String authClientId)
Description copied from interface:AdminEventQuery
Search by authenticated client- Specified by:
authClient
in interfaceAdminEventQuery
- Parameters:
authClientId
- client uuid- Returns:
- Associated
AdminEventQuery
for method chaining
-
authUser
public AdminEventQuery authUser(String authUserId)
Description copied from interface:AdminEventQuery
Search by authenticated user- Specified by:
authUser
in interfaceAdminEventQuery
- Parameters:
authUserId
- user uuid- Returns:
- Associated
AdminEventQuery
for method chaining
-
authIpAddress
public AdminEventQuery authIpAddress(String ipAddress)
Description copied from interface:AdminEventQuery
Search by request ip address- Specified by:
authIpAddress
in interfaceAdminEventQuery
- Returns:
- Associated
AdminEventQuery
for method chaining
-
resourcePath
public AdminEventQuery resourcePath(String resourcePath)
Description copied from interface:AdminEventQuery
Search by resource path. Supports wildcard*
. For example:- */master - matches 'realms/master'
- realms/master/*/00d4b16f - matches 'realms/master/clients/00d4b16f'
- realms/master/* - matches anything under 'realms/master'
- Specified by:
resourcePath
in interfaceAdminEventQuery
- Returns:
this
for method chaining
-
fromTime
public AdminEventQuery fromTime(Date fromTime)
Description copied from interface:AdminEventQuery
Search by events after the specified time- Specified by:
fromTime
in interfaceAdminEventQuery
- Parameters:
fromTime
- from date- Returns:
this
for method chaining
-
toTime
public AdminEventQuery toTime(Date toTime)
Description copied from interface:AdminEventQuery
Search by events before the specified time- Specified by:
toTime
in interfaceAdminEventQuery
- Parameters:
toTime
- to date- Returns:
this
for method chaining
-
firstResult
public AdminEventQuery firstResult(int firstResult)
Description copied from interface:AdminEventQuery
Used for pagination- Specified by:
firstResult
in interfaceAdminEventQuery
- Parameters:
firstResult
- first result to return- Returns:
this
for method chaining
-
maxResults
public AdminEventQuery maxResults(int maxResults)
Description copied from interface:AdminEventQuery
Use for pagination- Specified by:
maxResults
in interfaceAdminEventQuery
- Parameters:
maxResults
- the maximum results to return- Returns:
this
for method chaining
-
orderByDescTime
public AdminEventQuery orderByDescTime()
Description copied from interface:AdminEventQuery
Order the result by descending time- Specified by:
orderByDescTime
in interfaceAdminEventQuery
- Returns:
this
for method chaining
-
orderByAscTime
public AdminEventQuery orderByAscTime()
Description copied from interface:AdminEventQuery
Order the result by ascending time- Specified by:
orderByAscTime
in interfaceAdminEventQuery
- Returns:
this
for method chaining
-
getResultStream
public Stream<AdminEvent> getResultStream()
Description copied from interface:AdminEventQuery
Executes the query and returns the results as a stream.- Specified by:
getResultStream
in interfaceAdminEventQuery
- Returns:
- Stream of admin events. Never returns
null
.
-
-