Remove separate label field from PatchSetApproval

This is now stored directly in the key.

Change-Id: I9c53e6a08fb4de17e8faa1153f85f5226a3a51fb
This commit is contained in:
Dave Borowitz 2013-03-22 17:18:21 -07:00
parent 3bfee432fc
commit 08e5e85aee
2 changed files with 2 additions and 10 deletions

View File

@ -137,9 +137,6 @@ public final class PatchSetApproval {
@Column(id = 5, length = 16, notNull = false)
protected String changeSortKey;
/** Label name copied from corresponding {@link ApprovalCategory}. */
protected String label;
protected PatchSetApproval() {
}
@ -200,15 +197,11 @@ public final class PatchSetApproval {
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
return getLabelId().get();
}
public boolean isSubmit() {
return LabelId.SUBMIT.get().equals(getLabelId().get());
return LabelId.SUBMIT.get().equals(getLabel());
}
@Override

View File

@ -108,7 +108,6 @@ public class LabelNormalizer {
private PatchSetApproval copy(PatchSetApproval src, ChangeControl ctl) {
PatchSetApproval dest = new PatchSetApproval(src.getPatchSetId(), src);
dest.cache(ctl.getChange());
dest.setLabel(src.getLabel());
return dest;
}