@@ -0,0 +1,2311 @@
+// Copyright 2020 Google LLC%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A//     https://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0A%0Apackage com.google.graphgeckos.dashboard.datatypes;%0A%0Aimport org.springframework.cloud.gcp.data.datastore.core.mapping.Entity;%0Aimport org.springframework.cloud.gcp.data.datastore.core.mapping.Field;%0Aimport org.springframework.data.annotation.Id;%0A%0A/**%0A * This class encapsulates the information needed to retain the last revision index%0A * of a builder. Since builders do not compile all revisions sequentially, they maintain%0A * an internal index of compiled revisions, which differs on a builder by builder basis.%0A * Used as a Datastore entity inside DatastoreRepository.%0A */%0A@Entity(name = %22index%22)%0Apublic class BuilderIndex %7B%0A  @Id%0A  @Field(name = %22builderName%22)%0A  private String name;%0A%0A  @Field(name = %22timestamp%22)%0A  private int index;%0A%0A  /**%0A   * Used only by Spring GCP.%0A   */%0A  public BuilderIndex() %7B %7D%0A%0A  /**%0A   * Constructs the BuilderIndex instance to be stored inside GCD.%0A   */%0A  public BuilderIndex(String name, int index) %7B%0A    this.name = name;%0A    this.index = index;%0A  %7D%0A%0A  /**%0A   * @return the name of the builder.%0A   */%0A  public String getName() %7B%0A    return name;%0A  %7D%0A%0A  /**%0A   * @return the index of the builder.%0A   */%0A  public int getIndex() %7B%0A    return index;%0A  %7D%0A%0A  /**%0A   * @param name the new name of the builder%0A   */%0A  public void setName(String name) %7B%0A    this.name = name;%0A  %7D%0A%0A  /**%0A   * @param index the new index of the builder%0A   */%0A  public void setIndex(int index) %7B%0A    this.index = index;%0A  %7D%0A%0A  @Override%0A  public boolean equals(Object o) %7B%0A    if (o == null %7C%7C !(o instanceof BuilderIndex)) %7B%0A      return false;%0A    %7D%0A    %0A    if (o == this) %7B%0A      return true;%0A    %7D%0A%0A    BuildInfo other = (BuilderIndex) o;%0A    return this.name == other.name && this.index == other.index;%0A  %7D%0A%7D%0A

create builderindex