class ProductPriceServiceImpl extends SalesManagerEntityServiceImpl<Long, ProductPrice> 
	implements ProductPriceService {
	
	private ProductPriceRepository productPriceRepository;

	@Inject
	public ProductPriceServiceImpl(ProductPriceRepository productPriceRepository) {
		super(productPriceRepository);
		this.productPriceRepository = productPriceRepository;
	}

	@Override
	public void addDescription(ProductPrice price,
			ProductPriceDescription description) throws ServiceException {
		price.getDescriptions().add(description);
		update(price);
	}
	
	
	@Override
	public ProductPrice saveOrUpdate(ProductPrice price) throws ServiceException {
		
		
		ProductPrice returnEntity = productPriceRepository.save(price);

		return returnEntity;


	}
	
	@Override
	public void delete(ProductPrice price) throws ServiceException {<FILL_FUNCTION_BODY>}

	@Override
	public List<ProductPrice> findByProductSku(String sku, MerchantStore store) {

		return productPriceRepository.findByProduct(sku, store.getCode());
	}

	@Override
	public ProductPrice findById(Long priceId, String sku, MerchantStore store) {
		
		return productPriceRepository.findByProduct(sku, priceId, store.getCode());
	}

	@Override
	public List<ProductPrice> findByInventoryId(Long productInventoryId, String sku, MerchantStore store) {

		return productPriceRepository.findByProductInventoty(sku, productInventoryId, store.getCode());
	}
	


}

		
		//override method, this allows the error that we try to remove a detached variant
		price = this.getById(price.getId());
		super.delete(price);
		
	
<methods>public void <init>(JpaRepository<com.salesmanager.core.model.catalog.product.price.ProductPrice,java.lang.Long>) ,public java.lang.Long count() ,public void create(com.salesmanager.core.model.catalog.product.price.ProductPrice) throws com.salesmanager.core.business.exception.ServiceException,public void delete(com.salesmanager.core.model.catalog.product.price.ProductPrice) throws com.salesmanager.core.business.exception.ServiceException,public void flush() ,public com.salesmanager.core.model.catalog.product.price.ProductPrice getById(java.lang.Long) ,public List<com.salesmanager.core.model.catalog.product.price.ProductPrice> list() ,public void save(com.salesmanager.core.model.catalog.product.price.ProductPrice) throws com.salesmanager.core.business.exception.ServiceException,public void saveAll(Iterable<com.salesmanager.core.model.catalog.product.price.ProductPrice>) throws com.salesmanager.core.business.exception.ServiceException,public void update(com.salesmanager.core.model.catalog.product.price.ProductPrice) throws com.salesmanager.core.business.exception.ServiceException<variables>private Class<com.salesmanager.core.model.catalog.product.price.ProductPrice> objectClass,private JpaRepository<com.salesmanager.core.model.catalog.product.price.ProductPrice,java.lang.Long> repository