org.springframework.data.mongodb.repository.Query Java Examples

The following examples show how to use org.springframework.data.mongodb.repository.Query. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CloudInstanceRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value = "{accountNumber : ?0}")
Collection<CloudInstance> findByAccountNumber(String accountNumber);
 
Example #2
Source File: CloudVirtualNetworkRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value= "{ tags: ?0 }")
Collection<CloudVirtualNetwork> findByTags(List<NameValue> tags);
 
Example #3
Source File: EventRepository.java    From ic with MIT License 4 votes vote down vote up
@Query("{_hidden: {$ne: true}, _dummy: {$ne: true}, id: {$gt: ?0}}")
List<Event> consumeEvent(Long id, Pageable pageable);
 
Example #4
Source File: VastRepository.java    From ExecDashboard with Apache License 2.0 4 votes vote down vote up
@Query(value = "{ 'updatedTimeStamp' : {$ne : ?0} }")
List<Vast> getOldVastDetails(Long timeStamp);
 
Example #5
Source File: RecipientRepository.java    From piggymetrics with MIT License 4 votes vote down vote up
@Query("{ $and: [ {'scheduledNotifications.REMIND.active': true }, { $where: 'this.scheduledNotifications.REMIND.lastNotified < " +
		"new Date(new Date().setDate(new Date().getDate() - this.scheduledNotifications.REMIND.frequency ))' }] }")
@CatAnnotation
List<Recipient> findReadyForRemind();
 
Example #6
Source File: CollectorItemRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{'options.applicationName' : ?1, 'collectorId' : ?0}")
List<CollectorItem> findByOptionsAndDeployedApplicationName(ObjectId collectorId, String applicationName);
 
Example #7
Source File: JobRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{ 'collectorId' : ?0, options.instanceUrl : ?1, options.jobName : ?2}")
T findJob(ObjectId collectorId, String instanceUrl, String jobName);
 
Example #8
Source File: BinaryArtifactRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query("{ 'collectorItemId': ?0, 'artifactGroupId' : ?1, 'artifactModule' : ?2, 'artifactVersion' : ?3, 'artifactName' : ?4, 'artifactClassifier' : ?5, 'artifactExtension' : ?6 }")
Iterable<BinaryArtifact> findByAttributes(Object collectorItemId, String artifactGroupId, String artifactModule, String artifactVersion, String artifactName, String artifactClassifier, String artifactExtension);
 
Example #9
Source File: BinaryArtifactRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query("{ 'artifactGroupId' : ?0, 'artifactModule' : ?1, 'artifactVersion' : ?2, 'artifactName' : ?3, 'artifactClassifier' : ?4, 'artifactExtension' : ?5 }")
Iterable<BinaryArtifact> findByAttributes(String artifactGroupId, String artifactModule, String artifactVersion, String artifactName, String artifactClassifier, String artifactExtension);
 
Example #10
Source File: BookSpringDataMongoRxRepository.java    From Hands-On-Reactive-Programming-in-Spring-5 with MIT License 4 votes vote down vote up
@Query("{ 'authors.1': { $exists: true } }")
Flux<Book> booksWithFewAuthors();
 
Example #11
Source File: DashboardRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{'application.components.$id': {$in : ?0 }}")
List<Dashboard> findByApplicationComponentIdsIn(Collection<ObjectId> componentIds);
 
Example #12
Source File: PortfolioResponseRepository.java    From ExecDashboard with Apache License 2.0 4 votes vote down vote up
@Query(value = "{'eid': {'$in' : ?0 }}")
List<PortfolioResponse> getByEids(List<String> eids);
 
Example #13
Source File: ComponentRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value = "{'collectorItems.SCM._id': ?0}")
List<Component> findBySCMCollectorItemId(ObjectId scmCollectorItemId);
 
Example #14
Source File: RallyFeatureRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{'projectId' : ?0, options.iterationId : ?1}")
RallyFeature findByRallyWidgetDetails(String projectId,String iterationId);
 
Example #15
Source File: TeamRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value = "{ 'collectorId' : ?0 }")
List<Team> findByCollectorId(ObjectId collectorId);
 
Example #16
Source File: EventRepository.java    From ic with MIT License 4 votes vote down vote up
@Query("{id: {$gt: ?0}}")
List<Event> findGreaterThanId(Long id, Sort sort);
 
Example #17
Source File: StashDetailsInfoRepository.java    From ExecDashboard with Apache License 2.0 4 votes vote down vote up
@Query(value = " {'appId' : ?0, 'isUnlimitedData' : ?1}")
StashDetailsInfo checkByAppIdAndIsUnlimitedData(String appId, boolean isUnlimitedData);
 
Example #18
Source File: IncidentRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value = "{'severity' : {$in : ?0}, 'openTime' : {$gt : ?1, $lt : ?2}}", count = true)
long countIncidentsBySeverityAndOpenTimeBetween (String[] severityValues, long startDate, long endDate);
 
Example #19
Source File: ExecutiveSummaryListRepository.java    From ExecDashboard with Apache License 2.0 4 votes vote down vote up
@Query(value = " {'eid' : {$in : ?0 }}")
List<ExecutiveSummaryList> getEids(List<String> reportings);
 
Example #20
Source File: FeatureRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value = " {'sNumber' : ?0 }")
List<Feature> getStoryByNumber(String sNumber);
 
Example #21
Source File: CommitRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{ 'collectorItemId': ?0, 'scmCommitTimestamp': { $gt: ?1 }}")
List<Commit> findByCollectorItemIdAndScmCommitTimestamp(ObjectId collectorItemid, Long scmCommitTimestampThreshold);
 
Example #22
Source File: IncidentRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value = "{'severity' : {$in : ?0}, 'openTime' : {$gt : ?1, $lt : ?2}}")
Page<Incident> findIncidentsBySeverityAndOpenTimeBetween (String[] severityValues, long startDate, long endDate, Pageable pageable);
 
Example #23
Source File: CollectorItemRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{'options.projectId' : ?0}")
CollectorItem findByJiraProjectId(String projectId);
 
Example #24
Source File: DashboardRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{'type': {$in : [null, 'Team']}}")
List<Dashboard> findTeamDashboards();
 
Example #25
Source File: StashDashboardInfoRepository.java    From ExecDashboard with Apache License 2.0 4 votes vote down vote up
@Query(value = " {'appId' : ?0}")
StashDashboardInfo checkByAppId(String appId);
 
Example #26
Source File: StashDashboardInfoRepository.java    From ExecDashboard with Apache License 2.0 4 votes vote down vote up
@Query(value = " {'appId' : ?0, 'isUnlimitedData' : ?1}")
StashDashboardInfo checkByAppIdAndIsUnlimitedData(String appId, boolean isUnlimitedData);
 
Example #27
Source File: TeamInventoryRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value = "{ 'collectorId' : ?0 }")
List<TeamInventory> findByCollectorId(ObjectId collectorId);
 
Example #28
Source File: CollectorItemRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{'options.projectId' : ?2, 'niceName' : ?1, 'collectorId' : ?0}")
CollectorItem findByCollectorIdNiceNameAndProjectId(ObjectId collectorId, String niceName, String projectId);
 
Example #29
Source File: CloudVirtualNetworkRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value = "{ collectorItemId:  ?0 }")
CloudVirtualNetwork findByCollectorItemId(ObjectId collectorItemId);
 
Example #30
Source File: CollectorItemRepository.java    From hygieia-core with Apache License 2.0 4 votes vote down vote up
@Query(value="{ 'collectorId': { $in: ?0 }, ?1 : {$regex : '.*?2.*', $options: 'i'}}")
Page<CollectorItem> findByCollectorIdAndSearchField(List<ObjectId> collectorId, String searchField, String searchFieldValue, Pageable pageable);