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

io.mosip.kernel.masterdata.repository.MachineSpecificationRepository Maven / Gradle / Ivy

There is a newer version: 1.2.1.0
Show newest version
package io.mosip.kernel.masterdata.repository;

import java.util.List;

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

import io.mosip.kernel.core.dataaccess.spi.repository.BaseRepository;
import io.mosip.kernel.masterdata.entity.MachineSpecification;

/**
 * Repository to perform CRUD operations on MachineSpecification.
 * 
 * @author Megha Tanga
 * @since 1.0.0
 *
 */

@Repository
public interface MachineSpecificationRepository extends BaseRepository {

	@Query("FROM MachineSpecification m where m.id = ?1 and m.langCode = ?2 and (m.isDeleted is null or m.isDeleted = false)")
	MachineSpecification findByIdAndLangCodeIsDeletedFalseorIsDeletedIsNull(String id, String langCode);

	@Query("FROM MachineSpecification m where m.id = ?1 and (m.isDeleted is null or m.isDeleted = false) and m.isActive = true")
	List findByIdAndIsDeletedFalseorIsDeletedIsNull(String id);

	@Query("FROM MachineSpecification m where  (m.isDeleted is null or m.isDeleted = false) and m.isActive = true")
	List findAllMachineSpecByIsActiveAndIsDeletedIsNullOrFalse();

	@Query("FROM MachineSpecification WHERE id =?1 AND langCode=?2 ")
	MachineSpecification findMachineSpecificationByIDAndLangCode(String uniqueId, String primaryLang);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy