package com.kamco.cd.training.postgres.repository.dataset;

import com.kamco.cd.training.dataset.dto.DatasetObjDto.DatasetClass;
import com.kamco.cd.training.dataset.dto.DatasetObjDto.DatasetObjRegDto;
import com.kamco.cd.training.dataset.dto.DatasetObjDto.SearchReq;
import com.kamco.cd.training.postgres.entity.DatasetObjEntity;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import org.springframework.data.domain.Page;

public interface DatasetObjRepositoryCustom {

  Optional<DatasetObjEntity> findByUuid(UUID id);

  Page<DatasetObjEntity> searchDatasetObjectList(SearchReq searchReq);

  List<DatasetClass> findDatasetObjClassByUuid(UUID uuid, String type);

  void insertDatasetObj(DatasetObjRegDto objRegDto);

  String getFilePathByUUIDPathType(UUID uuid, String pathType);

  void insertDatasetTestObj(DatasetObjRegDto objRegDto);

  void insertDatasetValObj(DatasetObjRegDto objRegDto);

  /**
   * 데이터셋 등록 실패시 Obj 데이터 정리
   *
   * @param datasetUid
   * @return
   */
  int deleteAllDatasetObj(Long datasetUid);
}
