some cleanup

This commit is contained in:
Michael Hoennig 2024-08-19 09:43:53 +02:00
parent 7d4bdca454
commit 21f25ed888
5 changed files with 4 additions and 27 deletions

View File

@ -101,21 +101,6 @@ public abstract class HsBookingItem implements Stringifyable, BaseEntity<HsBooki
@JoinColumn(name = "parentitemuuid", referencedColumnName = "uuid") @JoinColumn(name = "parentitemuuid", referencedColumnName = "uuid")
private List<HsBookingItemRealEntity> subBookingItems; private List<HsBookingItemRealEntity> subBookingItems;
// FIXME
// @OneToOne(targetEntity = HsHostingAssetRealEntity.class, mappedBy="bookingItem") // does not work in case of subclass HsBookingItemRbacEntity
// // because that bookingItem refers to a HsBookingItemRealEntity, not ...Rbac...
// @OneToOne(fetch = FetchType.LAZY)
// @JoinFormula(
// referencedColumnName = "uuid",
// value = """
// (
// SELECT DISTINCT asset.uuid
// FROM hs_hosting_asset asset
// WHERE asset.uuid=uuid
// )
// """)
// private HsHostingAssetRealEntity relatedHostingAsset;
@Transient @Transient
private PatchableMapWrapper<Object> resourcesWrapper; private PatchableMapWrapper<Object> resourcesWrapper;

View File

@ -1,6 +1,6 @@
package net.hostsharing.hsadminng.hs.booking.item.validators; package net.hostsharing.hsadminng.hs.booking.item.validators;
import net.hostsharing.hsadminng.hs.booking.EntityManagerMock; import net.hostsharing.hsadminng.hs.hosting.asset.EntityManagerMock;
import net.hostsharing.hsadminng.hs.booking.debitor.HsBookingDebitorEntity; import net.hostsharing.hsadminng.hs.booking.debitor.HsBookingDebitorEntity;
import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemRealEntity; import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemRealEntity;
import net.hostsharing.hsadminng.hs.booking.project.HsBookingProjectRealEntity; import net.hostsharing.hsadminng.hs.booking.project.HsBookingProjectRealEntity;
@ -20,7 +20,7 @@ import static java.util.Arrays.stream;
import static java.util.List.of; import static java.util.List.of;
import static java.util.Map.entry; import static java.util.Map.entry;
import static java.util.Map.ofEntries; import static java.util.Map.ofEntries;
import static net.hostsharing.hsadminng.hs.booking.EntityManagerMock.createEntityManagerMockWithAssetQueryFake; import static net.hostsharing.hsadminng.hs.hosting.asset.EntityManagerMock.createEntityManagerMockWithAssetQueryFake;
import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.CLOUD_SERVER; import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.CLOUD_SERVER;
import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.MANAGED_SERVER; import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.MANAGED_SERVER;
import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.MANAGED_WEBSPACE; import static net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType.MANAGED_WEBSPACE;

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.hs.booking; package net.hostsharing.hsadminng.hs.hosting.asset;
import net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetRealEntity;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;

View File

@ -11,7 +11,6 @@ import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType;
import net.hostsharing.hsadminng.hs.booking.project.HsBookingProjectRealRepository; import net.hostsharing.hsadminng.hs.booking.project.HsBookingProjectRealRepository;
import net.hostsharing.hsadminng.hs.office.contact.HsOfficeContactRealEntity; import net.hostsharing.hsadminng.hs.office.contact.HsOfficeContactRealEntity;
import net.hostsharing.hsadminng.hs.office.contact.HsOfficeContactRealRepository; import net.hostsharing.hsadminng.hs.office.contact.HsOfficeContactRealRepository;
import net.hostsharing.hsadminng.hs.office.debitor.HsOfficeDebitorRepository;
import net.hostsharing.hsadminng.rbac.test.ContextBasedTestWithCleanup; import net.hostsharing.hsadminng.rbac.test.ContextBasedTestWithCleanup;
import net.hostsharing.hsadminng.rbac.test.JpaAttempt; import net.hostsharing.hsadminng.rbac.test.JpaAttempt;
import org.junit.jupiter.api.ClassOrderer; import org.junit.jupiter.api.ClassOrderer;
@ -53,18 +52,12 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
@Autowired @Autowired
HsHostingAssetRealRepository realAssetRepo; HsHostingAssetRealRepository realAssetRepo;
@Autowired
HsHostingAssetRbacRepository rbacAssetRepo; // FIXME: remove?
@Autowired @Autowired
HsBookingItemRealRepository realBookingItemRepo; HsBookingItemRealRepository realBookingItemRepo;
@Autowired @Autowired
HsBookingProjectRealRepository realProjectRepo; HsBookingProjectRealRepository realProjectRepo;
@Autowired
HsOfficeDebitorRepository debitorRepo; // FIXME: remove?
@Autowired @Autowired
HsOfficeContactRealRepository realContactRepo; HsOfficeContactRealRepository realContactRepo;

View File

@ -1,6 +1,6 @@
package net.hostsharing.hsadminng.hs.hosting.asset.validators; package net.hostsharing.hsadminng.hs.hosting.asset.validators;
import net.hostsharing.hsadminng.hs.booking.EntityManagerMock; import net.hostsharing.hsadminng.hs.hosting.asset.EntityManagerMock;
import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemRealEntity; import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemRealEntity;
import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType; import net.hostsharing.hsadminng.hs.booking.item.HsBookingItemType;
import net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetRbacEntity; import net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetRbacEntity;