Skip to main content
summaryrefslogtreecommitdiffstats
blob: 56c36c8afe37492ad183c3422bbdfef46b5ebafc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Copyright (C) 2008 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.gerrit.reviewdb;

import com.google.gwtorm.client.Column;
import com.google.gwtorm.client.StringKey;

import java.sql.Timestamp;

/** A message attached to a {@link Change}. */
public final class ChangeMessage {
  public static class Key extends StringKey<Change.Id> {
    private static final long serialVersionUID = 1L;

    @Column(id = 1)
    protected Change.Id changeId;

    @Column(id = 2, length = 40)
    protected String uuid;

    protected Key() {
      changeId = new Change.Id();
    }

    public Key(final Change.Id change, final String uuid) {
      this.changeId = change;
      this.uuid = uuid;
    }

    @Override
    public Change.Id getParentKey() {
      return changeId;
    }

    @Override
    public String get() {
      return uuid;
    }

    @Override
    protected void set(String newValue) {
      uuid = newValue;
    }
  }

  @Column(id = 1, name = Column.NONE)
  protected Key key;

  /** Who wrote this comment; null if it was written by the Gerrit system. */
  @Column(id = 2, name = "author_id", notNull = false)
  protected Account.Id author;

  /** When this comment was drafted. */
  @Column(id = 3)
  protected Timestamp writtenOn;

  /** The text left by the user. */
  @Column(id = 4, notNull = false, length = Integer.MAX_VALUE)
  protected String message;

  protected ChangeMessage() {
  }

  public ChangeMessage(final ChangeMessage.Key k, final Account.Id a) {
    this(k, a, new Timestamp(System.currentTimeMillis()));
  }

  public ChangeMessage(final ChangeMessage.Key k, final Account.Id a,
      final Timestamp wo) {
    key = k;
    author = a;
    writtenOn = wo;
  }

  public ChangeMessage.Key getKey() {
    return key;
  }

  /** If null, the message was written 'by the Gerrit system'. */
  public Account.Id getAuthor() {
    return author;
  }

  public void setAuthor(final Account.Id accountId) {
    if (author != null) {
      throw new IllegalStateException("Cannot modify author once assigned");
    }
    author = accountId;
  }

  public Timestamp getWrittenOn() {
    return writtenOn;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(final String s) {
    message = s;
  }
}

Back to the top

ation'>update location of ecf bundlesKim Moir13 years R3_6_1_maintenanceuse R3_6_1_maintenance_patches branchKim Moir14 years R3_6_1_maintenance_patches*** empty log message ***DJ Houghton13 years R3_6_api_cleanupTag for build against merged HEAD.Curtis Windatt14 years R3_6_maintenanceBackported fix for bug 251776: [Content Type] Need a better wayDani Megert12 years R3_6_maintenance_Java7Removed releng because it was moved to a separate repositoryMarkus Keller12 years R3_6_maintenance_patchesBackported fix for bug 111525: [Import/Export] Import file system doesn't in...Dani Megert13 years R3_7_maintenanceFixed bug 251776: [Content Type] Need a better way to arbitrate contentDani Megert12 years R3_8_maintenanceBug 403963 - Update Platform Releng/common parent versionPaul Webster11 years R4_10_maintenanceBug 542450: Broken links in Eclipse whatsNew documentLakshmi Shanmugam5 years R4_11_maintenanceJetty upgradeEclipse Releng Bot3 years R4_12_maintenanceForce Javadoc re-generation for 4.12 RC2Manoj Palat5 years R4_13_maintenanceBug 550498 - N&N for 4.13Lakshmi Shanmugam5 years R4_14_maintenanceBug 553342 - N&N for 4.14Lakshmi Shanmugam4 years R4_15_maintenanceJetty updateEclipse Releng Bot3 years R4_16_maintenanceBug 563904 - Force Javadoc re-generation for 4.16 RC2Mat Booth4 years R4_17_maintenanceBug 566580 - Force Javadoc re-generation for 4.17 RC2Eclipse Releng Bot4 years R4_18_maintenanceTouch documentation bundles for javadoc regenerationEclipse Releng Bot3 years R4_19_maintenanceBug 572510 - Create Working Set not a linkkitlo3 years R4_1_maintenanceIncreased bundle version to fix wrong tagDani Megert13 years R4_20_maintenanceTouch documentation bundles for javadoc regeneration for 4.20RC2aEclipse Releng Bot3 years R4_21_maintenanceTouch documentation bundles for javadoc regenerationEclipse Releng Bot3 years R4_22_maintenanceTouch documentation bundles for javadoc regenerationEclipse Releng Bot2 years R4_23_maintenanceTouch documentation bundles for javadoc regenerationEclipse Releng Bot2 years R4_2_maintenancebug 435328 - update buildDoc.xml for jdt.doc.isv bundleSteve Francisco10 years R4_3_maintenanceFixed bug 427076: Touch documentation plug-ins to regenerate examples, Javado...Dani Megert10 years R4_4_maintenanceFixed bug 458954: Touch ISV doc to force Javadoc regeneration for 4.4.2Dani Megert9 years R4_5_maintenanceIncreased bundle versions for ISV bundles (trigger doc generation)Dani Megert8 years R4_6_maintenanceForce Javadoc re-generation for Neon.3 RC3Markus Keller7 years R4_7_maintenanceJetty upgradeEclipse Releng Bot3 years R4_8_maintenanceJetty upgradeEclipse Releng Bot3 years R4_9_maintenanceBug 538766 - Platform porting guide for 4.9 is missing in the helpKalyan Prasad Tatavarthi6 years RC1_32_branch135107 [Help] Allow users to use .html/.htm file extension for XHTML contentCurtis D'Entremont18 years SSQ_build'new version v3554a'Felipe Heidrich15 years accessibility_work_R3_6This commit was manufactured by cvs2svn to create branchcvs2svn15 years branch34M6aThis commit was manufactured by cvs2svn to create branch 'branch34M6a'.cvs2svn16 years branch_I20101102-0800This commit was manufactured by cvs2svn to create branchcvs2svn14 years bug305747Bug 305747 - 3.4 legacy org.eclipse.equinox.p2.metadata.generator.EclipseGene...DJ Houghton14 years fri_I20080422-0800update sat4j to stable and non-deleted urlKim Moir16 years generic_variable_supportBug 36930 - Support variables in launch configurationsjburns21 years git_testsync with headKim Moir13 years git_test_37xBug 349460 - Git Migration: need proof that we can build 3.7.1 against GitKim Moir13 years icu481testTesting 3.7 build with com.ibm.icu_4.5.1.v20100830.jarPaul Webster14 years masterMigration to GithubSravan Kumar Lakkimsetti2 years p2integration*** empty log message ***Pascal Rapicault16 years perf_213*** empty log message ***Jerome Lanneluc19 years perf_30*** empty log message ***Sonia Dimitrov19 years perf_301*** empty log message ***Sonia Dimitrov19 years perf_31x*** empty log message ***Darin Wright18 years perf_32xBug 229782 - Performance tests for ICU Collatorkhorne15 years perf_33xBug 229782 - Performance tests for ICU Collatorkhorne15 years perf_34x Bug 285680 No perfs results for perf_34x baseline since 06/12Kim Moir15 years perf_35xContribution for perf_35 - Fix for 322325Satyam Kandula13 years perf_36xBackport patch for bug 343242: CodeCompletionPerformanceTest#testApplicationW...Deepak Azad13 years perf_37xdisable p2.discovery tests for perf 3.8 runKim Moir13 years pre_restructureThis commit was manufactured by cvs2svn to create branch 'pre_restructure'.cvs2svn21 years pwebster/R3_8_maintenanceBump pom versions.Thanh Ha12 years pwebster/R4_2_maintenanceBump pom versionsThanh Ha12 years pwebster/bug390982Bug 390982 - Build documentation in CBI buildThanh Ha12 years refs/remotes/origin/R3_7_maintenanceBug 364980 - org.eclipse.platform.doc.user ships different binarykmoir12 years releng_testBug 183958 Source lost due to Orbit migrationKim Moir17 years unlabeled-1.246.2.5.2perf_31 - Initial branch content based on v_570 (aka R3_1)Jerome Lanneluc19 years v20090820_e4mergerevert for test build for SzymonKim Moir15 years v33M4_patches*** empty log message ***Grant Gayed17 years v33M5aReverting M5a fixBoris Bokowski17 years