class CustomerAttributeServiceImpl extends
		SalesManagerEntityServiceImpl<Long, CustomerAttribute> implements CustomerAttributeService {
	
	private CustomerAttributeRepository customerAttributeRepository;

	@Inject
	public CustomerAttributeServiceImpl(CustomerAttributeRepository customerAttributeRepository) {
		super(customerAttributeRepository);
		this.customerAttributeRepository = customerAttributeRepository;
	}
	




	@Override
	public void saveOrUpdate(CustomerAttribute customerAttribute)
			throws ServiceException {

			customerAttributeRepository.save(customerAttribute);

		
	}
	
	@Override
	public void delete(CustomerAttribute attribute) throws ServiceException {<FILL_FUNCTION_BODY>}
	


	@Override
	public CustomerAttribute getByCustomerOptionId(MerchantStore store, Long customerId, Long id) {
		return customerAttributeRepository.findByOptionId(store.getId(), customerId, id);
	}



	@Override
	public List<CustomerAttribute> getByCustomer(MerchantStore store, Customer customer) {
		return customerAttributeRepository.findByCustomerId(store.getId(), customer.getId());
	}


	@Override
	public List<CustomerAttribute> getByCustomerOptionValueId(MerchantStore store,
			Long id) {
		return customerAttributeRepository.findByOptionValueId(store.getId(), id);
	}
	
	@Override
	public List<CustomerAttribute> getByOptionId(MerchantStore store,
			Long id) {
		return customerAttributeRepository.findByOptionId(store.getId(), id);
	}

}

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