Class LdapMapStorage<RE,E extends AbstractEntity & UpdatableEntity,M>
- java.lang.Object
-
- org.keycloak.models.map.storage.ldap.LdapMapStorage<RE,E,M>
-
- All Implemented Interfaces:
KeycloakTransaction,MapStorage<E,M>
- Direct Known Subclasses:
LdapRoleMapStorage
public abstract class LdapMapStorage<RE,E extends AbstractEntity & UpdatableEntity,M> extends Object implements MapStorage<E,M>, KeycloakTransaction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classLdapMapStorage.DeleteOperationprotected static classLdapMapStorage.MapTaskWithValue
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,RE>entitiesprotected LinkedList<LdapMapStorage.MapTaskWithValue>tasksOnCommitprotected LinkedList<LdapMapStorage.MapTaskWithValue>tasksOnRollback
-
Constructor Summary
Constructors Constructor Description LdapMapStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()voidcommit()longdelete(QueryParameters<M> queryParameters)Instructs this transaction to remove values (identified bymcbfilter) from the underlying store upon commit.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.booleangetRollbackOnly()booleanisActive()voidrollback()voidsetRollbackOnly()
-
-
-
Field Detail
-
tasksOnRollback
protected final LinkedList<LdapMapStorage.MapTaskWithValue> tasksOnRollback
-
tasksOnCommit
protected final LinkedList<LdapMapStorage.MapTaskWithValue> tasksOnCommit
-
-
Method Detail
-
getCount
public long getCount(QueryParameters<M> queryParameters)
Description copied from interface:MapStorageReturns a number of values present in the underlying storage that fulfill the given criteria with respect to changes done in the current transaction.- Specified by:
getCountin interfaceMapStorage<RE,E extends AbstractEntity & UpdatableEntity>- 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
-
delete
public long delete(QueryParameters<M> queryParameters)
Description copied from interface:MapStorageInstructs this transaction to remove values (identified bymcbfilter) from the underlying store upon commit.- Specified by:
deletein interfaceMapStorage<RE,E extends AbstractEntity & UpdatableEntity>- Parameters:
queryParameters- parameters for the query like firstResult, maxResult, requested ordering, etc.- Returns:
- number of removed objects (might return
-1if not supported)
-
begin
public void begin()
- Specified by:
beginin interfaceKeycloakTransaction
-
commit
public void commit()
- Specified by:
commitin interfaceKeycloakTransaction
-
rollback
public void rollback()
- Specified by:
rollbackin interfaceKeycloakTransaction
-
setRollbackOnly
public void setRollbackOnly()
- Specified by:
setRollbackOnlyin interfaceKeycloakTransaction
-
getRollbackOnly
public boolean getRollbackOnly()
- Specified by:
getRollbackOnlyin interfaceKeycloakTransaction
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceKeycloakTransaction
-
-