Java 类org.springframework.data.repository.query.Param 实例源码

项目:iotplatform    文件:UserRepository.java   
@Query("SELECT u FROM UserEntity u WHERE u.tenantId = :tenantId " +
        "AND u.customerId = :customerId AND u.authority = :authority " +
        "AND LOWER(u.searchText) LIKE LOWER(CONCAT(:searchText, '%'))" +
        "AND u.id > :idOffset ORDER BY u.id")
List<UserEntity> findUsersByAuthority(@Param("tenantId") String tenantId,
                                      @Param("customerId") String customerId,
                                      @Param("idOffset") String idOffset,
                                      @Param("searchText") String searchText,
                                      @Param("authority") Authority authority,
                                      Pageable pageable);
项目:iotplatform    文件:RuleMetaDataRepository.java   
@Query("SELECT rmd FROM RuleMetaDataEntity rmd WHERE rmd.tenantId IN (:tenantId, :nullTenantId) " +
        "AND LOWER(rmd.searchText) LIKE LOWER(CONCAT(:textSearch, '%')) " +
        "AND rmd.id > :idOffset ORDER BY rmd.id")
List<RuleMetaDataEntity> findAllTenantRulesByTenantId(@Param("tenantId") String tenantId,
                                                      @Param("nullTenantId") String nullTenantId,
                                                      @Param("textSearch") String textSearch,
                                                      @Param("idOffset") String idOffset,
                                                      Pageable pageable);
项目:Auts_Assert_manager    文件:RouterItemModelJpaGerepository.java   
@Query(value = "SELECT routerItemModel FROM RouterItemModel routerItemModel WHERE routerItemModel.routerIp =:routerIp " +
                "AND routerItemModel.routerMac =:routerMac " +
                "AND routerItemModel.model =:model AND routerItemModel.romVersion =:romVersion")
public List<RouterItemModel> isExistsRouterModel(@Param("routerIp") String routerIp,
                                                 @Param("routerMac")String routerMac,
                                                 @Param("model")String model,
                                                 @Param("romVersion")String romVersion);
项目:OperatieBRP    文件:PartijRepository.java   
/**
 * Geeft de partijen terug die geldig zijn voor vrij bericht.
 * @param peildatum peildatum
 * @return de gevonden partijen
 */
@Query("select p from Partij p where p.datumIngang <= :peildatum and (p.datumEinde > :peildatum or p.datumEinde is null) "
        + "and p.datumIngangVrijBericht <= :peildatum and (p.datumEindeVrijBericht > :peildatum or p.datumEindeVrijBericht is null) "
        + "and p.datumOvergangNaarBrp <= :peildatum "
        + "and p.isActueelEnGeldig = true and p.isActueelEnGeldigVoorVrijBericht = true "
        + "and (p.isVrijBerichtGeblokkeerd = false or p.isVrijBerichtGeblokkeerd is null)"
        + "and p.afleverpuntVrijBericht is not null")
List<Partij> geldigeVrijBerichtPartijen(@Param("peildatum") Integer peildatum);
项目:iotplatform    文件:ComponentDescriptorRepository.java   
@Query("SELECT cd FROM ComponentDescriptorEntity cd WHERE cd.type = :type " +
        "AND cd.scope = :scope AND LOWER(cd.searchText) LIKE LOWER(CONCAT(:textSearch, '%')) " +
        "AND cd.id > :idOffset ORDER BY cd.id")
List<ComponentDescriptorEntity> findByScopeAndType(@Param("type") ComponentType type,
                                                   @Param("scope") ComponentScope scope,
                                                   @Param("textSearch") String textSearch,
                                                   @Param("idOffset") String idOffset,
                                                   Pageable pageable);
项目:esup-ecandidat    文件:FormationRepository.java   
@Query("select fo.idForm, ty.codTypAvis, td.temValidTypeDecCand, count(1)" + " from TypeDecisionCandidature td"
        + " join td.candidature ca" + " join ca.formation fo" + " join fo.commission co"
        + " join co.centreCandidature ce" + " join ca.candidat cand" + " join cand.compteMinima cpt"
        + " join td.typeDecision t" + " join t.typeAvis ty"
        + " where ce.idCtrCand = :idCtrCand and cpt.campagne.idCamp = :idcamp" + " and ca.datAnnulCand is null"
        + " and td.idTypeDecCand in (select max(td2.idTypeDecCand) from TypeDecisionCandidature td2 where ca.idCand = td2.candidature.idCand)"
        + " group by fo.idForm, ty.codTypAvis, td.temValidTypeDecCand")
List<Object[]> findStatNbCandidatureByAvis(@Param("idCtrCand") Integer idCtrCand, @Param("idcamp") Integer idcamp);
项目:iotplatform    文件:DeviceRepository.java   
@Query("SELECT d FROM DeviceEntity d WHERE d.tenantId = :tenantId " +
        "AND LOWER(d.searchText) LIKE LOWER(CONCAT(:textSearch, '%')) " +
        "AND d.id > :idOffset ORDER BY d.id")
List<DeviceEntity> findByTenantId(@Param("tenantId") String tenantId,
                                  @Param("textSearch") String textSearch,
                                  @Param("idOffset") String idOffset,
                                  Pageable pageable);
项目:iotplatform    文件:PluginMetaDataRepository.java   
@Query("SELECT pmd FROM PluginMetaDataEntity pmd WHERE pmd.tenantId IN (:tenantId, :nullTenantId) " +
        "AND LOWER(pmd.searchText) LIKE LOWER(CONCAT(:textSearch, '%')) " +
        "AND pmd.id > :idOffset ORDER BY pmd.id")
List<PluginMetaDataEntity> findAllTenantPluginsByTenantId(@Param("tenantId") String tenantId,
                                                          @Param("nullTenantId") String nullTenantId,
                                                          @Param("textSearch") String textSearch,
                                                          @Param("idOffset") String idOffset,
                                                          Pageable pageable);
项目:iotplatform    文件:AssetRepository.java   
@Query("SELECT a FROM AssetEntity a WHERE a.tenantId = :tenantId " +
        "AND a.customerId = :customerId AND a.type = :type " +
        "AND LOWER(a.searchText) LIKE LOWER(CONCAT(:textSearch, '%')) " +
        "AND a.id > :idOffset ORDER BY a.id")
List<AssetEntity> findByTenantIdAndCustomerIdAndType(@Param("tenantId") String tenantId,
                                                     @Param("customerId") String customerId,
                                                     @Param("type") String type,
                                                     @Param("textSearch") String textSearch,
                                                     @Param("idOffset") String idOffset,
                                                     Pageable pageable);
项目:C4SG-Obsolete    文件:UserDAO.java   
@Query(FIND_BY_ID_QUERY)
List<User> findByUserProjectId(@Param("projId") Integer projId);
项目:ensembl-elastic-rest-final    文件:ReleaseJPARepository.java   
@Query(value = "select * from `release` where release_id = :releaseId", nativeQuery = true)
public ReleaseJPA findByReleaseId(@Param("releaseId") Integer releaseId);
项目:IPPR2016    文件:EventLogRepository.java   
@Query(value = "SELECT * FROM event_log AS log WHERE log.process_model_id = :processModelId AND log.resource = :subject AND EXISTS((SELECT 1 from event_log AS x " +
        "WHERE x.case_id = log.case_id AND x.activity = 'Process Start' AND x.message_type = '' AND x.resource = '' AND x.state = '')) " +
        "AND EXISTS((SELECT 1 from event_log AS y WHERE y.case_id = log.case_id AND y.activity = 'Process End' AND y.message_type = '' AND y.resource = '' AND y.state = ''))" +
        "ORDER BY log.case_id, log.event_id", nativeQuery = true)
public List<EventLogEntry> getEventLogForProcessModelAndSubject(@Param("processModelId") int processModelId, @Param("subject") String subject);
项目:food-ordering-system    文件:menuItemRepository.java   
@RestResource(rel = "byRestaurantId")
List<MenuItem> findAllByRestaurantId(@Param("restaurantId") String restaurantId);
项目:devops-cstack    文件:ModuleDAO.java   
@Query("Select m from Module m " + "left join fetch m.image " + "where m.containerID=:containerID")
Module findByContainerID(@Param("containerID") String id) throws DataAccessException;
项目:wormboard-backend    文件:ZwbAggregateCharRepository.java   
@Query("SELECT zwbAggregateChar"
       + " FROM ZwbAggregateCharJPA zwbAggregateChar"
       + " WHERE date >= :dateBegin AND date <= :dateEnd")
List<ZwbAggregateCharJPA> findBetweenDates(@Param("dateBegin") Long dateBegin, @Param("dateEnd") Long dateEnd);
项目:spring-cloud-skipper    文件:ReleaseRepository.java   
@Transactional(readOnly = true)
@RestResource(exported = false)
List<Release> findByNameIgnoreCaseContaining(@Param("name") String name);
项目:dispatcher    文件:TestCaseRepository.java   
@Query(nativeQuery = true)
List<TestCase> findByProblemId(@Param("problem_id") Long problemId);
项目:c4sg-services    文件:ProjectDAO.java   
@Query(FIND_BY_KEYWORD_JOB_SKILL)
List<Project> findByKeywordAndJobAndSkill(@Param("keyWord") String keyWord, @Param("jobTitles") List<Integer> jobTitles, @Param("skills") List<Integer> skills, @Param("status") String status, @Param("remote") String remote);
项目:spring-data-jdbc-template    文件:AnimalRepository.java   
@Query("SELECT * FROM " + Animal.TABLE_NAME + " WHERE status = :status")
List<Animal> getByStatus(@Param("status") Status status);
项目:spring-cloud-skipper    文件:PackageMetadataRepository.java   
@RestResource(exported = false)
PackageMetadata findByRepositoryNameAndNameAndVersion(@Param("repositoryName") String repositoryName,
        @Param("name") String name,
        @Param("version") String version);
项目:Auts_Assert_manager    文件:RouterGuestOrderModelJpaGerepository.java   
@Query(value = "SELECT curOrder FROM GuestOrder curOrder WHERE (curOrder.status = 0) AND curOrder.guestId =:guestId AND curOrder.orderId =:orderId")
public GuestOrder findValidByGuestIdAndOrderId(@Param("guestId") long guestId, @Param("orderId") String orderId);
项目:c4sg-services    文件:OrganizationDAO.java   
@Query(FIND_BY_CRITERIA_AND_COUNTRIES)
Page<Organization> findByCriteriaAndCountries(@Param("keyword") String keyWord, @Param("countries") List<String> countries,@Param("open") Boolean open
        , @Param("status") String status, @Param("categories") List<String> categories,Pageable pageable);
项目:IPPR2016    文件:RBACRepositoryImpl.java   
@Query(value = "SELECT * FROM ROLE WHERE SYSTEM_ID = :systemId", nativeQuery = true)
RoleImpl findBySystemId(@Param("systemId") String systemId);
项目:Auts_Assert_manager    文件:RouterWhiteListModelJpaGerepository.java   
@Query(value = "SELECT rwlm FROM RouterWhiteListModel rwlm WHERE rwlm.host =:host")
public List<RouterWhiteListModel> findByHost(@Param("host") String host);
项目:pathological-reports    文件:RecoverPasswordRepository.java   
@Modifying(clearAutomatically = true)
@Query(value = "DELETE FROM recover_password WHERE date_requested < (:date_requested);", nativeQuery = true)
void deleteByDateRequested(@Param("date_requested") Date dateRequested);
项目:IPPR2016    文件:ProcessInstanceRepository.java   
@Query(value = "SELECT p FROM PROCESS_INSTANCE p WHERE p.state = :state", nativeQuery = false)
Page<ProcessInstanceImpl> getProcessesInfoOfState(Pageable pageable,
    @Param("state") ProcessInstanceState state);
项目:devops-cstack    文件:ServerDAO.java   
@Query("Select distinct s " + "from Server s " + "left join fetch s.image " + "where s.containerID=:id")
Server findByContainerID(@Param("id") String id) throws DataAccessException;
项目:food-ordering-system    文件:PaymentRepository.java   
@RestResource(rel = "by-id", description = @Description("find payment by id"))
Payment findPaymentById(@Param("id") String id);
项目:devops-cstack    文件:VolumeDAO.java   
@Query("Select v from Volume v where v.name=:name")
Volume findByName(@Param("name") String name) throws DataAccessException;
项目:c4sg-services    文件:ProjectDAO.java   
@Query(FIND_BY_KEYWORD_JOB)
List<Project> findByKeywordAndJob(@Param("keyWord") String keyWord, @Param("jobTitles") List<Integer> jobTitles, @Param("status") String status, @Param("remote") String remote);
项目:IPPR2016    文件:ProcessInstanceRepository.java   
@Query(
    value = "select count(p) from PROCESS_INSTANCE p JOIN p.subjects s where p.endTime between :start and :end and p.state = 'FINISHED' and s.userId = :user",
    nativeQuery = false)
Long getAmountOfFinishedProcessesBetweenRangeForUser(@Param("start") LocalDateTime start,
    @Param("end") LocalDateTime end, @Param("user") Long userId);
项目:devops-cstack    文件:ServerDAO.java   
@Query("Select distinct s " + "from Server s " + "left join fetch s.image left join fetch s.application a left join fetch a.user " + "where s.name=:name")
Server findByName(@Param("name") String name) throws DataAccessException;
项目:PepSIIrup-2017    文件:EventRepository.java   
@Query("select e From Event e where e.dateStart > :dateStart ORDER BY e.dateStart ASC")
List<Event> getUpcommingEvents(@Param("dateStart") Date dateStart, Pageable pageable);
项目:devops-cstack    文件:ModuleDAO.java   
@Query("Select m from Module m " +
        "left join fetch m.image " +
        "left join fetch m.application " +
        "left join fetch m.ports "
        + "where m.id=:id ")
Module findById(@Param("id") Long id) throws DataAccessException;
项目:Food_Ordering_System    文件:PaymentRepository.java   
@RestResource(rel = "by-id", description = @Description("find payment by id"))
Payment findPaymentById(@Param("id") String id);
项目:ingest-core    文件:ProjectRepository.java   
@RestResource(path = "findByUser", rel = "findByUser")
Page<Project> findByUser(@Param(value = "user") String user, Pageable pageable);
项目:JuniperBotJ    文件:MemberBioRepository.java   
@Query("SELECT r FROM MemberBio r WHERE r.member = (SELECT m FROM LocalMember m WHERE m.guildId = :guildId AND m.user.userId = :userId)")
MemberBio findByGuildIdAndUserId(@Param("guildId") String guildId, @Param("userId") String userId);
项目:NutriBuddi    文件:EatsRepository.java   
@Query("SELECT e FROM Eats e, Food f, User u WHERE f.id = e.food AND u.id = e.user AND u.email = :email AND e.transactionDate between convert(:startDate, datetime) and convert(:endDate, datetime)")
List<Eats> findBetweenDateRangeAndEmail(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("email") String email);
项目:c4sg-services    文件:OrganizationDAO.java   
@Query(FIND_BY_CRITERIA_AND_COUNTRIES)
List<Organization> findByCriteriaAndCountries(@Param("keyword") String keyWord, @Param("countries") List<String> countries,@Param("open") Boolean open
        , @Param("status") String status, @Param("categories") List<String> categories);
项目:devops-cstack    文件:ImageDAO.java   
@Query("select i from Image i where i.imageType=:imageType")
List<Image> findAllEnabledImagesByType(@Param("imageType") String imageType)
    throws DataAccessException;