diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditHandler.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditHandler.java index 08ff23b74..c3f25b1f8 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditHandler.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditHandler.java @@ -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; @@ -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); } diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditService.java index c0aec2644..0ca2a695e 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditService.java @@ -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; @@ -68,7 +68,7 @@ public 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() @@ -88,7 +88,7 @@ public Object getDeletedEntity(T entity, Integer id) { public List 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() @@ -110,7 +110,7 @@ public List getAllDeletedEntities(Class clazz) { public List getAuditViewEntriesForResource(Integer resourceId) { // Map Map allAuditViewEntries = new HashMap<>(); - AuditReader reader = AuditReaderFactory.get(entityManager); + AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)); CrossTypeRevisionChangesReader crossTypeRevisionChangesReader = reader.getCrossTypeRevisionChangesReader(); List revisionsForResource = getRevisionsForResource(resourceId); for (MyRevisionEntity revisionEntity : revisionsForResource) { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/configurationtag/control/TagConfigurationService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/configurationtag/control/TagConfigurationService.java index bf02f5b86..77093e8d1 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/configurationtag/control/TagConfigurationService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/configurationtag/control/TagConfigurationService.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/configurationtag/entity/ResourceTagEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/configurationtag/entity/ResourceTagEntity.java index e4116a958..a0cee6800 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/configurationtag/entity/ResourceTagEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/configurationtag/entity/ResourceTagEntity.java @@ -26,7 +26,7 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Date; @Entity diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/AmwAuditReader.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/AmwAuditReader.java index dabe3080a..4a63438b9 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/AmwAuditReader.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/AmwAuditReader.java @@ -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; /** @@ -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)); } /** diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/CriteriaRestriction.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/CriteriaRestriction.java index 5755e1b3a..bc760cf29 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/CriteriaRestriction.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/CriteriaRestriction.java @@ -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 { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/EntityManagerProducer.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/EntityManagerProducer.java index b8c772c6f..60fb29830 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/EntityManagerProducer.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/EntityManagerProducer.java @@ -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 { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/JpaSqlResultMapper.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/JpaSqlResultMapper.java index 21e4707fe..4d33506d9 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/JpaSqlResultMapper.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/JpaSqlResultMapper.java @@ -31,7 +31,7 @@ import java.util.Arrays; import java.util.List; -import javax.persistence.Query; +import jakarta.persistence.Query; public class JpaSqlResultMapper { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/QueryUtils.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/QueryUtils.java index d625a492e..b7fb94a8f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/QueryUtils.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/QueryUtils.java @@ -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 { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/SequencesService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/SequencesService.java index f44783106..59fb71d9b 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/SequencesService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/control/SequencesService.java @@ -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; /** diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/entity/MyRevisionEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/entity/MyRevisionEntity.java index a230a97f5..53f768db0 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/entity/MyRevisionEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/entity/MyRevisionEntity.java @@ -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 diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/entity/SequencesEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/entity/SequencesEntity.java index 369e587c5..85c5f0267 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/entity/SequencesEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/database/entity/SequencesEntity.java @@ -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; /** diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundary.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundary.java index aad0819e3..8584ccff4 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundary.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundary.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/entity/DeploymentEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/entity/DeploymentEntity.java index 4afadb443..9df3ff84f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/entity/DeploymentEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/entity/DeploymentEntity.java @@ -41,7 +41,7 @@ import org.hibernate.annotations.BatchSize; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.io.StringReader; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/entity/NodeJobEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/entity/NodeJobEntity.java index 9a3957e18..13987060e 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/entity/NodeJobEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/entity/NodeJobEntity.java @@ -25,7 +25,7 @@ import lombok.Getter; import lombok.Setter; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Arrays; import java.util.List; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/validation/ValidFileNameValidator.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/validation/ValidFileNameValidator.java index 5af9b514e..75d63cc62 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/validation/ValidFileNameValidator.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploy/validation/ValidFileNameValidator.java @@ -6,6 +6,9 @@ public class ValidFileNameValidator implements ConstraintValidator { + @Override + public void initialize(ValidFileName constraintAnnotation) { + } @Override public boolean isValid(String fileName, ConstraintValidatorContext constraintValidatorContext) { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/control/DeploymentParameterRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/control/DeploymentParameterRepository.java index 49c546ffb..925dc8a93 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/control/DeploymentParameterRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/control/DeploymentParameterRepository.java @@ -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 { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/control/KeyRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/control/KeyRepository.java index f95b9af3a..b1064007a 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/control/KeyRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/control/KeyRepository.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/entity/DeploymentParameter.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/entity/DeploymentParameter.java index 56258bd63..3cecf4ab4 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/entity/DeploymentParameter.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/entity/DeploymentParameter.java @@ -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") @@ -41,7 +41,7 @@ public class DeploymentParameter { @Getter @Column(unique = true, nullable = false) - @NotEmpty + @NotNull private String key; @Getter diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/entity/Key.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/entity/Key.java index 9f9d87f08..db4a0bc87 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/entity/Key.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/deploymentparameter/entity/Key.java @@ -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") @@ -42,7 +42,7 @@ public class Key implements NamedIdentifiable { @Getter @Column(nullable = false, unique = true) - @NotEmpty + @NotNull private String name; /** diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceQueries.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceQueries.java index aff9bbfe1..99c6ffaf0 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceQueries.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/applist/ApplistScreenDomainServiceQueries.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonDomainService.java index 5be5b7747..6fd442c3b 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonDomainService.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterService.java index 46bee23ea..5eda46b61 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterService.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonQueries.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonQueries.java index cfa43723e..b318904d8 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonQueries.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonQueries.java @@ -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 { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/ContextDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/ContextDomainService.java index f7e991767..e6c01a11c 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/ContextDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/ContextDomainService.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/ContextRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/ContextRepository.java index 88c2edcd4..e5bf9d6d9 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/ContextRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/ContextRepository.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/EnvironmentsScreenDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/EnvironmentsScreenDomainService.java index cb3390bb5..ef0a3af60 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/EnvironmentsScreenDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/control/EnvironmentsScreenDomainService.java @@ -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; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/AbstractContext.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/AbstractContext.java index d1167c289..e3f880454 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/AbstractContext.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/AbstractContext.java @@ -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 diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextDependency.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextDependency.java index 64cff7446..b74c00404 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextDependency.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextDependency.java @@ -22,10 +22,10 @@ import org.hibernate.envers.Audited; -import javax.persistence.ManyToOne; -import javax.persistence.MappedSuperclass; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MappedSuperclass; -import static javax.persistence.CascadeType.PERSIST; +import static jakarta.persistence.CascadeType.PERSIST; @MappedSuperclass @Audited diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextEntity.java index d5f3c0bb8..7d52261bb 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextEntity.java @@ -35,11 +35,11 @@ import org.hibernate.envers.Audited; import org.hibernate.envers.NotAudited; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Set; -import static javax.persistence.CascadeType.MERGE; -import static javax.persistence.CascadeType.PERSIST; +import static jakarta.persistence.CascadeType.MERGE; +import static jakarta.persistence.CascadeType.PERSIST; /** * Entity implementation class for Entity: ResourceContext diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextTypeEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextTypeEntity.java index 9fd4b0aca..496f0f2fe 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextTypeEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/environment/entity/ContextTypeEntity.java @@ -25,10 +25,10 @@ import org.hibernate.annotations.NamedQuery; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Set; -import static javax.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.ALL; /** * Entity implementation class for Entity: ResourceType diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/boundary/FunctionsBoundary.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/boundary/FunctionsBoundary.java index dd42d5512..ab48b1150 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/boundary/FunctionsBoundary.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/boundary/FunctionsBoundary.java @@ -24,7 +24,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import ch.puzzle.itc.mobiliar.business.database.entity.MyRevisionEntity; import ch.puzzle.itc.mobiliar.business.function.control.FunctionRepository; @@ -122,7 +122,7 @@ public List getAllOverwritableSupertypeFunctions(ResourceType * Returns a AmwFunctionEntity identified by its id and revision id */ public AmwFunctionEntity getFunctionByIdAndRevision(Integer functionId, Number revisionId) { - AmwFunctionEntity amwFunctionEntity = AuditReaderFactory.get(entityManager).find( + AmwFunctionEntity amwFunctionEntity = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)).find( AmwFunctionEntity.class, functionId, revisionId); return amwFunctionEntity; } @@ -133,7 +133,7 @@ public AmwFunctionEntity getFunctionByIdAndRevision(Integer functionId, Number r public List getFunctionRevisions(Integer functionId) { List result = new ArrayList<>(); if (functionId != null) { - AuditReader reader = AuditReaderFactory.get(entityManager); + AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)); List list = reader.getRevisions(AmwFunctionEntity.class, functionId); for (Number rev : list) { Date date = reader.getRevisionDate(rev); diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/control/FunctionRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/control/FunctionRepository.java index 77335b06f..c3e093681 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/control/FunctionRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/control/FunctionRepository.java @@ -25,7 +25,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; public class FunctionRepository extends BaseRepository { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/entity/AmwFunctionEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/entity/AmwFunctionEntity.java index 9fd658af4..819750b22 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/entity/AmwFunctionEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/function/entity/AmwFunctionEntity.java @@ -20,14 +20,14 @@ package ch.puzzle.itc.mobiliar.business.function.entity; -import static javax.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.ALL; import java.io.Serializable; import java.util.Collections; import java.util.HashSet; import java.util.Set; -import javax.persistence.*; +import jakarta.persistence.*; import ch.puzzle.itc.mobiliar.business.resourcegroup.control.CopyUnit; import ch.puzzle.itc.mobiliar.business.utils.Copyable; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/GeneratorDomainServiceWithAppServerRelations.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/GeneratorDomainServiceWithAppServerRelations.java index 704ba79fe..ec10fda6f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/GeneratorDomainServiceWithAppServerRelations.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/GeneratorDomainServiceWithAppServerRelations.java @@ -52,7 +52,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.io.File; import java.io.IOException; import java.util.*; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/LockingService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/LockingService.java index 920e1c0d6..713d7cdc0 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/LockingService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/LockingService.java @@ -30,9 +30,9 @@ import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.LockModeType; -import javax.persistence.LockTimeoutException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.LockModeType; +import jakarta.persistence.LockTimeoutException; import java.util.logging.Logger; @Stateless diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/ShakedownTestGeneratorDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/ShakedownTestGeneratorDomainService.java index 7ef2819b4..f3045f56c 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/ShakedownTestGeneratorDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/ShakedownTestGeneratorDomainService.java @@ -29,7 +29,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import javax.xml.bind.JAXB; import ch.puzzle.itc.mobiliar.business.deploy.entity.DeploymentEntity; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/GenerationUnitFactory.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/GenerationUnitFactory.java index 3c37476fb..70b189b22 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/GenerationUnitFactory.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/GenerationUnitFactory.java @@ -47,7 +47,7 @@ import org.apache.commons.lang3.StringUtils; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.*; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/boundary/GlobalFunctionsBoundary.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/boundary/GlobalFunctionsBoundary.java index 8d551022a..e02a784d5 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/boundary/GlobalFunctionsBoundary.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/boundary/GlobalFunctionsBoundary.java @@ -34,7 +34,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.ArrayList; import java.util.Collections; import java.util.Date; @@ -68,7 +68,7 @@ public GlobalFunctionEntity getFunctionById(Integer globalFunctionId) { * Returns a AmwFunctionEntity identified by its id and revision id */ public GlobalFunctionEntity getFunctionByIdAndRevision(Integer functionId, Number revisionId) { - GlobalFunctionEntity globalFunctionEntity = AuditReaderFactory.get(entityManager).find( + GlobalFunctionEntity globalFunctionEntity = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)).find( GlobalFunctionEntity.class, functionId, revisionId); return globalFunctionEntity; } @@ -79,7 +79,7 @@ public GlobalFunctionEntity getFunctionByIdAndRevision(Integer functionId, Numbe public List getFunctionRevisions(Integer functionId) { List result = new ArrayList(); if (functionId != null) { - AuditReader reader = AuditReaderFactory.get(entityManager); + AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)); List list = reader.getRevisions(GlobalFunctionEntity.class, functionId); for (Number rev : list) { Date date = reader.getRevisionDate(rev); diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/control/GlobalFunctionRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/control/GlobalFunctionRepository.java index 75c45032b..7cb480ae5 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/control/GlobalFunctionRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/control/GlobalFunctionRepository.java @@ -23,10 +23,10 @@ import java.util.List; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.*; -import javax.persistence.criteria.CriteriaQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.*; +import jakarta.persistence.criteria.CriteriaQuery; import ch.puzzle.itc.mobiliar.business.globalfunction.entity.GlobalFunctionEntity; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/entity/GlobalFunctionEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/entity/GlobalFunctionEntity.java index d872832ca..434aaaef2 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/entity/GlobalFunctionEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/globalfunction/entity/GlobalFunctionEntity.java @@ -20,14 +20,14 @@ package ch.puzzle.itc.mobiliar.business.globalfunction.entity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.TableGenerator; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; +import jakarta.persistence.TableGenerator; import lombok.Getter; import lombok.Setter; @@ -35,7 +35,7 @@ import org.hibernate.envers.Audited; import ch.puzzle.itc.mobiliar.business.database.control.Constants; -import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; @Entity @Audited @@ -51,7 +51,7 @@ public class GlobalFunctionEntity { @Getter @Column(nullable = false, unique = true) - @NotEmpty + @NotNull private String name; @Getter diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/boundary/PropertyEditor.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/boundary/PropertyEditor.java index 948e811d3..ef43dfc0f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/boundary/PropertyEditor.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/boundary/PropertyEditor.java @@ -58,8 +58,8 @@ import javax.ejb.EJBException; import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import java.util.*; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/boundary/RemoveTagUseCase.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/boundary/RemoveTagUseCase.java index 98ebb011e..ffeb1354c 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/boundary/RemoveTagUseCase.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/boundary/RemoveTagUseCase.java @@ -6,7 +6,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.NoResultException; +import jakarta.persistence.NoResultException; @Stateless @AllArgsConstructor diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyDescriptorService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyDescriptorService.java index c71e14e5a..736f137d9 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyDescriptorService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyDescriptorService.java @@ -23,13 +23,13 @@ import java.util.*; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -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.TypedQuery; +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.CriteriaQuery; +import jakarta.persistence.criteria.Predicate; +import jakarta.persistence.criteria.Root; import ch.puzzle.itc.mobiliar.business.environment.control.ContextDomainService; import ch.puzzle.itc.mobiliar.business.environment.entity.AbstractContext; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingQueries.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingQueries.java index 2c09006f9..f1a42451b 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingQueries.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingQueries.java @@ -29,8 +29,8 @@ import ch.puzzle.itc.mobiliar.common.util.ConfigurationService; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingService.java index b17697d11..1a72b05f1 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingService.java @@ -34,7 +34,7 @@ import lombok.Getter; import javax.inject.Inject; -import javax.persistence.Query; +import jakarta.persistence.Query; import java.io.IOException; import java.sql.Clob; import java.sql.SQLException; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEntityAuditviewHandler.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEntityAuditviewHandler.java index 85d5576ec..e2eb9146f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEntityAuditviewHandler.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEntityAuditviewHandler.java @@ -12,8 +12,8 @@ import javax.ejb.Stateless; import javax.inject.Named; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import static ch.puzzle.itc.mobiliar.business.auditview.entity.AuditViewEntry.RELATION_CONSUMED_RESOURCE; import static ch.puzzle.itc.mobiliar.business.auditview.entity.AuditViewEntry.RELATION_PROVIDED_RESOURCE; @@ -173,7 +173,7 @@ public ResourceContextEntity getResourceContextEntityForPropertyOnMasterResource .setParameter("rev", container.getRevEntity().getId()) .setParameter("propertyId", container.getEntityForRevision().getId()); int resourceContextId = (int) query.getSingleResult(); - AuditReader reader = AuditReaderFactory.get(entityManager); + AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)); return (ResourceContextEntity) reader.createQuery() .forRevisionsOfEntity(ResourceContextEntity.class, true, true) .add(AuditEntity.id().eq(resourceContextId)) diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyImportService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyImportService.java index b1ed08db8..55252c911 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyImportService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyImportService.java @@ -34,7 +34,7 @@ import ch.puzzle.itc.mobiliar.common.exception.AMWRuntimeException; import javax.inject.Inject; -import javax.persistence.NoResultException; +import jakarta.persistence.NoResultException; import java.util.ArrayList; import java.util.List; import java.util.Set; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTagEditingService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTagEditingService.java index c6068870e..c4b6707ce 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTagEditingService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTagEditingService.java @@ -26,9 +26,9 @@ import java.util.logging.Logger; 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.property.entity.PropertyTagEntity; import ch.puzzle.itc.mobiliar.business.property.entity.PropertyTagEntityHolder; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTypeScreenDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTypeScreenDomainService.java index 8d07da7e9..f4f75d88c 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTypeScreenDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTypeScreenDomainService.java @@ -25,9 +25,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 ch.puzzle.itc.mobiliar.business.domain.commons.CommonDomainService; import ch.puzzle.itc.mobiliar.business.domain.commons.CommonQueries; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTypeService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTypeService.java index 7c0b3e621..3d6d8bd70 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTypeService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTypeService.java @@ -23,8 +23,8 @@ import ch.puzzle.itc.mobiliar.business.property.entity.PropertyTypeEntity; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import java.util.List; /** diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyValueService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyValueService.java index 9b55ba0ad..649e4a3c2 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyValueService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyValueService.java @@ -30,8 +30,8 @@ import ch.puzzle.itc.mobiliar.business.auditview.control.AuditService; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import java.util.ArrayList; import java.util.List; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/MikEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/MikEntity.java index 2e8981def..df500edcf 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/MikEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/MikEntity.java @@ -27,7 +27,7 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; /** * Entity implementation class for Entity: Mik (Machine Interpretation Key) diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyDescriptorEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyDescriptorEntity.java index 987da9fc5..fd2272d2a 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyDescriptorEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyDescriptorEntity.java @@ -33,12 +33,12 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; 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 javax.persistence.CascadeType.PERSIST; +import static jakarta.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.PERSIST; /** * Entity implementation class for Entity: PropertyDescriptor diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyEntity.java index fdc506432..f8ff3f25d 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyEntity.java @@ -31,7 +31,7 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.Comparator; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyTagEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyTagEntity.java index 285035b51..259968386 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyTagEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyTagEntity.java @@ -29,7 +29,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; /** diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyTypeEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyTypeEntity.java index 07d963be7..eb95d5a13 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyTypeEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/property/entity/PropertyTypeEntity.java @@ -26,7 +26,7 @@ import org.hibernate.annotations.NamedQuery; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.ArrayList; import java.util.HashSet; import java.util.List; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/boundary/Releasing.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/boundary/Releasing.java index 71f5d33d9..4ab48afc1 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/boundary/Releasing.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/boundary/Releasing.java @@ -25,8 +25,8 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import java.util.List; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtPersistenceService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtPersistenceService.java index e7cac26e8..84ab2d277 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtPersistenceService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtPersistenceService.java @@ -26,11 +26,11 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.TransactionRequiredException; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.*; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TransactionRequiredException; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.*; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtService.java index ae6078247..38d6fdb1f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtService.java @@ -32,8 +32,8 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import java.util.*; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseRepository.java index 9b09d493a..09c8e1963 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseRepository.java @@ -26,7 +26,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; import java.util.Set; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/entity/ReleaseEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/entity/ReleaseEntity.java index 2ddee98fe..23b5ab411 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/entity/ReleaseEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/releasing/entity/ReleaseEntity.java @@ -24,17 +24,17 @@ import java.util.Date; import java.util.Set; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.TableGenerator; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.Version; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.TableGenerator; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.Version; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/boundary/ResourceActivationService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/boundary/ResourceActivationService.java index e0a1e5206..f7ec50f4b 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/boundary/ResourceActivationService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/boundary/ResourceActivationService.java @@ -31,7 +31,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/control/ResourceActivation.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/control/ResourceActivation.java index b7bf987fa..70d7a3269 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/control/ResourceActivation.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/control/ResourceActivation.java @@ -29,7 +29,7 @@ import ch.puzzle.itc.mobiliar.business.resourcerelation.entity.ResourceRelationContextEntity; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.*; public class ResourceActivation { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/entity/ResourceActivationEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/entity/ResourceActivationEntity.java index d1465958f..cb4af441a 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/entity/ResourceActivationEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourceactivation/entity/ResourceActivationEntity.java @@ -27,7 +27,7 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; @Entity diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/CopyResource.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/CopyResource.java index d7dc8d2cc..31d415d50 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/CopyResource.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/CopyResource.java @@ -33,7 +33,7 @@ import javax.ejb.EJBException; import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import ch.puzzle.itc.mobiliar.business.domain.commons.CommonDomainService; import ch.puzzle.itc.mobiliar.business.foreignable.entity.ForeignableOwner; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceBoundary.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceBoundary.java index 6d8dc5f9d..249f3ca52 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceBoundary.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceBoundary.java @@ -42,8 +42,8 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceLocator.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceLocator.java index ebfbb1154..3cf331863 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceLocator.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceLocator.java @@ -37,8 +37,8 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.HashMap; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainService.java index dc7a0ac08..3167d2994 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainService.java @@ -47,7 +47,7 @@ import ch.puzzle.itc.mobiliar.common.exception.AMWException; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.HashMap; import java.util.HashSet; import java.util.Map; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceEditService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceEditService.java index f96953646..9d5f05cb5 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceEditService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceEditService.java @@ -34,9 +34,9 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.Query; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; import java.util.*; @Stateless diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceEntityService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceEntityService.java index c92f7a487..1f7f21e07 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceEntityService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceEntityService.java @@ -32,7 +32,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.HashSet; import java.util.Set; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceService.java index 048e761e1..8282793c1 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceService.java @@ -25,10 +25,10 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; -import javax.persistence.criteria.*; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; +import jakarta.persistence.criteria.*; import ch.puzzle.itc.mobiliar.business.database.control.QueryUtils; import ch.puzzle.itc.mobiliar.business.environment.control.ContextDomainService; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepository.java index 68070f90f..f1a562cd4 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepository.java @@ -26,10 +26,10 @@ import org.apache.commons.lang3.StringUtils; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.*; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.*; import java.util.Collection; import java.util.Collections; import java.util.Comparator; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceRepository.java index 58e1f78a4..4f86b5ae6 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceRepository.java @@ -28,7 +28,7 @@ import ch.puzzle.itc.mobiliar.common.util.DefaultResourceTypeDefinition; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeDomainService.java index 881d696b0..d23920da0 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeDomainService.java @@ -42,11 +42,11 @@ 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.*; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.*; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeProvider.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeProvider.java index 61c2875be..f53c81055 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeProvider.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeProvider.java @@ -24,8 +24,8 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import org.apache.commons.lang3.StringUtils; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeRepository.java index 7a2199519..91b9a7928 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceTypeRepository.java @@ -23,9 +23,9 @@ import java.util.List; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.criteria.*; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.criteria.*; import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceTypeEntity; import ch.puzzle.itc.mobiliar.business.utils.BaseRepository; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourcesScreenQueries.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourcesScreenQueries.java index 4ea1b3b7c..a18b55fbd 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourcesScreenQueries.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourcesScreenQueries.java @@ -21,8 +21,8 @@ package ch.puzzle.itc.mobiliar.business.resourcegroup.control; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; public class ResourcesScreenQueries { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceContextEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceContextEntity.java index 4896eb63f..6af53643e 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceContextEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceContextEntity.java @@ -24,9 +24,9 @@ import lombok.Getter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; -import static javax.persistence.CascadeType.PERSIST; +import static jakarta.persistence.CascadeType.PERSIST; @Entity @Audited diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceEntity.java index 4857e1df1..721980267 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceEntity.java @@ -54,11 +54,11 @@ import org.hibernate.envers.Audited; import org.hibernate.envers.NotAudited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.*; -import static javax.persistence.CascadeType.*; +import static jakarta.persistence.CascadeType.*; /** * Entity implementation class for Entity: Resource diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceGroupEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceGroupEntity.java index 560840d31..fb422b5df 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceGroupEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceGroupEntity.java @@ -32,7 +32,7 @@ import org.hibernate.envers.Audited; import org.hibernate.envers.NotAudited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeContextEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeContextEntity.java index 9dcf7c754..70a054b6c 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeContextEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeContextEntity.java @@ -24,7 +24,7 @@ import lombok.Getter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; @Entity @Audited diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeEntity.java index ee5ba20f3..a6524955c 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeEntity.java @@ -29,13 +29,13 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; -import static javax.persistence.CascadeType.ALL; -import static javax.persistence.CascadeType.REMOVE; +import static jakarta.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.REMOVE; /** * Entity implementation class for Entity: ResourceType diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/boundary/RelationEditor.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/boundary/RelationEditor.java index 6f07e8668..41b6eb8f5 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/boundary/RelationEditor.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/boundary/RelationEditor.java @@ -29,9 +29,9 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; import com.google.common.base.Enums; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepository.java index 5b065c66b..9312fa745 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepository.java @@ -27,7 +27,7 @@ import ch.puzzle.itc.mobiliar.common.exception.AMWRuntimeException; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.List; public class ResourceRelationContextRepository { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationRepository.java index 3ad0cb84a..323b24783 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationRepository.java @@ -23,7 +23,7 @@ import java.util.List; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import ch.puzzle.itc.mobiliar.business.releasing.entity.ReleaseEntity; import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceEntity; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationService.java index 938429f8d..8a7440213 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationService.java @@ -50,9 +50,9 @@ import javax.ejb.Stateless; 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 java.io.Serializable; import java.util.*; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/AbstractResourceRelationEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/AbstractResourceRelationEntity.java index dd229a872..c76b3e85f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/AbstractResourceRelationEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/AbstractResourceRelationEntity.java @@ -20,14 +20,14 @@ package ch.puzzle.itc.mobiliar.business.resourcerelation.entity; -import static javax.persistence.CascadeType.DETACH; -import static javax.persistence.CascadeType.PERSIST; +import static jakarta.persistence.CascadeType.DETACH; +import static jakarta.persistence.CascadeType.PERSIST; import java.util.Comparator; import java.util.HashSet; import java.util.Objects; -import javax.persistence.*; +import jakarta.persistence.*; import lombok.Getter; import lombok.Setter; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ConsumedResourceRelationEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ConsumedResourceRelationEntity.java index 40a8e72bf..b999f4eea 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ConsumedResourceRelationEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ConsumedResourceRelationEntity.java @@ -29,13 +29,13 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; import org.hibernate.envers.Audited; -import javax.persistence.Entity; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.util.Objects; import java.util.Set; -import static javax.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.ALL; @Entity @Audited() diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ProvidedResourceRelationEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ProvidedResourceRelationEntity.java index 19ace080c..2cf658418 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ProvidedResourceRelationEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ProvidedResourceRelationEntity.java @@ -30,13 +30,13 @@ import org.apache.commons.lang3.StringUtils; import org.hibernate.envers.Audited; -import javax.persistence.Entity; -import javax.persistence.OneToMany; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import java.util.Objects; import java.util.Set; -import static javax.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.ALL; @Entity @Audited diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationContextEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationContextEntity.java index 9d3f1af2f..3dd3a5c56 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationContextEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationContextEntity.java @@ -26,10 +26,10 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Set; -import static javax.persistence.CascadeType.PERSIST; +import static jakarta.persistence.CascadeType.PERSIST; @Entity @Audited diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationTypeContextEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationTypeContextEntity.java index 4ce950568..a9717421e 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationTypeContextEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationTypeContextEntity.java @@ -23,9 +23,9 @@ import ch.puzzle.itc.mobiliar.business.environment.entity.ContextDependency; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; -import static javax.persistence.CascadeType.PERSIST; +import static jakarta.persistence.CascadeType.PERSIST; @Entity @Audited diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationTypeEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationTypeEntity.java index 82c32884a..a84e14a09 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationTypeEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/resourcerelation/entity/ResourceRelationTypeEntity.java @@ -30,11 +30,11 @@ import org.apache.commons.lang3.StringUtils; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.Set; -import static javax.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.ALL; /** * Entity implementation class for Entity: ResourceType diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/boundary/PermissionBoundary.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/boundary/PermissionBoundary.java index 8eb9cef6d..0761c975f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/boundary/PermissionBoundary.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/boundary/PermissionBoundary.java @@ -40,7 +40,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.io.Serializable; import java.util.ArrayList; import java.util.List; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/PermissionRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/PermissionRepository.java index 9737967a2..53233d104 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/PermissionRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/PermissionRepository.java @@ -25,8 +25,8 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import ch.puzzle.itc.mobiliar.business.security.entity.*; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/RestrictionRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/RestrictionRepository.java index 7eef03dda..aaec04788 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/RestrictionRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/RestrictionRepository.java @@ -31,7 +31,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; @Stateless public class RestrictionRepository extends BaseRepository { diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/SecurityScreenDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/SecurityScreenDomainService.java index a3457cc6d..3cc6c4871 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/SecurityScreenDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/control/SecurityScreenDomainService.java @@ -25,11 +25,11 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Root; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.CriteriaQuery; +import jakarta.persistence.criteria.Root; import ch.puzzle.itc.mobiliar.business.security.entity.PermissionEntity; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/PermissionEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/PermissionEntity.java index fe8558095..e8eb49319 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/PermissionEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/PermissionEntity.java @@ -25,12 +25,12 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; -import static javax.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.ALL; @Entity @Audited diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/RestrictionEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/RestrictionEntity.java index 85021789d..f76a60285 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/RestrictionEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/RestrictionEntity.java @@ -29,7 +29,7 @@ import org.hibernate.annotations.OnDelete; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.ArrayList; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/RoleEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/RoleEntity.java index b17d45354..b2fbe225d 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/RoleEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/RoleEntity.java @@ -26,12 +26,12 @@ import org.hibernate.envers.Audited; import org.hibernate.envers.NotAudited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; -import static javax.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.ALL; @Entity @Audited diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/UserRestrictionEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/UserRestrictionEntity.java index b15d33fd9..957d21873 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/UserRestrictionEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/security/entity/UserRestrictionEntity.java @@ -25,7 +25,7 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; @Entity diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/server/boundary/ServerView.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/server/boundary/ServerView.java index 4ccd95a58..380466aa7 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/server/boundary/ServerView.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/server/boundary/ServerView.java @@ -24,15 +24,15 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Join; -import javax.persistence.criteria.JoinType; -import javax.persistence.criteria.Path; -import javax.persistence.criteria.Predicate; -import javax.persistence.criteria.Root; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.CriteriaQuery; +import jakarta.persistence.criteria.Join; +import jakarta.persistence.criteria.JoinType; +import jakarta.persistence.criteria.Path; +import jakarta.persistence.criteria.Predicate; +import jakarta.persistence.criteria.Root; import org.apache.commons.lang3.StringUtils; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownStpService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownStpService.java index c9c42f802..9f4eb601f 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownStpService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownStpService.java @@ -27,14 +27,14 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; -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.PersistenceContext; +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 ch.puzzle.itc.mobiliar.business.generator.control.ShakedownTestGeneratorDomainService; import ch.puzzle.itc.mobiliar.business.security.interceptor.HasPermission; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestExecuterService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestExecuterService.java index a7f099aa1..5d7530651 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestExecuterService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestExecuterService.java @@ -27,7 +27,7 @@ import javax.ejb.Asynchronous; import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestRunner.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestRunner.java index 3ce510cb9..b788f226d 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestRunner.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestRunner.java @@ -39,8 +39,8 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import javax.xml.bind.JAXB; import ch.puzzle.itc.mobiliar.business.shakedown.xmlmodel.STS; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestService.java index 28de9e802..349edd9f7 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestService.java @@ -54,13 +54,13 @@ import javax.ejb.TransactionAttributeType; import javax.enterprise.event.Event; import javax.inject.Inject; -import javax.persistence.EntityManager; -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.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.*; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/entity/ShakedownStpEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/entity/ShakedownStpEntity.java index b0d4b55ed..76ac2daa5 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/entity/ShakedownStpEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/entity/ShakedownStpEntity.java @@ -25,7 +25,7 @@ import lombok.Setter; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; /** diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/entity/ShakedownTestEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/entity/ShakedownTestEntity.java index 7f82551e2..5d7eb2e4b 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/entity/ShakedownTestEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/shakedown/entity/ShakedownTestEntity.java @@ -34,7 +34,7 @@ import lombok.Setter; import lombok.SneakyThrows; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.io.StringReader; import java.util.Date; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/boundary/SoftlinkRelationBoundary.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/boundary/SoftlinkRelationBoundary.java index f30360fef..98a31e63d 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/boundary/SoftlinkRelationBoundary.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/boundary/SoftlinkRelationBoundary.java @@ -25,7 +25,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import ch.puzzle.itc.mobiliar.business.foreignable.control.ForeignableService; import ch.puzzle.itc.mobiliar.business.foreignable.entity.ForeignableOwner; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftlinkRelationService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftlinkRelationService.java index 3a38f1e94..d2e46abb4 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftlinkRelationService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftlinkRelationService.java @@ -31,8 +31,8 @@ import ch.puzzle.itc.mobiliar.business.softlinkRelation.entity.SoftlinkRelationEntity; import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import java.io.Serializable; import java.util.Collections; import java.util.List; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/entity/SoftlinkRelationEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/entity/SoftlinkRelationEntity.java index 6bb443f24..f7ddf2089 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/entity/SoftlinkRelationEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/entity/SoftlinkRelationEntity.java @@ -20,10 +20,10 @@ package ch.puzzle.itc.mobiliar.business.softlinkRelation.entity; -import static javax.persistence.CascadeType.DETACH; -import static javax.persistence.CascadeType.PERSIST; +import static jakarta.persistence.CascadeType.DETACH; +import static jakarta.persistence.CascadeType.PERSIST; -import javax.persistence.*; +import jakarta.persistence.*; import ch.puzzle.itc.mobiliar.business.resourcegroup.control.CopyResourceDomainService; import lombok.Getter; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/boundary/TemplateEditor.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/boundary/TemplateEditor.java index a19baba2a..38f373d4e 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/boundary/TemplateEditor.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/boundary/TemplateEditor.java @@ -30,9 +30,9 @@ import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; 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 org.apache.commons.lang3.StringUtils; import org.hibernate.envers.AuditReader; @@ -105,8 +105,8 @@ public TemplateDescriptorEntity getTemplateById(Integer templateId) { } public TemplateDescriptorEntity getTemplateByIdAndRevision(Integer templateId, Number revisionId) { - TemplateDescriptorEntity templateDescriptorEntity = AuditReaderFactory.get(entityManager).find( - TemplateDescriptorEntity.class, templateId, revisionId); + TemplateDescriptorEntity templateDescriptorEntity = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)) + .find(TemplateDescriptorEntity.class, templateId, revisionId); //We have to ensure, that the target platforms are loaded. To make sure, that the compiler doesn't optimize the access to the target platforms away, we have to do this ugly hack. templateDescriptorEntity.getTargetPlatforms().size(); return templateDescriptorEntity; @@ -114,7 +114,7 @@ public TemplateDescriptorEntity getTemplateByIdAndRevision(Integer templateId, N public List getTemplateRevisions(Integer templateId) { List result = new ArrayList<>(); - AuditReader reader = AuditReaderFactory.get(entityManager); + AuditReader reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)); List list = reader.getRevisions(TemplateDescriptorEntity.class, templateId); for (Number rev : list) { Date date = reader.getRevisionDate(rev); diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/TemplateDescriptorEntityAuditviewHandler.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/TemplateDescriptorEntityAuditviewHandler.java index 4f7377de6..7febccca1 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/TemplateDescriptorEntityAuditviewHandler.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/TemplateDescriptorEntityAuditviewHandler.java @@ -7,7 +7,7 @@ import javax.ejb.Stateless; import javax.inject.Named; -import javax.persistence.NoResultException; +import jakarta.persistence.NoResultException; import static ch.puzzle.itc.mobiliar.business.auditview.entity.AuditViewEntry.RELATION_CONSUMED_RESOURCE; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/TemplatesScreenDomainService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/TemplatesScreenDomainService.java index bcb136bc1..4f5c3ee2e 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/TemplatesScreenDomainService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/TemplatesScreenDomainService.java @@ -37,14 +37,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.*; import java.util.logging.Logger; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/entity/TemplateDescriptorEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/entity/TemplateDescriptorEntity.java index 70d3e0f2a..c2e00d053 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/entity/TemplateDescriptorEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/entity/TemplateDescriptorEntity.java @@ -34,7 +34,7 @@ import org.apache.commons.lang3.StringUtils; import org.hibernate.envers.Audited; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.HashMap; import java.util.HashSet; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/control/UserSettingsService.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/control/UserSettingsService.java index 75462ba5f..1378559f1 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/control/UserSettingsService.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/control/UserSettingsService.java @@ -27,11 +27,11 @@ 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.*; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.*; import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceGroupEntity; import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceTypeEntity; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/entity/FavoriteResourceEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/entity/FavoriteResourceEntity.java index 050b7b105..22e9653db 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/entity/FavoriteResourceEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/entity/FavoriteResourceEntity.java @@ -25,7 +25,7 @@ import lombok.Getter; import lombok.Setter; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; @Entity diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/entity/UserSettingsEntity.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/entity/UserSettingsEntity.java index 5a8ccf2d0..078ebaea9 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/entity/UserSettingsEntity.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/usersettings/entity/UserSettingsEntity.java @@ -24,7 +24,7 @@ import lombok.Getter; import lombok.Setter; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Set; @Entity diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/BaseRepository.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/BaseRepository.java index c039da9ea..8152ac693 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/BaseRepository.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/BaseRepository.java @@ -20,11 +20,11 @@ package ch.puzzle.itc.mobiliar.business.utils; -import javax.persistence.*; -import javax.persistence.PersistenceContext; +import jakarta.persistence.*; +import jakarta.persistence.PersistenceContext; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.CriteriaQuery; import java.util.*; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/ReflectionUtil.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/ReflectionUtil.java index 3d1b8b91d..8b8e08a80 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/ReflectionUtil.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/ReflectionUtil.java @@ -22,9 +22,9 @@ import org.hibernate.proxy.HibernateProxy; -import javax.persistence.FetchType; -import javax.persistence.OneToMany; -import javax.persistence.OneToOne; +import jakarta.persistence.FetchType; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; import java.lang.annotation.Annotation; diff --git a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/database/DatabaseUtil.java b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/database/DatabaseUtil.java index f03b4c9f1..c1a5491d3 100644 --- a/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/database/DatabaseUtil.java +++ b/AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/utils/database/DatabaseUtil.java @@ -1,7 +1,10 @@ package ch.puzzle.itc.mobiliar.business.utils.database; import javax.inject.Inject; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; +import org.hibernate.Session; + +import java.sql.DatabaseMetaData; import java.sql.SQLException; import java.util.Objects; @@ -20,16 +23,13 @@ public boolean isOracle() { } private boolean isEngine(String engine) { - org.hibernate.engine.spi.SessionImplementor sessionImp = - (org.hibernate.engine.spi.SessionImplementor) entityManager.getDelegate(); + Session session = entityManager.unwrap(Session.class); String databaseProductName = null; - try { - databaseProductName = sessionImp.connection().getMetaData().getDatabaseProductName(); - } catch (SQLException e) { - e.printStackTrace(); - } + databaseProductName = session.doReturningWork(connection -> { + DatabaseMetaData metaData = connection.getMetaData(); + return metaData.getDatabaseProductName(); + }); + return Objects.requireNonNull(databaseProductName).equalsIgnoreCase(engine); } - - } diff --git a/AMW_business/src/main/resources/META-INF/persistence.xml b/AMW_business/src/main/resources/META-INF/persistence.xml index 412c4284c..7b6f62420 100644 --- a/AMW_business/src/main/resources/META-INF/persistence.xml +++ b/AMW_business/src/main/resources/META-INF/persistence.xml @@ -1,10 +1,7 @@ - + - org.hibernate.ejb.HibernatePersistence + org.hibernate.jpa.HibernatePersistenceProvider java:jboss/datasources/amwDS diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditServiceTest.java index 740f2f690..1d58558f4 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/auditview/control/AuditServiceTest.java @@ -43,8 +43,8 @@ import org.mockito.InjectMocks; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.Collections; import java.util.HashMap; import java.util.Map; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/auditview/control/GenericAuditViewHandlerTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/auditview/control/GenericAuditViewHandlerTest.java index e78e1a3e6..00f173705 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/auditview/control/GenericAuditViewHandlerTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/auditview/control/GenericAuditViewHandlerTest.java @@ -15,7 +15,7 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import static org.hamcrest.Matchers.is; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/configurationtag/control/TagConfigurationServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/configurationtag/control/TagConfigurationServicePersistenceTest.java index a0c9e2b41..44fd11e54 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/configurationtag/control/TagConfigurationServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/configurationtag/control/TagConfigurationServicePersistenceTest.java @@ -36,8 +36,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.Date; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/database/control/EntityManagerProducerIntegrationTestImpl.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/database/control/EntityManagerProducerIntegrationTestImpl.java index c10be4c81..ede17394c 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/database/control/EntityManagerProducerIntegrationTestImpl.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/database/control/EntityManagerProducerIntegrationTestImpl.java @@ -28,8 +28,8 @@ import javax.enterprise.inject.Produces; import javax.enterprise.inject.Specializes; -import javax.persistence.EntityManager; -import javax.persistence.Persistence; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Persistence; @Specializes public class EntityManagerProducerIntegrationTestImpl extends EntityManagerProducer { diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundaryPersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundaryPersistenceTest.java index 2f414d726..f400e7c15 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundaryPersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundaryPersistenceTest.java @@ -47,8 +47,8 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.time.LocalDateTime; import java.util.*; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundaryTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundaryTest.java index 66f3643fa..64bb1a025 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundaryTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/boundary/DeploymentBoundaryTest.java @@ -44,9 +44,9 @@ import org.mockito.*; import org.mockito.junit.MockitoJUnitRunner; -import javax.persistence.EntityManager; -import javax.persistence.LockModeType; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.LockModeType; +import jakarta.persistence.Query; import java.io.File; import java.nio.file.Files; import java.nio.file.attribute.BasicFileAttributeView; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/control/DeploymentExecuterServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/control/DeploymentExecuterServiceTest.java index 9bd3d4518..b01d9d755 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/control/DeploymentExecuterServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/deploy/control/DeploymentExecuterServiceTest.java @@ -38,7 +38,7 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.ArrayList; import java.util.Date; import java.util.List; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonDomainServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonDomainServicePersistenceTest.java index ca4b4d488..c72e1cae4 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonDomainServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonDomainServicePersistenceTest.java @@ -33,8 +33,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.logging.Logger; import static org.junit.Assert.*; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterServicePersistenceTest.java index 6590c8710..a8a44bd4f 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/domain/commons/CommonFilterServicePersistenceTest.java @@ -29,7 +29,6 @@ import ch.puzzle.itc.mobiliar.test.testrunner.PersistenceTestRunner; -import org.hibernate.internal.QueryImpl; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -38,9 +37,9 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; @@ -198,8 +197,8 @@ public void orderByClauseShouldContainLowerIfIgnoreCaseIsTrue(){ true, false); //then - assertThat(query.unwrap(QueryImpl.class), is(not(nullValue()))); - assertThat(query.unwrap(QueryImpl.class).getQueryString(), containsString("LOWER(d.deploymentDate)")); + assertThat(query.unwrap(org.hibernate.query.Query.class), is(not(nullValue()))); + assertThat(query.unwrap(org.hibernate.query.Query.class).getQueryString(), containsString("LOWER(d.deploymentDate)")); } @Test @@ -215,8 +214,8 @@ public void orderByClauseShouldNotContainLower(){ Query query = service.addFilterAndCreateQuery(stringQuery, filters, Sort.builder().order(colToSort).order(uniqueCol).build(), true, false); //then - assertThat(query.unwrap(QueryImpl.class), is(not(nullValue()))); - assertThat(query.unwrap(QueryImpl.class).getQueryString(), not(containsString("LOWER("))); + assertThat(query.unwrap(org.hibernate.query.Query.class), is(not(nullValue()))); + assertThat(query.unwrap(org.hibernate.query.Query.class).getQueryString(), not(containsString("LOWER("))); } diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/foreignable/control/ForeignableServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/foreignable/control/ForeignableServiceTest.java index fc9cb7a3f..a428c7f92 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/foreignable/control/ForeignableServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/foreignable/control/ForeignableServiceTest.java @@ -27,7 +27,7 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import org.junit.Before; import org.junit.Test; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/function/control/FunctionRepositoryTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/function/control/FunctionRepositoryTest.java index 6c3e825d3..675f71342 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/function/control/FunctionRepositoryTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/function/control/FunctionRepositoryTest.java @@ -20,7 +20,7 @@ package ch.puzzle.itc.mobiliar.business.function.control; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import org.junit.Before; import org.junit.Test; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/ShakedownTestGeneratorDomainServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/ShakedownTestGeneratorDomainServiceTest.java index caade2dfa..94b69faac 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/ShakedownTestGeneratorDomainServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/ShakedownTestGeneratorDomainServiceTest.java @@ -47,7 +47,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.io.IOException; import java.util.ArrayList; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/ApplicationResolverEntityBuilder.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/ApplicationResolverEntityBuilder.java index 19e69b7bc..73313d212 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/ApplicationResolverEntityBuilder.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/ApplicationResolverEntityBuilder.java @@ -30,7 +30,7 @@ import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceTypeEntity; import ch.puzzle.itc.mobiliar.test.PersistingEntityBuilder; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.ArrayList; import java.util.Date; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/ApplicationResolverTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/ApplicationResolverTest.java index f4f0bc618..bf4e20897 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/ApplicationResolverTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/ApplicationResolverTest.java @@ -36,8 +36,8 @@ import org.junit.runner.RunWith; import org.mockito.*; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.io.IOException; import java.util.logging.Level; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/globalfunction/control/GlobalFunctionsRepositoryTestWithPersistence.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/globalfunction/control/GlobalFunctionsRepositoryTestWithPersistence.java index ae200d36f..6a780bf7a 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/globalfunction/control/GlobalFunctionsRepositoryTestWithPersistence.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/globalfunction/control/GlobalFunctionsRepositoryTestWithPersistence.java @@ -23,8 +23,8 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import ch.puzzle.itc.mobiliar.test.testrunner.PersistenceTestRunner; import org.junit.Test; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/issues/Issue5959AppServerRelationsTemplateProcessorProvidedConsumedTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/issues/Issue5959AppServerRelationsTemplateProcessorProvidedConsumedTest.java index e57f3ffff..b843e715d 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/issues/Issue5959AppServerRelationsTemplateProcessorProvidedConsumedTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/issues/Issue5959AppServerRelationsTemplateProcessorProvidedConsumedTest.java @@ -27,8 +27,8 @@ import java.util.ArrayList; import java.util.logging.Level; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import org.junit.Before; import org.junit.Test; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/issues/Issue6111RelationIdentifierTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/issues/Issue6111RelationIdentifierTest.java index a9fa4cb9c..8ea2677be 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/issues/Issue6111RelationIdentifierTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/issues/Issue6111RelationIdentifierTest.java @@ -23,8 +23,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import org.junit.Before; import org.junit.Test; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/AddTagUseCaseTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/AddTagUseCaseTest.java index 75b54cf39..8cd800827 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/AddTagUseCaseTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/AddTagUseCaseTest.java @@ -8,8 +8,8 @@ import org.junit.Test; import org.junit.runner.RunWith; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.logging.Logger; import static ch.puzzle.itc.mobiliar.business.property.entity.PropertyTagType.GLOBAL; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/ListTagsUseCaseTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/ListTagsUseCaseTest.java index 762830f18..6714d0122 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/ListTagsUseCaseTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/ListTagsUseCaseTest.java @@ -8,8 +8,8 @@ import org.junit.Test; import org.junit.runner.RunWith; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/PropertyEditorTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/PropertyEditorTest.java index 03c9c4dab..f87be5fc1 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/PropertyEditorTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/PropertyEditorTest.java @@ -25,8 +25,8 @@ import java.util.*; import java.util.logging.Logger; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import ch.puzzle.itc.mobiliar.business.auditview.control.AuditService; import ch.puzzle.itc.mobiliar.business.environment.control.ContextDomainService; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/RemoveTagUseCaseTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/RemoveTagUseCaseTest.java index 0993b036d..b79e4ed6e 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/RemoveTagUseCaseTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/boundary/RemoveTagUseCaseTest.java @@ -9,9 +9,9 @@ import org.junit.Test; import org.junit.runner.RunWith; -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 java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyDescriptorServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyDescriptorServiceTest.java index 8388b2bf4..e707ee7fb 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyDescriptorServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyDescriptorServiceTest.java @@ -24,8 +24,8 @@ import java.util.*; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import ch.puzzle.itc.mobiliar.builders.PropertyEntityBuilder; import ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceContextEntity; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingServicePropertyDescriptorsTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingServicePropertyDescriptorsTest.java index 13dd76d31..770a5b99f 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingServicePropertyDescriptorsTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyEditingServicePropertyDescriptorsTest.java @@ -41,9 +41,9 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTestUtils.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTestUtils.java index ac85ce0d8..0412d01cc 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTestUtils.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyTestUtils.java @@ -20,7 +20,7 @@ package ch.puzzle.itc.mobiliar.business.property.control; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import ch.puzzle.itc.mobiliar.business.environment.entity.ContextEntity; import ch.puzzle.itc.mobiliar.business.property.entity.PropertyDescriptorEntity; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyValueServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyValueServiceTest.java index 15d0959df..17d2feaa2 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyValueServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/property/control/PropertyValueServiceTest.java @@ -42,8 +42,8 @@ import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import java.util.Arrays; import java.util.Collections; import java.util.List; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtPersistenceServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtPersistenceServiceTest.java index 1a1c5a840..68642710d 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtPersistenceServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/releasing/control/ReleaseMgmtPersistenceServiceTest.java @@ -31,8 +31,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.Date; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourceactivation/boundary/ResourceActivationServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourceactivation/boundary/ResourceActivationServiceTest.java index a0cd8b6ec..a5e05b44e 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourceactivation/boundary/ResourceActivationServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourceactivation/boundary/ResourceActivationServiceTest.java @@ -35,7 +35,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.ArrayList; import java.util.Arrays; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourceactivation/control/ResourceActivationTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourceactivation/control/ResourceActivationTest.java index e4dc6b060..dcaf26642 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourceactivation/control/ResourceActivationTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourceactivation/control/ResourceActivationTest.java @@ -35,7 +35,7 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceBoundaryPersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceBoundaryPersistenceTest.java index 5da559c5d..fc0231f11 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceBoundaryPersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceBoundaryPersistenceTest.java @@ -54,8 +54,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.logging.Logger; import static org.junit.Assert.assertNotNull; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceLocatorTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceLocatorTest.java index e11d56964..3df2cfa55 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceLocatorTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceLocatorTest.java @@ -31,7 +31,7 @@ import java.util.Properties; import java.util.logging.Logger; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import ch.puzzle.itc.mobiliar.common.exception.ValidationException; import ch.puzzle.itc.mobiliar.common.util.ConfigKey; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsIntegrationTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsIntegrationTest.java index 96e12a31e..5ee138450 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsIntegrationTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/boundary/ResourceRelationsIntegrationTest.java @@ -40,8 +40,8 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.Arrays; import java.util.Date; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServiceParameterizedTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServiceParameterizedTest.java index 366d3c20f..0451a8313 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServiceParameterizedTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServiceParameterizedTest.java @@ -58,7 +58,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.*; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServicePersistenceTest.java index b44aefdaa..cf18dbc1d 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServicePersistenceTest.java @@ -26,8 +26,8 @@ import java.util.logging.Logger; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import ch.puzzle.itc.mobiliar.business.auditview.control.AuditService; import ch.puzzle.itc.mobiliar.common.exception.AMWException; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServiceTest.java index 387182ee4..cc5134d12 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/CopyResourceDomainServiceTest.java @@ -29,8 +29,6 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.EntityManager; - import org.junit.Before; import org.junit.Test; import org.mockito.InjectMocks; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceServiceTest.java index 44cb6b20c..d6289489a 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupPersistenceServiceTest.java @@ -36,8 +36,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.ArrayList; import java.util.List; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepositoryTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepositoryTest.java index 4cf11ec32..f60a408bb 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepositoryTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceGroupRepositoryTest.java @@ -40,8 +40,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceRepositoryTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceRepositoryTest.java index 268628ae7..31cf26eb9 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceRepositoryTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceRepositoryTest.java @@ -37,7 +37,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.HashSet; import java.util.Set; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceValidationServiceIntegrationTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceValidationServiceIntegrationTest.java index 2159bc342..03ff63631 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceValidationServiceIntegrationTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/control/ResourceValidationServiceIntegrationTest.java @@ -37,8 +37,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import static org.junit.Assert.assertNotNull; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceEntityPersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceEntityPersistenceTest.java index 16b6597a1..d9202c62a 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceEntityPersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceEntityPersistenceTest.java @@ -5,8 +5,8 @@ import org.junit.Test; import org.junit.runner.RunWith; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeEntityPersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeEntityPersistenceTest.java index 1007c7c3f..7065cf567 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeEntityPersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcegroup/entity/ResourceTypeEntityPersistenceTest.java @@ -5,8 +5,8 @@ import org.junit.Test; import org.junit.runner.RunWith; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import static org.junit.Assert.*; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepositoryPersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepositoryPersistenceTest.java index 02dc5d110..218591d3f 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepositoryPersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepositoryPersistenceTest.java @@ -34,8 +34,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.Arrays; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepositoryTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepositoryTest.java index 87d1b02a1..23e46afae 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepositoryTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationContextRepositoryTest.java @@ -29,7 +29,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.*; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationServicePersistenceTest.java index 5985f6b09..2c317e56d 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationServicePersistenceTest.java @@ -44,8 +44,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.Date; import java.util.HashSet; import java.util.List; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationServiceTest.java index 23fc938e9..b65877142 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/resourcerelation/control/ResourceRelationServiceTest.java @@ -19,7 +19,7 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.Collections; import static org.hamcrest.core.Is.is; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/security/boundary/PermissionBoundaryTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/security/boundary/PermissionBoundaryTest.java index 962d91a85..c54917d48 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/security/boundary/PermissionBoundaryTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/security/boundary/PermissionBoundaryTest.java @@ -43,8 +43,8 @@ import org.mockito.Mock; import org.mockito.Mockito; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; import java.util.Arrays; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/security/control/PermissionServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/security/control/PermissionServiceTest.java index 5b57319eb..a48da8b00 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/security/control/PermissionServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/security/control/PermissionServiceTest.java @@ -24,8 +24,8 @@ import java.util.*; import javax.ejb.SessionContext; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import ch.puzzle.itc.mobiliar.builders.ContextEntityBuilder; import ch.puzzle.itc.mobiliar.builders.ResourceEntityBuilder; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownStpServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownStpServicePersistenceTest.java index 424d937eb..e28286f9c 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownStpServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownStpServicePersistenceTest.java @@ -31,8 +31,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestExecuterServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestExecuterServiceTest.java index a69f1c44a..19d6a7214 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestExecuterServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestExecuterServiceTest.java @@ -27,7 +27,7 @@ import java.util.logging.Logger; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import org.junit.Before; import org.junit.Test; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestServicePersistenceTest.java index 57917cd0e..b55cde4c4 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/shakedown/control/ShakedownTestServicePersistenceTest.java @@ -30,8 +30,8 @@ import java.util.List; import java.util.logging.Logger; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import ch.puzzle.itc.mobiliar.business.resourcegroup.control.ResourceTypeRepository; import org.junit.Before; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/boundary/SoftlinkRelationBoundaryTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/boundary/SoftlinkRelationBoundaryTest.java index 15fd03379..d94454600 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/boundary/SoftlinkRelationBoundaryTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/boundary/SoftlinkRelationBoundaryTest.java @@ -22,7 +22,7 @@ import static org.mockito.Mockito.*; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import ch.puzzle.itc.mobiliar.business.releasing.entity.ReleaseEntity; import ch.puzzle.itc.mobiliar.business.security.control.PermissionService; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftLinkRelationServiceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftLinkRelationServiceTest.java index 9865258fb..7dfe444c1 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftLinkRelationServiceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftLinkRelationServiceTest.java @@ -15,8 +15,8 @@ import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import java.util.Collections; import static org.hamcrest.core.Is.is; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftlinkRelationServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftlinkRelationServicePersistenceTest.java index 8b76314c1..446112e8d 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftlinkRelationServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/softlinkRelation/control/SoftlinkRelationServicePersistenceTest.java @@ -40,9 +40,9 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.EntityTransaction; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.PersistenceContext; import java.util.Calendar; import java.util.Date; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/template/boundary/TemplateEditorTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/template/boundary/TemplateEditorTest.java index 8b89ae9f8..7618de945 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/template/boundary/TemplateEditorTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/template/boundary/TemplateEditorTest.java @@ -21,7 +21,7 @@ import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/template/control/TemplatesScreenDomainServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/template/control/TemplatesScreenDomainServicePersistenceTest.java index 99890e13d..e48a2bd9e 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/template/control/TemplatesScreenDomainServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/template/control/TemplatesScreenDomainServicePersistenceTest.java @@ -30,8 +30,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.List; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/usersettings/control/UserSettingsServicePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/usersettings/control/UserSettingsServicePersistenceTest.java index 5a9402264..0f1f0bafa 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/usersettings/control/UserSettingsServicePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/usersettings/control/UserSettingsServicePersistenceTest.java @@ -37,9 +37,9 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.persistence.PersistenceException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.PersistenceException; import java.util.Map; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/utils/BaseRepositoryTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/utils/BaseRepositoryTest.java index 08db7e062..445935434 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/utils/BaseRepositoryTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/business/utils/BaseRepositoryTest.java @@ -26,8 +26,8 @@ import org.junit.Test; import org.junit.runner.RunWith; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.List; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/envers/EnversAssumptionTests.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/envers/EnversAssumptionTests.java index 7442d177d..5186de573 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/envers/EnversAssumptionTests.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/envers/EnversAssumptionTests.java @@ -22,8 +22,8 @@ import java.util.Date; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import org.hibernate.envers.AuditReader; import org.hibernate.envers.AuditReaderFactory; @@ -57,7 +57,7 @@ protected EntityManager getEntityManager() { @Before public void setup() throws Exception { - auditReader = AuditReaderFactory.get(entityManager); + auditReader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)); // We create a context entity c = new ContextEntity(); diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/release/ReleaseTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/release/ReleaseTest.java index 7b81dd940..e9a92d734 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/release/ReleaseTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/release/ReleaseTest.java @@ -43,8 +43,8 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.List; import java.util.Map; @@ -87,7 +87,7 @@ public void before() { context = builder.context; asContext = as.getContextsByLowestContext(context).get(0); - reader = AuditReaderFactory.get(entityManager); + reader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)); } @Test diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/AbstractPersistenceEnverseTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/AbstractPersistenceEnverseTest.java index a89dee63e..f38e4444c 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/AbstractPersistenceEnverseTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/AbstractPersistenceEnverseTest.java @@ -20,7 +20,7 @@ package ch.puzzle.itc.mobiliar.test; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import org.junit.runner.RunWith; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/DeploymentInfo.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/DeploymentInfo.java index bd751e3c1..4e91dc692 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/DeploymentInfo.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/DeploymentInfo.java @@ -32,8 +32,8 @@ import com.google.gson.reflect.TypeToken; import org.apache.maven.artifact.versioning.DefaultArtifactVersion; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.lang.reflect.Type; import java.util.Collections; import java.util.Comparator; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/Entity/Color.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/Entity/Color.java index 0f870b62d..2111885bc 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/Entity/Color.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/Entity/Color.java @@ -20,7 +20,7 @@ package ch.puzzle.itc.mobiliar.test.Entity; -import javax.persistence.*; +import jakarta.persistence.*; @Entity public class Color { diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/PersistingEntityBuilder.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/PersistingEntityBuilder.java index c78b67dc2..ea9b2ea73 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/PersistingEntityBuilder.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/PersistingEntityBuilder.java @@ -32,7 +32,7 @@ import ch.puzzle.itc.mobiliar.business.utils.Identifiable; import org.apache.commons.lang3.StringUtils; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.Date; import static ch.puzzle.itc.mobiliar.test.EntityBuilderType.*; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/PersistingEntityBuilderTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/PersistingEntityBuilderTest.java index 01f87eabb..25cd543b1 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/PersistingEntityBuilderTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/PersistingEntityBuilderTest.java @@ -40,8 +40,8 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.List; import java.util.Map; import java.util.logging.Logger; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/PersistenceTestRule.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/PersistenceTestRule.java index e4f31e334..5bc209356 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/PersistenceTestRule.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/PersistenceTestRule.java @@ -23,12 +23,12 @@ import java.io.IOException; import java.lang.reflect.Field; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.PersistenceContext; -import javax.persistence.PersistenceUnit; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.Persistence; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.PersistenceUnit; import ch.puzzle.itc.mobiliar.business.database.control.EntityManagerProducerIntegrationTestImpl; import org.junit.rules.ExternalResource; diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/example/ExamplePersistenceEnversTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/example/ExamplePersistenceEnversTest.java index 10f2664a1..cee70f6ae 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/example/ExamplePersistenceEnversTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/example/ExamplePersistenceEnversTest.java @@ -25,8 +25,8 @@ import java.util.List; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import org.hibernate.envers.AuditReader; import org.hibernate.envers.AuditReaderFactory; @@ -66,7 +66,7 @@ public void shouldFindPropertyDescriptorEntity_inDifferentVersions() throws Exce // when PropertyDescriptorEntity result = entityManager.find(PropertyDescriptorEntity.class, 1); - AuditReader auditReader = AuditReaderFactory.get(entityManager); + AuditReader auditReader = AuditReaderFactory.get(entityManager.unwrap(org.hibernate.Session.class)); List revisions = auditReader.getRevisions(PropertyDescriptorEntity.class, 1); PropertyDescriptorEntity revision1 = auditReader.find(PropertyDescriptorEntity.class, 1, 1); diff --git a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/example/ExamplePersistenceTest.java b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/example/ExamplePersistenceTest.java index 6070e6cce..a0a9fdd8c 100644 --- a/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/example/ExamplePersistenceTest.java +++ b/AMW_business/src/test/java/ch/puzzle/itc/mobiliar/test/testrunner/example/ExamplePersistenceTest.java @@ -23,8 +23,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import org.junit.Before; import org.junit.Test; diff --git a/AMW_rest/pom.xml b/AMW_rest/pom.xml index 770eb2c46..0e03d7847 100644 --- a/AMW_rest/pom.xml +++ b/AMW_rest/pom.xml @@ -143,6 +143,10 @@ com.google.code.gson gson + + jakarta.persistence + jakarta.persistence-api + diff --git a/AMW_rest/src/main/java/ch/mobi/itc/mobiliar/rest/deployments/DeploymentsRest.java b/AMW_rest/src/main/java/ch/mobi/itc/mobiliar/rest/deployments/DeploymentsRest.java index e990c622b..ac18c982d 100644 --- a/AMW_rest/src/main/java/ch/mobi/itc/mobiliar/rest/deployments/DeploymentsRest.java +++ b/AMW_rest/src/main/java/ch/mobi/itc/mobiliar/rest/deployments/DeploymentsRest.java @@ -58,7 +58,7 @@ import javax.ejb.Stateless; import javax.inject.Inject; -import javax.persistence.NoResultException; +import jakarta.persistence.NoResultException; import javax.ws.rs.*; import javax.ws.rs.core.GenericEntity; import javax.ws.rs.core.MediaType; diff --git a/AMW_rest/src/test/java/ch/mobi/itc/mobiliar/rest/deployments/DeploymentTest.java b/AMW_rest/src/test/java/ch/mobi/itc/mobiliar/rest/deployments/DeploymentTest.java index 5274fa518..0b075b991 100644 --- a/AMW_rest/src/test/java/ch/mobi/itc/mobiliar/rest/deployments/DeploymentTest.java +++ b/AMW_rest/src/test/java/ch/mobi/itc/mobiliar/rest/deployments/DeploymentTest.java @@ -55,7 +55,7 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import javax.persistence.NoResultException; +import jakarta.persistence.NoResultException; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import java.util.*; diff --git a/pom.xml b/pom.xml index c65a39eda..88473fb79 100644 --- a/pom.xml +++ b/pom.xml @@ -308,21 +308,21 @@ org.hibernate.validator hibernate-validator - 6.1.5.Final + 8.0.1.Final provided org.hibernate hibernate-core - 5.1.17.Final + 6.6.0.Final provided org.hibernate hibernate-envers - 5.1.17.Final + 6.6.0.Final provided @@ -376,6 +376,12 @@ guava 32.0.0-jre + + jakarta.persistence + jakarta.persistence-api + 3.1.0 + compile + junit