package com.realnet.DataLake.Repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.realnet.DataLake.Entity.BatchData;

@Repository
public interface BatchDataRepository extends JpaRepository<BatchData, Integer> {

	@Query(value = "select * from batch_data where  created_by=?1", nativeQuery = true)
	List<BatchData> findAll(Long creayedBy);

	@Query(value = "select * from batch_data where  created_by=?1", nativeQuery = true)
	Page<BatchData> findAll(Long creayedBy, Pageable page);

	@Query(value = "select * from batch_data", nativeQuery = true)
	List<BatchData> findByDatalake_id(Integer datalake_id);
}