/**
 * JBoss, Home of Professional Open Source.
 * Copyright 2014-2019 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jboss.pnc.rest.endpoints;

import org.jboss.pnc.dto.DTOEntity;

import org.jboss.pnc.dto.response.Page;
import org.jboss.pnc.facade.providers.api.Provider;
import org.jboss.pnc.facade.validation.ConflictedEntryException;
import org.jboss.pnc.rest.configuration.SwaggerConstants;
import org.jboss.pnc.facade.validation.DTOValidationException;
import org.jboss.pnc.rest.api.parameters.PageParameters;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


import javax.validation.constraints.NotNull;
import javax.ws.rs.BadRequestException;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;


public class AbstractEndpoint<DTO extends REF, REF extends DTOEntity> {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    private Provider<?, DTO, REF> provider;

    private final Class<DTO> dtoClass;

    public AbstractEndpoint(Class<DTO> dtoClass){
        this.dtoClass = dtoClass;
    }

    public AbstractEndpoint(Provider<?, DTO, REF> provider, Class<DTO> dtoClass) {
        this.provider = provider;
        this.dtoClass = dtoClass;
    }

    protected DTO create(DTO dto) {
        logger.debug("Creating an entity with body: " + dto);
        dto = provider.store(dto);
        logger.debug("Entity with id: " + dto.getId() + " successfully created");
        return dto;
    }

    protected DTO getSpecific(int id) {
        logger.debug("Getting " + dtoClass.getSimpleName() + " with id: " + id);
        DTO dto = provider.getSpecific(id);
        if (dto == null) {
            logger.debug("Entity of type " + dtoClass.getSimpleName() + " with id: " + id + " not found.");
            throw new NotFoundException("Entity of type " + dtoClass.getSimpleName() + " with id: " + id + " not found.");
        }
        logger.debug("Successful retrieval of " + dtoClass.getSimpleName() + " with id: " + id);
        return dto;
    }

    protected Page<DTO> getAll(@NotNull PageParameters pageParameters) {
        logger.debug("Retrieving " + dtoClass.getSimpleName() + "s with these " + pageParameters);
        return provider.getAll(pageParameters.getPageIndex(), pageParameters.getPageSize(), pageParameters.getSort(), pageParameters.getQ());
    };

    protected void update(int id, DTO dto) {
        logger.debug("Updating " + dtoClass.getSimpleName() + " with id: " + id);
        provider.update(id, dto);
    }

    protected void delete(int id) {
        logger.debug("Deleting " + dtoClass.getSimpleName() + " with id: " + id);
        provider.delete(id);
        logger.debug("Deletion of " + dtoClass.getSimpleName() + " with id: " + id + " was successful");
    }
}

@@ -895,491 +895,141 @@
 pnc.
-facade.validation.ConflictedEntryException;%0Aimport org.jboss.pnc.rest.configuration.SwaggerConstants;%0Aimport org.jboss.pnc.facade.validation.DTOValidationException;%0Aimport org.jboss.pnc.rest.api.parameters.PageParameters;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A%0Aimport javax.validation.constraints.NotNull;%0Aimport javax.ws.rs.BadRequestException;%0Aimport javax.ws.rs.NotFoundException;%0Aimport javax.ws.rs.WebApplicationException;%0Aimport javax.ws.rs.core.Response;%0A
+rest.api.parameters.PageParameters;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A%0Aimport javax.ws.rs.NotFoundException;
 %0A%0Apu
@@ -2339,17 +2339,8 @@
 All(
-@NotNull 
 Page

Remove HV000152 error