本文整理汇总了Java中org.springframework.data.mongodb.repository.Query类的典型用法代码示例。如果您正苦于以下问题:Java Query类的具体用法?Java Query怎么用?Java Query使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Query类属于org.springframework.data.mongodb.repository包,在下文中一共展示了Query类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Date
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query("{ $where : 'this.rcon_password == null || (this.last_rcon_date <= this.expire_date && this.expire_date <= new Date())' }")
List<GameServer> findByRconRefreshNeeded();
示例2: findAll
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query("{\"$or\":"
+ "["
+ "{\"name\" : {\"$regex\" : ?0, \"$options\": \"i\"}}, "
+ "{\"member.firstName\" : {\"$regex\" : ?0, \"$options\": \"i\"}}, "
+ "{\"member.lastName\" : {\"$regex\" : ?0, \"$options\": \"i\"}}, "
+ "{\"member.phone\" : {\"$regex\" : ?0, \"$options\": \"i\"}}, "
+ "{\"member.email\" : {\"$regex\" : ?0, \"$options\": \"i\"}}, "
+ "{\"job.headline\" : {\"$regex\" : ?0, \"$options\": \"i\"}}, "
+ "{\"club.$name\" : {\"$regex\" : ?0, \"$options\": \"i\"}}, "
+ "{\"member.mobile\" : {\"$regex\" : ?0, \"$options\": \"i\"}} "
+ "]"
+ "}")
public Page<User> findAll(String query, Pageable pageable);
示例3: findActiveUserStoriesByBoards
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{$or:[{sProjectName: {$in: ?0 }},{keywords:{$elemMatch:{$in: ?0 }}}], sSprintAssetState: 'ACTIVE'}")
List<Feature> findActiveUserStoriesByBoards(List<String> boards, Sort sort);
示例4: findCodeRepos
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{}", fields = "{codeRepos : 1, _id: 0}")
List<Dashboard> findCodeRepos();
示例5:
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{ viewId: {$in: ?0}, value: { $ne:0}}")
List<UserMetric> findAllByViewIdInWithNon0Values(List<String> ids);
示例6: findAllByCollectorId
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{ collectorId:?0, value: { $ne:0}}")
List<UserMetric> findAllByCollectorId(String collectorId);
示例7: findAllHistorical
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{timestamp: null}")
List<Review> findAllHistorical();
示例8: findHistoricalForApps
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{appname: {$in: ?0}, timestamp: null}")
List<Review> findHistoricalForApps(List<String> appname);
示例9: findByCommandAndExpirationDate
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query("{ $and: [ { 'command' : ?0 }, { 'expirationDate' : { $lt: ?1 } } ] }")
public List<ProvisionLog> findByCommandAndExpirationDate(String command, Date expirationDate);
示例10: findById
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query("{ '"+SLACKCHANNEL_FIELDS.ID+"': ?0}")
SlackChannel findById(String id);
示例11: findAll
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{}", fields = "{ '"+VISITOR_FIELDS.EMPLOYEE_ID+"' : 1 }")
List<Visitor> findAll(Sort sort);
示例12: findById
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query("{ '"+LOCATION_FIELDS.ID+"': ?0}")
Location findById(String id);
示例13: findByLocation
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{}", fields = "{ '"+LOCATION_FIELDS.LOCATION_NAME+"' : 1 }")
Location findByLocation(String locationId);
示例14: findOne
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query(value = "{}")
PropertyConfiguration findOne(Sort sort);
示例15: findById
import org.springframework.data.mongodb.repository.Query; //导入依赖的package包/类
@Query("{ '"+EMPLOYEE_FIELDS.ID+"': ?0}")
Employee findById(String id);