fix some warnings

This commit is contained in:
Michael Hoennig 2024-02-27 12:41:29 +01:00
parent 12010b4dae
commit 4bef9391e1

View File

@ -5,6 +5,7 @@ import java.util.function.Consumer;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import net.hostsharing.hsadminng.hs.office.relationship.HsOfficeRelationshipEntity;
import net.hostsharing.hsadminng.persistence.HasUuid;
import net.hostsharing.hsadminng.rbac.rbacobject.RbacObject;
import jakarta.validation.constraints.NotNull;
@ -102,7 +103,7 @@ public class RbacView {
}
public <EC extends RbacObject> RbacView importRootEntityAliasProxy(
final String aliasName, final Class entityClass, final SQL fetchSql, final Column dependsOnColum) {
final String aliasName, final Class<? extends HasUuid> entityClass, final SQL fetchSql, final Column dependsOnColum) {
if ( rootEntityAliasProxy != null ) {
throw new IllegalStateException("there is already an entityAliasProxy: " + rootEntityAliasProxy);
}
@ -111,18 +112,18 @@ public class RbacView {
}
public RbacView importEntityAlias(
final String aliasName, final Class entityClass, final SQL fetchSql, final Column dependsOnColum) {
final String aliasName, final Class<? extends HasUuid> entityClass, final SQL fetchSql, final Column dependsOnColum) {
importEntityAliasImpl(aliasName, entityClass, fetchSql, dependsOnColum);
return this;
}
private EntityAlias importEntityAliasImpl(final String aliasName, final Class entityClass, final SQL fetchSql, final Column dependsOnColum) {
private EntityAlias importEntityAliasImpl(final String aliasName, final Class<? extends HasUuid> entityClass, final SQL fetchSql, final Column dependsOnColum) {
final var entityAlias = new EntityAlias(aliasName, entityClass, fetchSql, dependsOnColum);
entityAliases.put(aliasName, entityAlias);
try {
importAsAlias(aliasName, rbacDefinition(entityClass));
} catch ( final Exception exc) {
new RuntimeException("cannot import entity: " + entityClass, exc);
} catch ( final ReflectiveOperationException exc) {
throw new RuntimeException("cannot import entity: " + entityClass, exc);
}
return entityAlias;
}