package com.eactive.eai.rms.onl.transaction.apim.repository;

import java.util.Optional;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo;
import com.eactive.eai.data.jpa.BaseRepository;


public interface StandardMessageInfoRepositoryForApi extends BaseRepository<StandardMessageInfo, String> {
    Optional<StandardMessageInfo> findByEaisvcname(String eaiSvcName);

//    @Modifying
//    @Query("DELETE FROM StandardMessageInfo s WHERE s.eaisvcname = :eaiSvcName")
//    void deleteByEaisvcname(@Param("eaiSvcName") String eaiSvcName);
    
    boolean existsByApifullpathAndEaisvcnameNot(String fullPath, String eaiServiceName);
}
