
com.capitalone.dashboard.repository.CommitRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hygieia-common Show documentation
Show all versions of hygieia-common Show documentation
Core package shared by API layer and Microservices
The newest version!
package com.capitalone.dashboard.repository;
import com.capitalone.dashboard.model.Commit;
import org.bson.types.ObjectId;
import java.util.List;
/**
* Repository for {@link Commit} data.
*/
public interface CommitRepository extends QueryRepository {
/**
* Finds the {@link Commit} with the given revision number for a specific
* {@link com.capitalone.dashboard.model.CollectorItem}.
*
* @param collectorItemId collector item id
* @param revisionNumber revision number
* @return a {@link Commit}
*/
Commit findByCollectorItemIdAndScmRevisionNumber(ObjectId collectorItemId, String revisionNumber);
Long countCommitsByCollectorItemId(ObjectId collectorItemId);
Commit findByScmUrlIgnoreCaseAndScmBranchIgnoreCaseAndScmRevisionNumber (String scmUrl, String scmBranch, String scmRevisionNumber);
List findByScmRevisionNumber (String scmUrl);
List findByScmUrlIgnoreCaseAndScmBranch (String scmUrl, String scmBranch);
Commit findByScmRevisionNumberAndScmUrlIgnoreCaseAndScmBranchIgnoreCase(String scmRevisionNumber, String scmUrl, String branch);
List findAllByScmRevisionNumberAndScmUrlIgnoreCaseAndScmBranchIgnoreCaseOrderByTimestampAsc (String scmRevisionNumber, String scmUrl, String branch);
default List findByCollectorItemIdAndScmCommitTimestamp(ObjectId collectorItemId, Long scmCommitTimestampThreshold) {
return findAll("collectorItemId eq " + quote(collectorItemId.toHexString()) + " and scmCommitTimestamp gt " + scmCommitTimestampThreshold);
}
List findByScmUrlIgnoreCaseAndScmBranchIgnoreCaseAndScmCommitTimestampIsBetween(String scmUrl, String scmBranch, long beginDate, long endDate);
List findByCollectorItemIdAndScmCommitTimestampIsBetween(ObjectId collectorItemId, long beginDate, long endDate);
List findCommitsByCollectorItemIdAndTimestampAfterAndPullNumberIsNull(ObjectId collectorItemId, long beginDate);
Commit findByScmRevisionNumberAndScmAuthorIgnoreCaseAndScmCommitLogAndScmCommitTimestamp(String scmRevisionNumber, String scmAuthor, String scmCommitLog, long scmCommitTimestamp);
List findAllByScmRevisionNumberAndScmAuthorIgnoreCaseAndScmCommitLogAndScmCommitTimestamp(String scmRevisionNumber, String scmAuthor, String scmCommitLog, long scmCommitTimestamp);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy