FabricantIteService.java

package com.sintia.ffl.admin.optique.services.services;

import com.sintia.ffl.admin.optique.dal.repositories.catalogue.FabricantCatalogueIteRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FabricantIteService {
	
	@Autowired
	private FabricantCatalogueIteRepository fabricantRepository;
	
	public boolean exist(String cOptoCodeFabricant) {
		
		if (cOptoCodeFabricant == null) {
			return false;
		}
		return fabricantRepository.findBycOptoCodeFabricant(cOptoCodeFabricant).isPresent();
	}
	
}