Class NoActionHotRodTransactionWrapper<K,​V extends AbstractEntity & UpdatableEntity,​M>

    • Method Detail

      • create

        public V create​(V value)
        Description copied from interface: MapKeycloakTransaction
        Instructs this transaction to add a new value into the underlying store on commit.

        Updates to the returned instances of V would 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.

        Specified by:
        create in interface MapKeycloakTransaction<K,​V extends AbstractEntity & UpdatableEntity>
        Parameters:
        value - the value
        Returns:
        Entity representing the value in the store. It may or may not be the same instance as value.
      • read

        public V read​(String key)
        Description copied from interface: MapKeycloakTransaction
        Provides possibility to lookup for values by a 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. If V implements ExpirableEntity this method should not return entities that are expired. See ExpirableEntity JavaDoc for more details.
        Specified by:
        read in interface MapKeycloakTransaction<K,​V extends AbstractEntity & UpdatableEntity>
        Parameters:
        key - identifier of a value
        Returns:
        a value associated with the given key
      • getCount

        public long getCount​(QueryParameters<M> queryParameters)
        Description copied from interface: MapKeycloakTransaction
        Returns 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:
        getCount in interface MapKeycloakTransaction<K,​V 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 boolean delete​(String key)
        Description copied from interface: MapKeycloakTransaction
        Instructs this transaction to delete a value associated with the identifier key from the underlying store on commit.
        Specified by:
        delete in interface MapKeycloakTransaction<K,​V extends AbstractEntity & UpdatableEntity>
        Parameters:
        key - identifier of a value
        Returns:
        Returns true if the object has been deleted or result cannot be determined, false otherwise.
      • delete

        public long delete​(QueryParameters<M> queryParameters)
        Description copied from interface: MapKeycloakTransaction
        Instructs this transaction to remove values (identified by mcb filter) from the underlying store on commit.
        Specified by:
        delete in interface MapKeycloakTransaction<K,​V extends AbstractEntity & UpdatableEntity>
        Parameters:
        queryParameters - parameters for the query like firstResult, maxResult, requested ordering, etc.
        Returns:
        number of removed objects (might return -1 if not supported)