public interface

InsightReportDao

com.atlassian.bitbucket.internal.codeinsights.dao.InsightReportDao
Known Indirect Subclasses

Summary

Public Methods
@Nonnull InternalInsightReport create(SetInsightReportParameters request)
Create a new insight report with the provided details.
void delete(InternalInsightReport report)
Delete the insight report with the provided details.
int deleteById(Long... reportIds)
Delete reports with the ids passed in.
@Nonnull Page<InternalInsightReport> find(int repositoryId, String commitId, PageRequest pageRequest)
Find reports matching the passed in request.
@Nonnull Page<InternalInsightReport> findCreatedBefore(Date date, PageRequest pageRequest)
Find reports that are older than the given date.
@Nonnull Page<InternalInsightReport> findForRepository(int repoId, PageRequest pageRequest)
Find reports that are reported against a given repository
@Nullable InternalInsightReport get(int repositoryId, String commitId, String key)
Get a single report.
boolean reportExists(int repositoryId, String commitId, String key)
Return whether a report exists or not for a given commit
@Nonnull InternalInsightReport update(InternalInsightReport report, SetInsightReportParameters request)
Update an existing insight report with the provided details.

Public Methods

@Nonnull public InternalInsightReport create (SetInsightReportParameters request)

Create a new insight report with the provided details.

Parameters
request a request describing the report to create
Returns
  • the created report

public void delete (InternalInsightReport report)

Delete the insight report with the provided details.

Parameters
report the insight report to delete

public int deleteById (Long... reportIds)

Delete reports with the ids passed in.

Parameters
reportIds ids of reports to delete
Returns
  • the number of deleted reports

@Nonnull public Page<InternalInsightReport> find (int repositoryId, String commitId, PageRequest pageRequest)

Find reports matching the passed in request.

Parameters
repositoryId Id of repository to search reports in
commitId commit id to retrieve reports for
pageRequest a page request specifying the start and limit of the page
Returns

@Nonnull public Page<InternalInsightReport> findCreatedBefore (Date date, PageRequest pageRequest)

Find reports that are older than the given date.

Parameters
date reports created earlier than this date will be returned
pageRequest page request
Returns

@Nonnull public Page<InternalInsightReport> findForRepository (int repoId, PageRequest pageRequest)

Find reports that are reported against a given repository

Parameters
repoId reports created on this repository will be returned
pageRequest page request
Returns

@Nullable public InternalInsightReport get (int repositoryId, String commitId, String key)

Get a single report.

Parameters
repositoryId Id of repository to search the report in
commitId commit id to retrieve report for
key unique identifier for the report.
Returns
  • The report if it exists

public boolean reportExists (int repositoryId, String commitId, String key)

Return whether a report exists or not for a given commit

Parameters
repositoryId Id of repository to search the report in
commitId commit id to retrieve report for
key unique identifier for the report.

@Nonnull public InternalInsightReport update (InternalInsightReport report, SetInsightReportParameters request)

Update an existing insight report with the provided details.

Parameters
report the insight report to update
request a request describing how to update the report
Returns
  • the updated report