All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mosip.pmp.authdevice.repository.DeviceDetailRepository Maven / Gradle / Ivy

package io.mosip.pmp.authdevice.repository;

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

import io.mosip.pmp.authdevice.entity.DeviceDetail;
@Repository
public interface DeviceDetailRepository extends JpaRepository{
	
	@Query(value ="select * FROM device_detail  where  make=?1 AND model=?2 AND dprovider_id=?3 AND dstype_code=?4 AND dtype_code=?5 AND (is_deleted is null OR is_deleted = false) AND is_active = true",nativeQuery = true)
	DeviceDetail findByDeviceDetail( String make, String model, String deviceProviderId, String deviceSubTypeCode,
			String deviceTypeCode);
	@Query("FROM DeviceDetail d where d.id = ?1 AND (d.isDeleted is null or d.isDeleted = false)")
	DeviceDetail findByIdAndIsDeletedFalseOrIsDeletedIsNull(String id);
	
	@Query("FROM DeviceDetail d where d.id = ?1 AND (d.isDeleted is null or d.isDeleted = false) AND d.isActive=true ")
	DeviceDetail findByIdAndIsDeletedFalseOrIsDeletedIsNullAndIsActiveTrue(String id);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy