Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump org.hibernate:hibernate-core from 5.1.17.Final to 5.3.20.Final #753

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import org.hibernate.envers.query.AuditEntity;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import jakarta.persistence.EntityManager;
import jakarta.persistence.NoResultException;
import jakarta.persistence.PersistenceContext;

import static org.hibernate.envers.RevisionType.DEL;

Expand All @@ -36,7 +36,7 @@ public AuditViewEntry createGenericAuditViewEntry(AuditViewEntryContainer auditV
Auditable entityForRevision = auditViewEntryContainer.getEntityForRevision();
MyRevisionEntity revEntity = auditViewEntryContainer.getRevEntity();

AuditReader reader = AuditReaderFactory.get(entityManager);
AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class));
Auditable previous = getPrevious(reader, entityForRevision, revEntity);
return buildAuditViewEntry(auditViewEntryContainer, previous);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import java.util.*;
import java.util.logging.Logger;

Expand All @@ -68,7 +68,7 @@ public <T> Object getDeletedEntity(T entity, Integer id) {
Objects.requireNonNull(entity, "Entity can not be null");
Objects.requireNonNull(id, "Id can not be null");

AuditReader reader = AuditReaderFactory.get(entityManager);
AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class));

if (reader.isEntityClassAudited(entity.getClass())) {
AuditQuery query = reader.createQuery()
Expand All @@ -88,7 +88,7 @@ public <T> Object getDeletedEntity(T entity, Integer id) {
public List<Object> getAllDeletedEntities(Class clazz) {
Objects.requireNonNull(clazz, "Clazz can not be null");

AuditReader reader = AuditReaderFactory.get(entityManager);
AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class));

if (reader.isEntityClassAudited(clazz)) {
AuditQuery query = reader.createQuery()
Expand All @@ -110,7 +110,7 @@ public List<Object> getAllDeletedEntities(Class clazz) {
public List<AuditViewEntry> getAuditViewEntriesForResource(Integer resourceId) {
// Map<Hashcode, AuditViewEntry>
Map<Integer, AuditViewEntry> allAuditViewEntries = new HashMap<>();
AuditReader reader = AuditReaderFactory.get(entityManager);
AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class));
CrossTypeRevisionChangesReader crossTypeRevisionChangesReader = reader.getCrossTypeRevisionChangesReader();
List<MyRevisionEntity> revisionsForResource = getRevisionsForResource(resourceId);
for (MyRevisionEntity revisionEntity : revisionsForResource) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@

import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import jakarta.persistence.EntityManager;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.Root;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import lombok.Setter;
import org.hibernate.envers.Audited;

import javax.persistence.*;
import jakarta.persistence.*;
import java.util.Date;

@Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.hibernate.envers.exception.RevisionDoesNotExistException;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import jakarta.persistence.EntityManager;
import java.util.Date;

/**
Expand All @@ -37,7 +37,7 @@ public class AmwAuditReader {
private EntityManager entityManager;

protected AuditReader getAuditReader() {
return AuditReaderFactory.get(entityManager);
return AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

package ch.puzzle.itc.mobiliar.business.database.control;

import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
import jakarta.persistence.criteria.Path;
import jakarta.persistence.criteria.Predicate;

public class CriteriaRestriction<RootType, PathType> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
package ch.puzzle.itc.mobiliar.business.database.control;

import javax.enterprise.inject.Produces;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;


public class EntityManagerProducer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.util.Arrays;
import java.util.List;

import javax.persistence.Query;
import jakarta.persistence.Query;


public class JpaSqlResultMapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import java.sql.SQLException;
import java.util.List;

import javax.persistence.NoResultException;
import javax.persistence.Query;
import javax.persistence.Table;
import jakarta.persistence.NoResultException;
import jakarta.persistence.Query;
import jakarta.persistence.Table;

public class QueryUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.LockModeType;
import jakarta.persistence.EntityManager;
import jakarta.persistence.LockModeType;
import java.util.logging.Logger;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.hibernate.envers.RevisionNumber;
import org.hibernate.envers.RevisionTimestamp;

import javax.persistence.*;
import jakarta.persistence.*;
import java.util.Set;

@Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import java.io.Serializable;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
import javax.ejb.TransactionAttributeType;
import javax.enterprise.event.Event;
import javax.inject.Inject;
import javax.persistence.*;
import jakarta.persistence.*;
import java.io.*;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributeView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

import org.hibernate.annotations.BatchSize;

import javax.persistence.*;
import jakarta.persistence.*;

import java.io.Serializable;
import java.io.StringReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import jakarta.persistence.*;
import java.util.Arrays;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

public class ValidFileNameValidator implements ConstraintValidator<ValidFileName, String> {

@Override
public void initialize(ValidFileName constraintAnnotation) {
}

@Override
public boolean isValid(String fileName, ConstraintValidatorContext constraintValidatorContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import ch.puzzle.itc.mobiliar.business.deploymentparameter.entity.DeploymentParameter;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import jakarta.persistence.EntityManager;
import java.util.List;

public class DeploymentParameterRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import ch.puzzle.itc.mobiliar.business.utils.BaseRepository;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import jakarta.persistence.EntityManager;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import ch.puzzle.itc.mobiliar.business.deploy.entity.DeploymentEntity;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import javax.persistence.*;
import jakarta.persistence.*;

@Entity
@Table(name = "TAMW_deployParam")
Expand All @@ -41,7 +41,7 @@ public class DeploymentParameter {

@Getter
@Column(unique = true, nullable = false)
@NotEmpty
@NotNull
private String key;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

package ch.puzzle.itc.mobiliar.business.deploymentparameter.entity;

import javax.persistence.*;
import jakarta.persistence.*;

import ch.puzzle.itc.mobiliar.business.database.control.Constants;
import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.NamedIdentifiable;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Entity
@Table(name = "TAMW_deployParamKey")
Expand All @@ -42,7 +42,7 @@ public class Key implements NamedIdentifiable {

@Getter
@Column(nullable = false, unique = true)
@NotEmpty
@NotNull
private String name;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import java.util.List;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.*;
import jakarta.persistence.EntityManager;
import jakarta.persistence.TypedQuery;
import jakarta.persistence.criteria.*;

import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceEntity;
import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceTypeEntity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@

import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.Query;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import jakarta.persistence.EntityManager;
import jakarta.persistence.NoResultException;
import jakarta.persistence.Query;
import jakarta.persistence.TypedQuery;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.Predicate;
import jakarta.persistence.criteria.Root;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
import java.util.*;
import java.util.logging.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
import ch.puzzle.itc.mobiliar.common.util.DefaultResourceTypeDefinition;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.criteria.*;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
import jakarta.persistence.criteria.*;

public class CommonQueries {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
import javax.ejb.Stateless;
import javax.enterprise.inject.Produces;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import jakarta.persistence.EntityManager;
import jakarta.persistence.NoResultException;
import java.util.logging.Level;
import java.util.logging.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import ch.puzzle.itc.mobiliar.business.utils.BaseRepository;

import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
import java.util.List;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@

import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.NoResultException;
import jakarta.persistence.Query;
import java.util.logging.Level;
import java.util.logging.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
import ch.puzzle.itc.mobiliar.business.database.control.Constants;
import org.hibernate.envers.Audited;

import javax.persistence.*;
import jakarta.persistence.*;
import java.io.Serializable;
import java.util.*;

import static javax.persistence.CascadeType.ALL;
import static jakarta.persistence.CascadeType.ALL;

/**
* Entity implementation class for Entity: AbstractResourceBase
Expand Down
Loading
Loading