Java 类org.springframework.data.jpa.repository.QueryHints 实例源码

项目:gazpachoquest    文件:QuestionRepository.java   
@Query("select q from Question q where q.id in :questionIds")
@QueryHints(value = { @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH_TYPE, value = "IN"),
        @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH, value = "q.questionOptions"),
        @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH, value = "q.subquestions"),
        @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH, value = "q.translations"),
        @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH, value = "questionOptions.translations"),
        @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH, value = "subquestions.translations"),
        @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH, value = "subquestions.questionOptions"), }, forCounting = false)
List<Question> findInList(@Param("questionIds")
List<Integer> questionIds);
项目:dpCms    文件:DictionaryRepository.java   
@QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value ="true") })
public List<Dictionary> findByType(int type);
项目:iris    文件:RouteDataRevisionRepository.java   
@QueryHints(value = @QueryHint(name = HINT_FETCH_SIZE, value = "1"))
@Query("SELECT r FROM RouteDataRevision r WHERE validFrom <= :date AND (validTo >= :date OR validTo IS NULL)")
Stream<RouteDataRevision> findValid(@Param("date") Date date);
项目:Spring-Data-JPA-Demo    文件:CountryRepository.java   
@QueryHints(value = { @QueryHint (name = "org.hibernate.cacheable", value = "true")})
List<Country> findByPopulationGreaterThan(Integer population);
项目:score    文件:RunningExecutionPlanRepository.java   
@Query("from RunningExecutionPlan r where r.flowUUID = :flowUUID")
@QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value ="true") })
public List<RunningExecutionPlan> findByUuidCached(@Param("flowUUID") String flowUUID);
项目:samplegwt    文件:PersonRepository.java   
@QueryHints(value = { @QueryHint(name = "org.hibernate.readOnly", value = "true")})
Person findById(Long id);