2  * Copyright © 2016-2017 European Support Limited
 
   4  * Licensed under the Apache License, Version 2.0 (the "License");
 
   5  * you may not use this file except in compliance with the License.
 
   6  * You may obtain a copy of the License at
 
   8  *     http://www.apache.org/licenses/LICENSE-2.0
 
  10  * Unless required by applicable law or agreed to in writing, software
 
  11  * distributed under the License is distributed on an "AS IS" BASIS,
 
  12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  13  * See the License for the specific language governing permissions and
 
  14  * limitations under the License.
 
  17 package org.openecomp.core.zusammen.plugin.dao.types;
 
  19 import com.amdocs.zusammen.datatypes.Id;
 
  21 import java.util.Date;
 
  24  * Synchronization state of an entity:
 
  26  * <li>On private entity edit (create/update/delete): marked as dirty</li>
 
  27  * <li>On entity publication:
 
  29  * <li>if the private entity exists - updated with the publish time, marked as not dirty</li>
 
  30  * <li>Otherwise - deleted</li>
 
  35 public class SynchronizationStateEntity {
 
  37   private Id revisionId;
 
  38   private Date publishTime;
 
  39   private boolean dirty;
 
  41   private String message;
 
  43   public SynchronizationStateEntity(Id id,Id revisionId) {
 
  45     this.revisionId = revisionId;
 
  48   public SynchronizationStateEntity(Id id,Id revisionId, Date publishTime, boolean dirty) {
 
  50     this.publishTime = publishTime;
 
  58   public Date getPublishTime() {
 
  62   public void setPublishTime(Date publishTime) {
 
  63     this.publishTime = publishTime;
 
  66   public boolean isDirty() {
 
  70   public void setDirty(boolean dirty) {
 
  74   public Id getRevisionId() {
 
  78   public void setRevisionId(Id revisionId) {
 
  79     this.revisionId = revisionId;
 
  82   public String getUser() {
 
  86   public void setUser(String user) {
 
  90   public String getMessage() {
 
  94   public void setMessage(String message) {
 
  95     this.message = message;
 
  99   public boolean equals(Object o) {
 
 103     if (o == null || getClass() != o.getClass()) {
 
 107     SynchronizationStateEntity that = (SynchronizationStateEntity) o;
 
 109     return id.equals(that.id);
 
 113   public int hashCode() {
 
 114     return id.hashCode();