Remove target type to target reference (#1771)

it is not used and could lead to extensive memory usage if JPA provider load targets while loading types

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-07-18 18:13:03 +03:00
committed by GitHub
parent bb288eab6b
commit 56ab399493
7 changed files with 33 additions and 249 deletions

View File

@@ -123,38 +123,6 @@ public interface TargetTypeManagement {
@PreAuthorize(SpPermission.SpringEvalExpressions.HAS_AUTH_READ_TARGET)
Optional<TargetType> get(long id);
/**
* @param targetId
* Target ID
* @return Target Type
*/
@PreAuthorize(SpPermission.SpringEvalExpressions.HAS_AUTH_READ_TARGET)
Optional<TargetType> findByTargetId(long targetId);
/**
* @param targetIds
* List of Target ID
* @return Target Type
*/
@PreAuthorize(SpPermission.SpringEvalExpressions.HAS_AUTH_READ_TARGET)
List<TargetType> findByTargetIds(Collection<Long> targetIds);
/**
* @param controllerId
* Target controller ID
* @return Target Type
*/
@PreAuthorize(SpPermission.SpringEvalExpressions.HAS_AUTH_READ_TARGET)
Optional<TargetType> findByTargetControllerId(String controllerId);
/**
* @param controllerIds
* List of Target controller ID
* @return Target Type
*/
@PreAuthorize(SpPermission.SpringEvalExpressions.HAS_AUTH_READ_TARGET)
List<TargetType> findByTargetControllerIds(Collection<String> controllerIds);
/**
* @param ids
* List of Target type ID

View File

@@ -33,11 +33,6 @@ public interface TargetType extends Type {
*/
Set<DistributionSetType> getCompatibleDistributionSetTypes();
/**
* @return immutable set of optional {@link Target}s
*/
Set<Target> getTargets();
/**
* Checks if the given {@link DistributionSetType} is in
* {@link #getCompatibleDistributionSetTypes()}.