class ProductVariantGroupServiceImpl extends SalesManagerEntityServiceImpl<Long, ProductVariantGroup> implements ProductVariantGroupService {

	
	@Autowired
	private PageableProductVariantGroupRepository pageableProductVariantGroupRepository;
	
	private ProductVariantGroupRepository productVariantGroupRepository;
	
	public ProductVariantGroupServiceImpl(ProductVariantGroupRepository repository) {
		super(repository);
		this.productVariantGroupRepository = repository;
	}

	@Override
	public Optional<ProductVariantGroup> getById(Long id, MerchantStore store) {
		return  productVariantGroupRepository.findOne(id, store.getCode());

	}

	@Override
	public Optional<ProductVariantGroup> getByProductVariant(Long productVariantId, MerchantStore store,
			Language language) {
		return productVariantGroupRepository.finByProductVariant(productVariantId, store.getCode());
	}

	@Override
	public ProductVariantGroup saveOrUpdate(ProductVariantGroup entity) throws ServiceException {
		
		entity = productVariantGroupRepository.save(entity);
		return entity;
		
	}

	@Override
	public Page<ProductVariantGroup> getByProductId(MerchantStore store, Long productId, Language language, int page,
			int count) {<FILL_FUNCTION_BODY>}


}

		
		Pageable pageRequest = PageRequest.of(page, count);
		return pageableProductVariantGroupRepository.findByProductId(store.getId(), productId, pageRequest);
	
<methods>public void <init>(JpaRepository<com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup,java.lang.Long>) ,public java.lang.Long count() ,public void create(com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup) throws com.salesmanager.core.business.exception.ServiceException,public void delete(com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup) throws com.salesmanager.core.business.exception.ServiceException,public void flush() ,public com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup getById(java.lang.Long) ,public List<com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup> list() ,public void save(com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup) throws com.salesmanager.core.business.exception.ServiceException,public void saveAll(Iterable<com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup>) throws com.salesmanager.core.business.exception.ServiceException,public void update(com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup) throws com.salesmanager.core.business.exception.ServiceException<variables>private Class<com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup> objectClass,private JpaRepository<com.salesmanager.core.model.catalog.product.variant.ProductVariantGroup,java.lang.Long> repository