Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

package gov.va.med.ars.dao.ars;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import gov.va.med.domain.ars.ClaimLevelRecordsDetail;

@Repository
public interface ClaimLevel277CARepository extends JpaRepository<ClaimLevelRecordsDetail, Long> {

/*
* @Query("select clrd from aClrd clrd JOIN FETCH clrd.lineLevelRecordsDetails where clrd.cstatStatus = 'PENDING' and clrd.hrecid = :hrecid"
* ) List<ClaimLevelRecordsDetail> findPendingCLMWithLines(@Param("hrecid")
* Long hrecid);
*
*/

@Query("select clrd from aClrd clrd JOIN FETCH clrd.lineLevelRecordsDetails where clrd.cstatStatus = 'PENDING' and clrd.headerRecordDetail.hrecid = :hrecid")
List<ClaimLevelRecordsDetail> findPendingCLMWithLines(@Param("hrecid") Long hrecid);

@Query("select clrd from aClrd clrd where clrd.cstatStatus = 'PENDING' and clrd.headerRecordDetail.hrecid = :hrecid")
List<ClaimLevelRecordsDetail> findPendingCLMWithoutLines(@Param("hrecid") Long hrecid);

@Transactional
@Modifying
@Query("update aClrd clrd set clrd.cstatStatus = :status where clrd.clrecid in (:clRecIdList)")
void updateStatus(@Param("clRecIdList") List<Long> clRecIdList, @Param("status") String status);

@Query("select c from aClrd c where c.clrecid = :clrecid")
ClaimLevelRecordsDetail getClaimDetail(@Param("clrecid") long clrecid);

}