Unit Tests
[sdc.git] / openecomp-be / lib / openecomp-core-lib / openecomp-zusammen-lib / openecomp-zusammen-plugin / src / main / java / org / openecomp / core / zusammen / plugin / dao / types / StageEntity.java
1 package org.openecomp.core.zusammen.plugin.dao.types;
2
3 import com.amdocs.zusammen.datatypes.item.Action;
4
5 import java.util.Collections;
6 import java.util.Date;
7 import java.util.Set;
8
9 public class StageEntity<E> {
10   private E entity;
11   private Date publishTime;
12   private Action action = Action.IGNORE;
13   private boolean conflicted;
14   private Set<E> conflictDependents = Collections.emptySet();
15
16   // used by sync on stage creation
17   public StageEntity(E entity, Date publishTime) {
18     this.entity = entity;
19     this.publishTime = publishTime;
20   }
21
22   public StageEntity(E entity, Date publishTime, Action action, boolean conflicted) {
23     this.entity = entity;
24     this.publishTime = publishTime;
25     this.action = action;
26     this.conflicted = conflicted;
27   }
28
29   public E getEntity() {
30     return entity;
31   }
32
33   public Date getPublishTime() {
34     return publishTime;
35   }
36
37   public Action getAction() {
38     return action;
39   }
40
41   public void setAction(Action action) {
42     this.action = action;
43   }
44
45   public boolean isConflicted() {
46     return conflicted;
47   }
48
49   public void setConflicted(boolean conflicted) {
50     this.conflicted = conflicted;
51   }
52
53   public Set<E> getConflictDependents() {
54     return conflictDependents;
55   }
56
57   public void setConflictDependents(Set<E> conflictDependents) {
58     this.conflictDependents = conflictDependents;
59   }
60 }