Class JpaMapStorage<RE extends JpaRootEntity,E extends AbstractEntity,M>
java.lang.Object
org.keycloak.models.map.storage.jpa.JpaMapStorage<RE,E,M>
- All Implemented Interfaces:
MapStorage<E,M>
- Direct Known Subclasses:
JpaAdminEventMapStorage,JpaAuthEventMapStorage,JpaClientMapStorage,JpaClientScopeMapStorage,JpaGroupMapStorage,JpaLockMapStorage,JpaPermissionMapStorage,JpaPolicyMapStorage,JpaRealmMapStorage,JpaResourceMapStorage,JpaResourceServerMapStorage,JpaRoleMapStorage,JpaRootAuthenticationSessionMapStorage,JpaScopeMapStorage,JpaSingleUseObjectMapStorage,JpaUserLoginFailureMapStorage,JpaUserMapStorage,JpaUserSessionMapStorage
public abstract class JpaMapStorage<RE extends JpaRootEntity,E extends AbstractEntity,M>
extends Object
implements MapStorage<E,M>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJpaMapStorage(org.keycloak.models.KeycloakSession session, Class<RE> entityType, Class<M> modelType, jakarta.persistence.EntityManager em) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearQueryCache(org.hibernate.Session session) protected abstract JpaModelCriteriaBuilderbooleanlongdelete(QueryParameters<M> queryParameters) longgetCount(QueryParameters<M> queryParameters) protected abstract EmapToEntityDelegate(RE original) protected EmapToEntityDelegateUnique(RE original) Use the cache within the session to ensure that there is only one instance per entity within the current session.read(QueryParameters<M> queryParameters) protected voidremoveFromCache(String key) protected abstract jakarta.persistence.criteria.Selection<? extends RE>selectCbConstruct(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.Root<RE> root) protected abstract voidsetEntityVersion(JpaRootEntity entity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.map.storage.MapStorage
exists, exists
-
Field Details
-
em
protected jakarta.persistence.EntityManager em
-
-
Constructor Details
-
JpaMapStorage
-
-
Method Details
-
selectCbConstruct
-
setEntityVersion
-
createJpaModelCriteriaBuilder
-
mapToEntityDelegate
-
mapToEntityDelegateUnique
Use the cache within the session to ensure that there is only one instance per entity within the current session. -
create
- Specified by:
createin interfaceMapStorage<RE extends JpaRootEntity,E extends AbstractEntity>
-
read
- Specified by:
readin interfaceMapStorage<RE extends JpaRootEntity,E extends AbstractEntity>
-
read
- Specified by:
readin interfaceMapStorage<RE extends JpaRootEntity,E extends AbstractEntity>
-
clearQueryCache
public static void clearQueryCache(org.hibernate.Session session) -
getCount
- Specified by:
getCountin interfaceMapStorage<RE extends JpaRootEntity,E extends AbstractEntity>
-
delete
- Specified by:
deletein interfaceMapStorage<RE extends JpaRootEntity,E extends AbstractEntity>
-
removeFromCache
-
delete
- Specified by:
deletein interfaceMapStorage<RE extends JpaRootEntity,E extends AbstractEntity>
-