com.capitalone.dashboard.repository.WhiteSourceComponentRepository Maven / Gradle / Ivy
package com.capitalone.dashboard.repository;
import com.capitalone.dashboard.model.CollectorItem;
import com.capitalone.dashboard.model.WhiteSourceComponent;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.Query;
import java.util.List;
public interface WhiteSourceComponentRepository extends BaseCollectorItemRepository {
@Query(value="{ 'collectorId' : ?0, enabled: true}")
List findEnabledComponents(ObjectId collectorId);
@Query("{'options.orgName' : ?0, 'options.projectToken' : ?1}")
List findByOrgNameAndProjectToken(String orgName, String projectToken);
@Query("{'options.projectToken' : ?0}")
List findByProjectToken(String projectToken);
@Query(value="{'collectorId': ?0, 'options.projectToken': ?1}")
List findByCollectorIdAndProjectToken(ObjectId collectorId, String projectToken);
@Query(value="{'collectorId': ?0, 'altIdentifier': ?1}")
List findByCollectorIdAndAltIdentifier(ObjectId collectorId, String altIdentifier);
}