ChangeField: Use constants from ChangeQueryBuilder for field names
Add missing constants to ChangeQueryBuilder as necessary. Remove a few existing constants that are no longer used anywhere. Change-Id: I049274de8b40b2093050d5fe784927a5e0a3b712
This commit is contained in:
@@ -81,7 +81,7 @@ public class ChangeField {
|
||||
|
||||
/** Newer style Change-Id key. */
|
||||
public static final FieldDef<ChangeData, String> ID =
|
||||
new FieldDef.Single<ChangeData, String>("change_id",
|
||||
new FieldDef.Single<ChangeData, String>(ChangeQueryBuilder.FIELD_CHANGE_ID,
|
||||
FieldType.PREFIX, false) {
|
||||
@Override
|
||||
public String get(ChangeData input, FillArgs args)
|
||||
@@ -179,7 +179,7 @@ public class ChangeField {
|
||||
/** Submission id assigned by MergeOp. */
|
||||
public static final FieldDef<ChangeData, String> SUBMISSIONID =
|
||||
new FieldDef.Single<ChangeData, String>(
|
||||
"submissionid", FieldType.EXACT, false) {
|
||||
ChangeQueryBuilder.FIELD_SUBMISSIONID, FieldType.EXACT, false) {
|
||||
@Override
|
||||
public String get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
@@ -210,7 +210,7 @@ public class ChangeField {
|
||||
public static final FieldDef<ChangeData, Iterable<String>> PATH =
|
||||
new FieldDef.Repeatable<ChangeData, String>(
|
||||
// Named for backwards compatibility.
|
||||
"file", FieldType.EXACT, false) {
|
||||
ChangeQueryBuilder.FIELD_FILE, FieldType.EXACT, false) {
|
||||
@Override
|
||||
public Iterable<String> get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
@@ -237,7 +237,7 @@ public class ChangeField {
|
||||
/** Hashtags tied to a change */
|
||||
public static final FieldDef<ChangeData, Iterable<String>> HASHTAG =
|
||||
new FieldDef.Repeatable<ChangeData, String>(
|
||||
"hashtag", FieldType.EXACT, false) {
|
||||
ChangeQueryBuilder.FIELD_HASHTAG, FieldType.EXACT, false) {
|
||||
@Override
|
||||
public Iterable<String> get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
@@ -271,7 +271,7 @@ public class ChangeField {
|
||||
/** Components of each file path modified in the current patch set. */
|
||||
public static final FieldDef<ChangeData, Iterable<String>> FILE_PART =
|
||||
new FieldDef.Repeatable<ChangeData, String>(
|
||||
"filepart", FieldType.EXACT, false) {
|
||||
ChangeQueryBuilder.FIELD_FILEPART, FieldType.EXACT, false) {
|
||||
@Override
|
||||
public Iterable<String> get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
@@ -330,7 +330,7 @@ public class ChangeField {
|
||||
/** Commit ID of any patch set on the change, using exact match. */
|
||||
public static final FieldDef<ChangeData, Iterable<String>> EXACT_COMMIT =
|
||||
new FieldDef.Repeatable<ChangeData, String>(
|
||||
"exactcommit", FieldType.EXACT, false) {
|
||||
ChangeQueryBuilder.FIELD_EXACTCOMMIT, FieldType.EXACT, false) {
|
||||
@Override
|
||||
public Iterable<String> get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
@@ -522,7 +522,7 @@ public class ChangeField {
|
||||
/** Whether the change is mergeable. */
|
||||
public static final FieldDef<ChangeData, String> MERGEABLE =
|
||||
new FieldDef.Single<ChangeData, String>(
|
||||
"mergeable2", FieldType.EXACT, true) {
|
||||
ChangeQueryBuilder.FIELD_MERGEABLE, FieldType.EXACT, true) {
|
||||
@Override
|
||||
public String get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
@@ -648,7 +648,7 @@ public class ChangeField {
|
||||
/** Opaque group identifiers for this change's patch sets. */
|
||||
public static final FieldDef<ChangeData, Iterable<String>> GROUP =
|
||||
new FieldDef.Repeatable<ChangeData, String>(
|
||||
"group", FieldType.EXACT, false) {
|
||||
ChangeQueryBuilder.FIELD_GROUP, FieldType.EXACT, false) {
|
||||
@Override
|
||||
public Iterable<String> get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
|
||||
@@ -103,12 +103,11 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
// SearchSuggestOracle up to date.
|
||||
|
||||
public static final String FIELD_ADDED = "added";
|
||||
public static final String FIELD_AFTER = "after";
|
||||
public static final String FIELD_AGE = "age";
|
||||
public static final String FIELD_AUTHOR = "author";
|
||||
public static final String FIELD_BEFORE = "before";
|
||||
public static final String FIELD_BRANCH = "branch";
|
||||
public static final String FIELD_CHANGE = "change";
|
||||
public static final String FIELD_CHANGE_ID = "change_id";
|
||||
public static final String FIELD_COMMENT = "comment";
|
||||
public static final String FIELD_COMMENTBY = "commentby";
|
||||
public static final String FIELD_COMMIT = "commit";
|
||||
@@ -119,14 +118,15 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
public static final String FIELD_DESTINATION = "destination";
|
||||
public static final String FIELD_DRAFTBY = "draftby";
|
||||
public static final String FIELD_EDITBY = "editby";
|
||||
public static final String FIELD_EXACTCOMMIT = "exactcommit";
|
||||
public static final String FIELD_FILE = "file";
|
||||
public static final String FIELD_IS = "is";
|
||||
public static final String FIELD_HAS = "has";
|
||||
public static final String FIELD_FILEPART = "filepart";
|
||||
public static final String FIELD_GROUP = "group";
|
||||
public static final String FIELD_HASHTAG = "hashtag";
|
||||
public static final String FIELD_LABEL = "label";
|
||||
public static final String FIELD_LIMIT = "limit";
|
||||
public static final String FIELD_MERGE = "merge";
|
||||
public static final String FIELD_MERGEABLE = "mergeable";
|
||||
public static final String FIELD_MERGEABLE = "mergeable2";
|
||||
public static final String FIELD_MESSAGE = "message";
|
||||
public static final String FIELD_OWNER = "owner";
|
||||
public static final String FIELD_OWNERIN = "ownerin";
|
||||
@@ -134,7 +134,6 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
public static final String FIELD_PATH = "path";
|
||||
public static final String FIELD_PROJECT = "project";
|
||||
public static final String FIELD_PROJECTS = "projects";
|
||||
public static final String FIELD_QUERY = "query";
|
||||
public static final String FIELD_REF = "ref";
|
||||
public static final String FIELD_REVIEWEDBY = "reviewedby";
|
||||
public static final String FIELD_REVIEWER = "reviewer";
|
||||
@@ -143,7 +142,7 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
public static final String FIELD_STARBY = "starby";
|
||||
public static final String FIELD_STARREDBY = "starredby";
|
||||
public static final String FIELD_STATUS = "status";
|
||||
public static final String FIELD_TOPIC = "topic";
|
||||
public static final String FIELD_SUBMISSIONID = "submissionid";
|
||||
public static final String FIELD_TR = "tr";
|
||||
public static final String FIELD_VISIBLETO = "visibleto";
|
||||
public static final String FIELD_WATCHEDBY = "watchedby";
|
||||
|
||||
Reference in New Issue
Block a user