public interface MapKeycloakTransaction<V extends AbstractEntity,M> extends KeycloakTransaction
Modifier and Type | Method and Description |
---|---|
V |
create(V value)
Instructs this transaction to add a new value into the underlying store on commit.
|
long |
delete(QueryParameters<M> queryParameters)
Instructs this transaction to remove values (identified by
mcb filter) from the underlying store on commit. |
boolean |
delete(String key)
Instructs this transaction to delete a value associated with the identifier
key from the underlying store
on commit. |
long |
getCount(QueryParameters<M> queryParameters)
Returns a number of values present in the underlying storage that fulfill the given criteria with respect to
changes done in the current transaction.
|
Stream<V> |
read(QueryParameters<M> queryParameters)
Returns a stream of values from underlying storage that are updated based on the current transaction changes;
i.e.
|
V |
read(String key)
Provides possibility to lookup for values by a
key in the underlying store with respect to changes done
in current transaction. |
begin, commit, getRollbackOnly, isActive, rollback, setRollbackOnly
V create(V value)
Updates to the returned instances of V
would be visible in the current transaction
and will propagate into the underlying store upon commit.
value
- the valuevalue
in the store. It may or may not be the same instance as value
V read(String key)
key
in the underlying store with respect to changes done
in current transaction. Updates to the returned instance would be visible in the current transaction
and will propagate into the underlying store upon commit.key
- identifier of a valuekey
Stream<V> read(QueryParameters<M> queryParameters)
create(V)
, MapKeycloakTransaction#update
,
delete(java.lang.String)
, etc.
Updates to the returned instances of V
would be visible in the current transaction
and will propagate into the underlying store upon commit.
queryParameters
- parameters for the query like firstResult, maxResult, requested ordering, etc.long getCount(QueryParameters<M> queryParameters)
queryParameters
- parameters for the query like firstResult, maxResult, requested ordering, etc.boolean delete(String key)
key
from the underlying store
on commit.key
- identifier of a valuetrue
if the object has been deleted or result cannot be determined, false
otherwise.long delete(QueryParameters<M> queryParameters)
mcb
filter) from the underlying store on commit.artificialKey
- key to record the transaction with, must be a key that does not exist in this transaction to
prevent collisions with other operations in this transactionqueryParameters
- parameters for the query like firstResult, maxResult, requested ordering, etc.-1
if not supported)Copyright © 2021 JBoss by Red Hat. All rights reserved.