1 /* Copyright (c) 2019 AT&T Intellectual Property. #
\r
3 # Licensed under the Apache License, Version 2.0 (the "License"); #
\r
4 # you may not use this file except in compliance with the License. #
\r
5 # You may obtain a copy of the License at #
\r
7 # http://www.apache.org/licenses/LICENSE-2.0 #
\r
9 # Unless required by applicable law or agreed to in writing, software #
\r
10 # distributed under the License is distributed on an "AS IS" BASIS, #
\r
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
\r
12 # See the License for the specific language governing permissions and #
\r
13 # limitations under the License. #
\r
14 ##############################################################################*/
\r
17 package org.oran.otf.common.model.historic;
\r
19 import org.oran.otf.common.model.TestInstance;
\r
20 import org.oran.otf.common.model.local.ParallelFlowInput;
\r
21 import org.oran.otf.common.utility.gson.Convert;
\r
22 import java.io.Serializable;
\r
23 import java.util.Date;
\r
24 import java.util.HashMap;
\r
25 import java.util.Map;
\r
26 import org.bson.types.ObjectId;
\r
27 import org.springframework.data.annotation.Id;
\r
29 public class TestInstanceHistoric implements Serializable {
\r
31 private static final long serialVersionUID = 1L;
\r
35 private String testInstanceName;
\r
36 private String testInstanceDescription;
\r
37 private ObjectId groupId;
\r
38 private ObjectId testDefinitionId;
\r
39 private String processDefinitionId;
\r
40 private Map<String, ParallelFlowInput> pfloInput;
\r
41 private Map<String, Object> simulationVthInput;
\r
42 private Map<String, Object> testData;
\r
43 private Map<String, Object> vthInput;
\r
44 private Date createdAt;
\r
45 private Date updatedAt;
\r
46 private ObjectId createdBy;
\r
47 private ObjectId updatedBy;
\r
48 private boolean simulationMode;
\r
50 public TestInstanceHistoric() {
\r
53 public TestInstanceHistoric(TestInstance testInstance) {
\r
54 this._id = testInstance.get_id();
\r
55 this.testInstanceName = testInstance.getTestInstanceName();
\r
56 this.testInstanceDescription = testInstance.getTestInstanceDescription();
\r
57 this.groupId = testInstance.getGroupId();
\r
58 this.testDefinitionId = testInstance.getTestDefinitionId();
\r
59 this.pfloInput = testInstance.getPfloInput();
\r
60 this.processDefinitionId = testInstance.getProcessDefinitionId();
\r
61 this.simulationVthInput = testInstance.getSimulationVthInput();
\r
62 this.testData = testInstance.getTestData();
\r
63 this.vthInput = testInstance.getVthInput();
\r
64 this.createdAt = testInstance.getCreatedAt();
\r
65 this.updatedAt = testInstance.getUpdatedAt();
\r
66 this.createdBy = testInstance.getCreatedBy();
\r
67 this.updatedBy = testInstance.getUpdatedBy();
\r
68 this.simulationMode = testInstance.isSimulationMode();
\r
71 public TestInstanceHistoric(
\r
73 String testInstanceName,
\r
74 String testInstanceDescription,
\r
76 ObjectId testDefinitionId,
\r
77 String processDefinitionId,
\r
78 HashMap<String, ParallelFlowInput> pfloInput,
\r
79 HashMap<String, Object> simulationVthInput,
\r
80 HashMap<String, Object> testData,
\r
81 HashMap<String, Object> vthInput,
\r
86 boolean simulationMode) {
\r
88 this.testInstanceName = testInstanceName;
\r
89 this.testInstanceDescription = testInstanceDescription;
\r
90 this.groupId = groupId;
\r
91 this.testDefinitionId = testDefinitionId;
\r
92 this.processDefinitionId = processDefinitionId;
\r
93 this.pfloInput = pfloInput;
\r
94 this.simulationVthInput = simulationVthInput;
\r
95 this.testData = testData;
\r
96 this.vthInput = vthInput;
\r
97 this.createdAt = createdAt;
\r
98 this.updatedAt = updatedAt;
\r
99 this.createdBy = createdBy;
\r
100 this.updatedBy = updatedBy;
\r
101 this.simulationMode = simulationMode;
\r
104 public static long getSerialVersionUID() {
\r
105 return serialVersionUID;
\r
108 public ObjectId get_id() {
\r
112 public void set_id(ObjectId _id) {
\r
116 public String getTestInstanceName() {
\r
117 return testInstanceName;
\r
120 public void setTestInstanceName(String testInstanceName) {
\r
121 this.testInstanceName = testInstanceName;
\r
124 public String getTestInstanceDescription() {
\r
125 return testInstanceDescription;
\r
128 public void setTestInstanceDescription(String testInstanceDescription) {
\r
129 this.testInstanceDescription = testInstanceDescription;
\r
132 public ObjectId getGroupId() {
\r
136 public void setGroupId(ObjectId groupId) {
\r
137 this.groupId = groupId;
\r
140 public ObjectId getTestDefinitionId() {
\r
141 return testDefinitionId;
\r
144 public void setTestDefinitionId(ObjectId testDefinitionId) {
\r
145 this.testDefinitionId = testDefinitionId;
\r
148 public String getProcessDefinitionId() {
\r
149 return processDefinitionId;
\r
152 public void setProcessDefinitionId(String processDefinitionId) {
\r
153 this.processDefinitionId = processDefinitionId;
\r
156 public Map<String, ParallelFlowInput> getPfloInput() {
\r
160 public void setPfloInput(
\r
161 HashMap<String, ParallelFlowInput> pfloInput) {
\r
162 this.pfloInput = pfloInput;
\r
165 public Map<String, Object> getSimulationVthInput() {
\r
166 return simulationVthInput;
\r
169 public void setSimulationVthInput(
\r
170 HashMap<String, Object> simulationVthInput) {
\r
171 this.simulationVthInput = simulationVthInput;
\r
174 public Map<String, Object> getTestData() {
\r
178 public void setTestData(HashMap<String, Object> testData) {
\r
179 this.testData = testData;
\r
182 public Map<String, Object> getVthInput() {
\r
186 public void setVthInput(HashMap<String, Object> vthInput) {
\r
187 this.vthInput = vthInput;
\r
190 public Date getCreatedAt() {
\r
194 public void setCreatedAt(Date createdAt) {
\r
195 this.createdAt = createdAt;
\r
198 public Date getUpdatedAt() {
\r
202 public void setUpdatedAt(Date updatedAt) {
\r
203 this.updatedAt = updatedAt;
\r
206 public ObjectId getCreatedBy() {
\r
210 public void setCreatedBy(ObjectId createdBy) {
\r
211 this.createdBy = createdBy;
\r
214 public ObjectId getUpdatedBy() {
\r
218 public void setUpdatedBy(ObjectId updatedBy) {
\r
219 this.updatedBy = updatedBy;
\r
222 public boolean isSimulationMode() {
\r
223 return simulationMode;
\r
226 public void setSimulationMode(boolean simulationMode) {
\r
227 this.simulationMode = simulationMode;
\r
231 public String toString() {
\r
232 return Convert.objectToJson(this);
\r