Quarkus3 branch sync no. 11
24.3.2023: * renamed imports from javax to jakarta as a part of the migration from JavaEE to JakartaEE * fixed the metadata field's Type annotation Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
This commit is contained in:
parent
bc43e4f435
commit
181c8a5340
3 changed files with 14 additions and 17 deletions
|
@ -26,10 +26,10 @@ import org.keycloak.models.map.storage.jpa.JpaRootEntity;
|
||||||
import org.keycloak.models.map.storage.jpa.lock.delegate.JpaLockDelegateProvider;
|
import org.keycloak.models.map.storage.jpa.lock.delegate.JpaLockDelegateProvider;
|
||||||
import org.keycloak.models.map.storage.jpa.lock.entity.JpaLockEntity;
|
import org.keycloak.models.map.storage.jpa.lock.entity.JpaLockEntity;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import jakarta.persistence.EntityManager;
|
||||||
import javax.persistence.criteria.CriteriaBuilder;
|
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||||
import javax.persistence.criteria.Root;
|
import jakarta.persistence.criteria.Root;
|
||||||
import javax.persistence.criteria.Selection;
|
import jakarta.persistence.criteria.Selection;
|
||||||
|
|
||||||
public class JpaLockMapStorage extends JpaMapStorage<JpaLockEntity, MapLockEntity, MapLockEntity> {
|
public class JpaLockMapStorage extends JpaMapStorage<JpaLockEntity, MapLockEntity, MapLockEntity> {
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import org.keycloak.models.map.lock.MapLockEntityFields;
|
||||||
import org.keycloak.models.map.storage.jpa.JpaDelegateProvider;
|
import org.keycloak.models.map.storage.jpa.JpaDelegateProvider;
|
||||||
import org.keycloak.models.map.storage.jpa.lock.entity.JpaLockEntity;
|
import org.keycloak.models.map.storage.jpa.lock.entity.JpaLockEntity;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import jakarta.persistence.EntityManager;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,17 +18,15 @@ package org.keycloak.models.map.storage.jpa.lock.entity;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import javax.persistence.Basic;
|
import jakarta.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import javax.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
import javax.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import javax.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
import javax.persistence.UniqueConstraint;
|
import jakarta.persistence.UniqueConstraint;
|
||||||
import javax.persistence.Version;
|
import jakarta.persistence.Version;
|
||||||
import org.hibernate.annotations.Type;
|
import org.hibernate.annotations.Type;
|
||||||
import org.hibernate.annotations.TypeDef;
|
|
||||||
import org.hibernate.annotations.TypeDefs;
|
|
||||||
import org.keycloak.models.map.common.DeepCloner;
|
import org.keycloak.models.map.common.DeepCloner;
|
||||||
import org.keycloak.models.map.common.UuidValidator;
|
import org.keycloak.models.map.common.UuidValidator;
|
||||||
import org.keycloak.models.map.storage.jpa.JpaRootVersionedEntity;
|
import org.keycloak.models.map.storage.jpa.JpaRootVersionedEntity;
|
||||||
|
@ -45,7 +43,6 @@ import static org.keycloak.models.map.storage.jpa.Constants.CURRENT_SCHEMA_VERSI
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "kc_lock", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"})})
|
@Table(name = "kc_lock", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"})})
|
||||||
@TypeDefs({@TypeDef(name = "jsonb", typeClass = JsonbType.class)})
|
|
||||||
public class JpaLockEntity extends AbstractLockEntity implements JpaRootVersionedEntity {
|
public class JpaLockEntity extends AbstractLockEntity implements JpaRootVersionedEntity {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
@ -57,7 +54,7 @@ public class JpaLockEntity extends AbstractLockEntity implements JpaRootVersione
|
||||||
@Column
|
@Column
|
||||||
private int version;
|
private int version;
|
||||||
|
|
||||||
@Type(type = "jsonb")
|
@Type(JsonbType.class)
|
||||||
@Column(columnDefinition = "jsonb")
|
@Column(columnDefinition = "jsonb")
|
||||||
private final JpaLockMetadata metadata;
|
private final JpaLockMetadata metadata;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue