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

io.mosip.kernel.masterdata.repository.LanguageRepository 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.Language;

/**
 * Repository to perform CRUD operations on Language.
 * 
 * @author Bal Vikash Sharma
 * @since 1.0.0
 * @see Language
 * @see BaseRepository
 *
 */
@Repository
public interface LanguageRepository extends BaseRepository {

	/**
	 * This method provides all the languages having isActive is true
	 * and isDeleted is false present in MOSIP system.
	 * 
	 * @see Language
	 * @return list of language
	 */
	@Query("FROM Language where (isDeleted is null OR isDeleted = false) AND isActive = true")
	public List findAllByIsDeletedFalseOrIsDeletedIsNull();

	@Query("FROM Language l where l.code = ?1 and (l.isDeleted is null or l.isDeleted = false) AND isActive=true")
	public Language findLanguageByCode(String code);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy