package at.procon.dip.clustering.repository;

import at.procon.dip.clustering.entity.EmbeddingClusterSet;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;

public interface EmbeddingClusterSetRepository extends JpaRepository<EmbeddingClusterSet, UUID> {
    Optional<EmbeddingClusterSet> findByCode(String code);

    boolean existsByCodeIgnoreCaseAndIdNot(String code, UUID id);

    boolean existsByCodeIgnoreCase(String code);

    List<EmbeddingClusterSet> findAllByActiveOrderByCodeAsc(boolean active);

    List<EmbeddingClusterSet> findAllByOrderByCodeAsc();
}
