diff options
Diffstat (limited to 'src/main/java/org/onap/nbi/apis/serviceorder/model')
3 files changed, 30 insertions, 80 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ExecutionTask.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ExecutionTask.java index 1aeab20..9fd0505 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ExecutionTask.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ExecutionTask.java @@ -1,17 +1,14 @@ /** - * Copyright (c) 2018 Orange + * Copyright (c) 2018 Orange * - * 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 + * 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 + * 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. + * 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 org.onap.nbi.apis.serviceorder.model.orchestrator; @@ -21,7 +18,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import javax.persistence.OneToOne; +import javax.persistence.Lob; @Entity public class ExecutionTask { @@ -39,14 +36,14 @@ public class ExecutionTask { private Date lastAttemptDate; - @OneToOne - private ServiceOrderInfoJson serviceOrderInfoJson; + @Lob + private String serviceOrderInfoJson; - public ServiceOrderInfoJson getServiceOrderInfoJson() { + public String getServiceOrderInfoJson() { return serviceOrderInfoJson; } - public void setServiceOrderInfoJson(ServiceOrderInfoJson serviceOrderInfoJson) { + public void setServiceOrderInfoJson(String serviceOrderInfoJson) { this.serviceOrderInfoJson = serviceOrderInfoJson; } @@ -93,15 +90,17 @@ public class ExecutionTask { @Override public boolean equals(Object o) { - if (this == o) + if (this == o) { return true; - if (o == null || getClass() != o.getClass()) + } + if (o == null || getClass() != o.getClass()) { return false; + } ExecutionTask that = (ExecutionTask) o; return nbRetries == that.nbRetries && Objects.equals(internalId, that.internalId) - && Objects.equals(orderItemId, that.orderItemId) && Objects.equals(reliedTasks, that.reliedTasks) - && Objects.equals(lastAttemptDate, that.lastAttemptDate) - && Objects.equals(serviceOrderInfoJson, that.serviceOrderInfoJson); + && Objects.equals(orderItemId, that.orderItemId) && Objects.equals(reliedTasks, that.reliedTasks) + && Objects.equals(lastAttemptDate, that.lastAttemptDate) + && Objects.equals(serviceOrderInfoJson, that.serviceOrderInfoJson); } @Override diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java index b873cdc..fd0eed5 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java @@ -25,9 +25,18 @@ public class ServiceOrderInfo { private boolean useServiceOrderCustomer; private SubscriberInfo subscriberInfo; private Map<String, ServiceOrderItemInfo> serviceOrderItemInfos = new HashMap<>(); - private boolean allItemsInAdd; + private boolean allItemsInAdd= true; private boolean allItemsCompleted; - private boolean serviceOrderRejected; + private boolean serviceOrderRejected= false; + private String serviceOrderId; + + public String getServiceOrderId() { + return serviceOrderId; + } + + public void setServiceOrderId(String serviceOrderId) { + this.serviceOrderId = serviceOrderId; + } public boolean isAllItemsInAdd() { return allItemsInAdd; diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfoJson.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfoJson.java deleted file mode 100644 index cb22040..0000000 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfoJson.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2018 Orange - * - * 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 org.onap.nbi.apis.serviceorder.model.orchestrator; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; - -@Entity -public class ServiceOrderInfoJson { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long internalId; - - private String serviceOrderId; - - @Lob - private String serviceOrderInfoJson; - - public ServiceOrderInfoJson() {} - - public ServiceOrderInfoJson(String serviceOrderId, String serviceOrderInfoJson) { - this.serviceOrderId = serviceOrderId; - this.serviceOrderInfoJson = serviceOrderInfoJson; - } - - public String getServiceOrderId() { - return serviceOrderId; - } - - public void setServiceOrderId(String serviceOrderId) { - this.serviceOrderId = serviceOrderId; - } - - public String getServiceOrderInfoJson() { - return serviceOrderInfoJson; - } - - public void setServiceOrderInfoJson(String serviceOrderInfoJson) { - this.serviceOrderInfoJson = serviceOrderInfoJson; - } -} |