Package org.keycloak.models.map.storage
Interface MapKeycloakTransaction<V extends AbstractEntity,M>
- 
- All Superinterfaces:
- KeycloakTransaction
 - All Known Subinterfaces:
- MapKeycloakTransactionWithAuth<V,M>
 - All Known Implementing Classes:
- ConcurrentHashMapKeycloakTransaction,- FileMapKeycloakTransaction,- HotRodUserSessionTransaction,- JpaAdminEventMapKeycloakTransaction,- JpaAuthEventMapKeycloakTransaction,- JpaClientMapKeycloakTransaction,- JpaClientScopeMapKeycloakTransaction,- JpaGroupMapKeycloakTransaction,- JpaMapKeycloakTransaction,- JpaPermissionMapKeycloakTransaction,- JpaPolicyMapKeycloakTransaction,- JpaRealmMapKeycloakTransaction,- JpaResourceMapKeycloakTransaction,- JpaResourceServerMapKeycloakTransaction,- JpaRoleMapKeycloakTransaction,- JpaRootAuthenticationSessionMapKeycloakTransaction,- JpaScopeMapKeycloakTransaction,- JpaSingleUseObjectMapKeycloakTransaction,- JpaUserLoginFailureMapKeycloakTransaction,- JpaUserMapKeycloakTransaction,- JpaUserSessionMapKeycloakTransaction,- LdapMapKeycloakTransaction,- LdapRoleMapKeycloakTransaction,- NoActionHotRodTransactionWrapper,- SingleUseObjectKeycloakTransaction
 
 public interface MapKeycloakTransaction<V extends AbstractEntity,M> extends KeycloakTransaction 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Vcreate(V value)Instructs this transaction to add a new value into the underlying store on commit.booleandelete(String key)Instructs this transaction to delete a value associated with the identifierkeyfrom the underlying store on commit.longdelete(QueryParameters<M> queryParameters)Instructs this transaction to remove values (identified bymcbfilter) from the underlying store on commit.default booleanexists(String key)Returnstrueif the object with the givenkeyexists in the underlying storage with respect to changes done in current transaction.default booleanexists(QueryParameters<M> queryParameters)Returnstrueif at least one object is satisfying givencriteriafrom the underlying storage with respect to changes done in current transaction.longgetCount(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.Vread(String key)Provides possibility to lookup for values by akeyin the underlying store with respect to changes done in 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.- 
Methods inherited from interface org.keycloak.models.KeycloakTransactionbegin, commit, getRollbackOnly, isActive, rollback, setRollbackOnly
 
- 
 
- 
- 
- 
Method Detail- 
createV create(V value) Instructs this transaction to add a new value into the underlying store on commit.Updates to the returned instances of Vwould be visible in the current transaction and will propagate into the underlying store upon commit. The ID of the entity passed in the parameter might change to a different value in the returned value if the underlying storage decided this was necessary. If the ID of the entity was null before, it will be set on the returned value.- Parameters:
- value- the value
- Returns:
- Entity representing the valuein the store. It may or may not be the same instance asvalue.
 
 - 
readV read(String key) Provides possibility to lookup for values by akeyin 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. IfVimplementsExpirableEntitythis method should not return entities that are expired. SeeExpirableEntityJavaDoc for more details.- Parameters:
- key- identifier of a value
- Returns:
- a value associated with the given key
 
 - 
readStream<V> read(QueryParameters<M> queryParameters) Returns a stream of values from underlying storage that are updated based on the current transaction changes; i.e. the result contains updates and excludes of records that have been created, updated or deleted in this transaction by methodscreate(V),create(V),delete(java.lang.String), etc.Updates to the returned instances of Vwould be visible in the current transaction and will propagate into the underlying store upon commit. IfVimplementsExpirableEntitythis method should not return entities that are expired. SeeExpirableEntityJavaDoc for more details.- Parameters:
- queryParameters- parameters for the query like firstResult, maxResult, requested ordering, etc.
- Returns:
- values that fulfill the given criteria, that are updated based on changes in the current transaction
 
 - 
getCountlong 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.- Parameters:
- queryParameters- parameters for the query like firstResult, maxResult, requested ordering, etc.
- Returns:
- number of values present in the storage that fulfill the given criteria
 
 - 
deleteboolean delete(String key) Instructs this transaction to delete a value associated with the identifierkeyfrom the underlying store on commit.- Parameters:
- key- identifier of a value
- Returns:
- Returns trueif the object has been deleted or result cannot be determined,falseotherwise.
 
 - 
deletelong delete(QueryParameters<M> queryParameters) Instructs this transaction to remove values (identified bymcbfilter) from the underlying store on commit.- Parameters:
- queryParameters- parameters for the query like firstResult, maxResult, requested ordering, etc.
- Returns:
- number of removed objects (might return -1if not supported)
 
 - 
existsdefault boolean exists(String key) Returnstrueif the object with the givenkeyexists in the underlying storage with respect to changes done in current transaction.falseotherwise.- Parameters:
- key- Key of the object. Must not be- null.
- Returns:
- See description
- Throws:
- NullPointerException- if the- keyis- null
 
 - 
existsdefault boolean exists(QueryParameters<M> queryParameters) Returnstrueif at least one object is satisfying givencriteriafrom the underlying storage with respect to changes done in current transaction.falseotherwise. The criteria are specified in the given criteria builder based on model properties.- Parameters:
- queryParameters- parameters for the query
- Returns:
- See description
 
 
- 
 
-