Class InternalChangeQuery
- java.lang.Object
-
- com.google.gerrit.index.query.InternalQuery<ChangeData>
-
- com.google.gerrit.server.query.change.InternalChangeQuery
-
public class InternalChangeQuery extends InternalQuery<ChangeData>
Query wrapper for the change index.Instances are one-time-use. Other singleton classes should inject a Provider rather than holding on to a single instance.
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.index.query.InternalQuery
indexConfig
-
-
Method Summary
-
Methods inherited from class com.google.gerrit.index.query.InternalQuery
query, query, schema
-
-
-
-
Method Detail
-
setLimit
public InternalChangeQuery setLimit(int n)
- Overrides:
setLimit
in classInternalQuery<ChangeData>
-
enforceVisibility
public InternalChangeQuery enforceVisibility(boolean enforce)
- Overrides:
enforceVisibility
in classInternalQuery<ChangeData>
-
setRequestedFields
@SafeVarargs public final InternalChangeQuery setRequestedFields(FieldDef<ChangeData,?>... fields)
- Overrides:
setRequestedFields
in classInternalQuery<ChangeData>
-
noFields
public InternalChangeQuery noFields()
- Overrides:
noFields
in classInternalQuery<ChangeData>
-
byKey
public List<ChangeData> byKey(Change.Key key) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byKeyPrefix
public List<ChangeData> byKeyPrefix(String prefix) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byLegacyChangeId
public List<ChangeData> byLegacyChangeId(Change.Id id) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byLegacyChangeIds
public List<ChangeData> byLegacyChangeIds(Collection<Change.Id> ids) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchKey
public List<ChangeData> byBranchKey(Branch.NameKey branch, Change.Key key) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchKeyOpen
public List<ChangeData> byBranchKeyOpen(Project.NameKey project, String branch, Change.Key key) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchKeyOpenPred
public static Predicate<ChangeData> byBranchKeyOpenPred(Project.NameKey project, String branch, Change.Key key)
-
byProject
public List<ChangeData> byProject(Project.NameKey project) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchOpen
public List<ChangeData> byBranchOpen(Branch.NameKey branch) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchNew
public List<ChangeData> byBranchNew(Branch.NameKey branch) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byCommitsOnBranchNotMerged
public Iterable<ChangeData> byCommitsOnBranchNotMerged(org.eclipse.jgit.lib.Repository repo, ReviewDb db, Branch.NameKey branch, Collection<String> hashes) throws com.google.gwtorm.server.OrmException, IOException
- Throws:
com.google.gwtorm.server.OrmException
IOException
-
byProjectOpen
public List<ChangeData> byProjectOpen(Project.NameKey project) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byTopicOpen
public List<ChangeData> byTopicOpen(String topic) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byCommit
public List<ChangeData> byCommit(org.eclipse.jgit.lib.ObjectId id) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byCommit
public List<ChangeData> byCommit(String hash) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byProjectCommit
public List<ChangeData> byProjectCommit(Project.NameKey project, org.eclipse.jgit.lib.ObjectId id) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byProjectCommit
public List<ChangeData> byProjectCommit(Project.NameKey project, String hash) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byProjectCommits
public List<ChangeData> byProjectCommits(Project.NameKey project, List<String> hashes) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchCommit
public List<ChangeData> byBranchCommit(String project, String branch, String hash) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchCommit
public List<ChangeData> byBranchCommit(Branch.NameKey branch, String hash) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchCommitOpen
public List<ChangeData> byBranchCommitOpen(String project, String branch, String hash) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byBranchCommitOpenPred
public static Predicate<ChangeData> byBranchCommitOpenPred(Project.NameKey project, String branch, String hash)
-
bySubmissionId
public List<ChangeData> bySubmissionId(String cs) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
byProjectGroups
public static List<ChangeData> byProjectGroups(com.google.inject.Provider<InternalChangeQuery> queryProvider, IndexConfig indexConfig, Project.NameKey project, Collection<String> groups) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
-