diff options
author | Rashmi Pujar <rashmi.pujar@bell.ca> | 2019-11-05 17:10:00 -0500 |
---|---|---|
committer | Rashmi Pujar <rashmi.pujar@bell.ca> | 2019-11-07 17:03:48 -0500 |
commit | 3d372e317bff5fe7e27296cab4ed76e759f86994 (patch) | |
tree | 2fef62b9ab7712dff5eea8a227589b7ccc670694 /models-interactions/model-impl/so/src/main/java | |
parent | d7fcb9802900c2ce2abacb4f7e01713cdd7ba663 (diff) |
Use lombok annotations for objects in models-interaction/models-impl module
Issue-ID: POLICY-1896
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I425afe25876cea91908391418582ef584e6fe6fc
Diffstat (limited to 'models-interactions/model-impl/so/src/main/java')
18 files changed, 80 insertions, 772 deletions
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java index e3139667c..7475c8ad4 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java @@ -21,106 +21,27 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoAsyncRequestStatus implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("correlator") private String correlator; - - @SerializedName("requestId") private String requestId; - - @SerializedName("instanceReferences") private SoInstanceReferences instanceReferences; - - @SerializedName("startTime") private LocalDateTime startTime; - - @SerializedName("finishTime") private LocalDateTime finishTime; - - @SerializedName("requestScope") private String requestScope; - - @SerializedName("requestType") private String requestType; - - @SerializedName("requestStatus") private SoRequestStatus requestStatus; public SoAsyncRequestStatus() { // required by author } - - public String getCorrelator() { - return correlator; - } - - - public LocalDateTime getFinishTime() { - return finishTime; - } - - public SoInstanceReferences getInstanceReferences() { - return instanceReferences; - } - - public String getRequestId() { - return requestId; - } - - public String getRequestScope() { - return requestScope; - } - - public SoRequestStatus getRequestStatus() { - return requestStatus; - } - - public String getRequestType() { - return requestType; - } - - public LocalDateTime getStartTime() { - return startTime; - } - - public void setCorrelator(String correlator) { - this.correlator = correlator; - } - - public void setFinishTime(LocalDateTime finishTime) { - this.finishTime = finishTime; - } - - public void setInstanceReferences(SoInstanceReferences instanceReferences) { - this.instanceReferences = instanceReferences; - } - - public void setRequestId(String requestId) { - this.requestId = requestId; - } - - public void setRequestScope(String requestScope) { - this.requestScope = requestScope; - } - - public void setRequestStatus(SoRequestStatus requestStatus) { - this.requestStatus = requestStatus; - } - - public void setRequestType(String requestType) { - this.requestType = requestType; - } - - public void setStartTime(LocalDateTime startTime) { - this.startTime = startTime; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java index 8e51bc7f4..a991e702b 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java @@ -21,38 +21,20 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoCloudConfiguration implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("lcpCloudRegionId") private String lcpCloudRegionId; - - @SerializedName("tenantId") private String tenantId; public SoCloudConfiguration() { //required by author } - - public String getLcpCloudRegionId() { - return lcpCloudRegionId; - } - - public String getTenantId() { - return tenantId; - } - - public void setLcpCloudRegionId(String lcpCloudRegionId) { - this.lcpCloudRegionId = lcpCloudRegionId; - } - - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java index 06415d56e..5d1b37365 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java @@ -21,38 +21,20 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoInstanceReferences implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("requestId") private String requestId; - - @SerializedName("instanceId") private String instanceId; public SoInstanceReferences() { - //requried by author - } - - public String getInstanceId() { - return instanceId; - } - - public String getRequestId() { - return requestId; + //required by author } - - public void setInstanceId(String instanceId) { - this.instanceId = instanceId; - } - - public void setRequestId(String requestId) { - this.requestId = requestId; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java index 06080faad..785f341c3 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java @@ -21,93 +21,25 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoModelInfo implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("modelType") private String modelType; - - @SerializedName("modelInvariantId") private String modelInvariantId; - - @SerializedName("modelVersionId") private String modelVersionId; - - @SerializedName("modelName") private String modelName; - - @SerializedName("modelVersion") private String modelVersion; - - @SerializedName("modelCustomizationName") private String modelCustomizationName; - - @SerializedName("modelCustomizationId") private String modelCustomizationId; public SoModelInfo() { //required by author } - - public String getModelCustomizationId() { - return modelCustomizationId; - } - - public String getModelCustomizationName() { - return modelCustomizationName; - } - - public String getModelInvariantId() { - return modelInvariantId; - } - - public String getModelName() { - return modelName; - } - - public String getModelType() { - return modelType; - } - - public String getModelVersion() { - return modelVersion; - } - - public String getModelVersionId() { - return modelVersionId; - } - - public void setModelCustomizationId(String modelCustomizationId) { - this.modelCustomizationId = modelCustomizationId; - } - - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - - public void setModelInvariantId(String modelInvariantId) { - this.modelInvariantId = modelInvariantId; - } - - public void setModelName(String modelName) { - this.modelName = modelName; - } - - public void setModelType(String modelType) { - this.modelType = modelType; - } - - public void setModelVersion(String modelVersion) { - this.modelVersion = modelVersion; - } - - public void setModelVersionId(String modelVersionId) { - this.modelVersionId = modelVersionId; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java index 69861fb28..173a6e03b 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java @@ -21,38 +21,20 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoPolicyExceptionHolder implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("messageId") private String messageId; - - @SerializedName("text") private String text; public SoPolicyExceptionHolder() { //required by author } - - public String getMessageId() { - return messageId; - } - - public String getText() { - return text; - } - - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - public void setText(String text) { - this.text = text; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java index 083e73805..044853f1f 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java @@ -21,51 +21,21 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRelatedInstance implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("instanceId") private String instanceId; - - @SerializedName("instanceName") private String instanceName; - - @SerializedName("modelInfo") private SoModelInfo modelInfo; public SoRelatedInstance() { //required by author } - - public String getInstanceId() { - return instanceId; - } - - - public String getInstanceName() { - return instanceName; - } - - public SoModelInfo getModelInfo() { - return modelInfo; - } - - public void setInstanceId(String instanceId) { - this.instanceId = instanceId; - } - - public void setInstanceName(String instanceName) { - this.instanceName = instanceName; - } - - - public void setModelInfo(SoModelInfo modelInfo) { - this.modelInfo = modelInfo; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java index bb8efa89f..8cfaf86b6 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java @@ -21,27 +21,18 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRelatedInstanceListElement implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - - @SerializedName("relatedInstance") private SoRelatedInstance relatedInstance; public SoRelatedInstanceListElement() { //required by author } - - public SoRelatedInstance getRelatedInstance() { - return relatedInstance; - } - - public void setRelatedInstance(SoRelatedInstance relatedInstance) { - this.relatedInstance = relatedInstance; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java index b33db457e..8e28cc33c 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java @@ -21,35 +21,24 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; import java.time.LocalDateTime; import java.util.UUID; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRequest implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("requestId") private UUID requestId; - - @SerializedName("startTime") private String startTime; - - @SerializedName("finishTime") private LocalDateTime finishTime; - - @SerializedName("requestScope") private String requestScope; - - @SerializedName("requestType") private String requestType; - - @SerializedName("requestDetails") private SoRequestDetails requestDetails; - - @SerializedName("requestStatus") private SoRequestStatus requestStatus; private transient SoOperationType operationType; @@ -57,68 +46,4 @@ public class SoRequest implements Serializable { public SoRequest() { // required by author } - - public LocalDateTime getFinishTime() { - return finishTime; - } - - public SoRequestDetails getRequestDetails() { - return requestDetails; - } - - public UUID getRequestId() { - return requestId; - } - - public String getRequestScope() { - return requestScope; - } - - public SoRequestStatus getRequestStatus() { - return requestStatus; - } - - public String getRequestType() { - return requestType; - } - - public String getStartTime() { - return startTime; - } - - public void setFinishTime(LocalDateTime finishTime) { - this.finishTime = finishTime; - } - - public void setRequestDetails(SoRequestDetails requestDetails) { - this.requestDetails = requestDetails; - } - - public void setRequestId(UUID requestId) { - this.requestId = requestId; - } - - public void setRequestScope(String requestScope) { - this.requestScope = requestScope; - } - - public void setRequestStatus(SoRequestStatus requestStatus) { - this.requestStatus = requestStatus; - } - - public void setRequestType(String requestType) { - this.requestType = requestType; - } - - public void setStartTime(String startTime) { - this.startTime = startTime; - } - - public SoOperationType getOperationType() { - return operationType; - } - - public void setOperationType(SoOperationType operationType) { - this.operationType = operationType; - } } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java index 2e94a66c4..3fa3332b3 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java @@ -21,40 +21,28 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; import java.util.LinkedList; import java.util.List; import java.util.Map; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRequestDetails implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("modelInfo") private SoModelInfo modelInfo; - - @SerializedName("cloudConfiguration") private SoCloudConfiguration cloudConfiguration; - - @SerializedName("requestInfo") private SoRequestInfo requestInfo; - - @SerializedName("subscriberInfo") private SoSubscriberInfo subscriberInfo; - - @SerializedName("relatedInstanceList") private List<SoRelatedInstanceListElement> relatedInstanceList = new LinkedList<>(); - - @SerializedName("requestParameters") private SoRequestParameters requestParameters; - - @SerializedName("configurationParameters") private List<Map<String, String>> configurationParameters = new LinkedList<>(); public SoRequestDetails() { - } /** @@ -126,41 +114,10 @@ public class SoRequestDetails implements Serializable { return false; } if (subscriberInfo == null) { - if (other.subscriberInfo != null) { - return false; - } - } else if (!subscriberInfo.equals(other.subscriberInfo)) { - return false; + return other.subscriberInfo == null; + } else { + return subscriberInfo.equals(other.subscriberInfo); } - return true; - } - - public SoCloudConfiguration getCloudConfiguration() { - return cloudConfiguration; - } - - public SoModelInfo getModelInfo() { - return modelInfo; - } - - public List<SoRelatedInstanceListElement> getRelatedInstanceList() { - return relatedInstanceList; - } - - public SoRequestInfo getRequestInfo() { - return requestInfo; - } - - public SoRequestParameters getRequestParameters() { - return requestParameters; - } - - public List<Map<String, String>> getConfigurationParameters() { - return configurationParameters; - } - - public SoSubscriberInfo getSubscriberInfo() { - return subscriberInfo; } @Override @@ -177,34 +134,6 @@ public class SoRequestDetails implements Serializable { return result; } - public void setCloudConfiguration(SoCloudConfiguration cloudConfiguration) { - this.cloudConfiguration = cloudConfiguration; - } - - public void setModelInfo(SoModelInfo modelInfo) { - this.modelInfo = modelInfo; - } - - public void setRequestInfo(SoRequestInfo requestInfo) { - this.requestInfo = requestInfo; - } - - public void setRequestParameters(SoRequestParameters requestParameters) { - this.requestParameters = requestParameters; - } - - public void setConfigurationParameters(List<Map<String, String>> configurationParameters) { - this.configurationParameters = configurationParameters; - } - - public void setSubscriberInfo(SoSubscriberInfo subscriberInfo) { - this.subscriberInfo = subscriberInfo; - } - - public void setRelatedInstanceList(List<SoRelatedInstanceListElement> relatedInstanceList) { - this.relatedInstanceList = relatedInstanceList; - } - @Override public String toString() { return "SORequestDetails [modelInfo=" + modelInfo + ", cloudConfiguration=" + cloudConfiguration diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java index 8b6e2169d..2f9f13589 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java @@ -21,38 +21,20 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRequestError implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("policyException") private SoPolicyExceptionHolder policyException; - - @SerializedName("serviceException") private SoServiceExceptionHolder serviceException; public SoRequestError() { // required by author } - - public SoPolicyExceptionHolder getPolicyException() { - return policyException; - } - - public SoServiceExceptionHolder getServiceException() { - return serviceException; - } - - public void setPolicyException(SoPolicyExceptionHolder policyException) { - this.policyException = policyException; - } - - public void setServiceException(SoServiceExceptionHolder serviceException) { - this.serviceException = serviceException; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java index 148e68097..b6a840c45 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java @@ -21,126 +21,28 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRequestInfo implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("instanceName") private String instanceName; - - @SerializedName("source") private String source; - - @SerializedName("productFamilyId") private String productFamilyId; - - @SerializedName("suppressRollback") private boolean suppressRollback; - - @SerializedName("billingAccountNumber") private String billingAccountNumber; - - @SerializedName("callbackUrl") private String callbackUrl; - - @SerializedName("correlator") private String correlator; - - @SerializedName("orderNumber") private String orderNumber; - - @SerializedName("orderVersion") private Integer orderVersion; - - @SerializedName("requestorId") private String requestorId; public SoRequestInfo() { // required by author } - - public String getBillingAccountNumber() { - return billingAccountNumber; - } - - public String getCallbackUrl() { - return callbackUrl; - } - - public String getCorrelator() { - return correlator; - } - - public String getInstanceName() { - return instanceName; - } - - public String getOrderNumber() { - return orderNumber; - } - - public Integer getOrderVersion() { - return orderVersion; - } - - public String getProductFamilyId() { - return productFamilyId; - } - - public String getRequestorId() { - return requestorId; - } - - public String getSource() { - return source; - } - - public boolean isSuppressRollback() { - return suppressRollback; - } - - public void setBillingAccountNumber(String billingAccountNumber) { - this.billingAccountNumber = billingAccountNumber; - } - - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public void setCorrelator(String correlator) { - this.correlator = correlator; - } - - public void setInstanceName(String instanceName) { - this.instanceName = instanceName; - } - - public void setOrderNumber(String orderNumber) { - this.orderNumber = orderNumber; - } - - public void setOrderVersion(Integer orderVersion) { - this.orderVersion = orderVersion; - } - - public void setProductFamilyId(String productFamilyId) { - this.productFamilyId = productFamilyId; - } - - public void setRequestorId(String requestorId) { - this.requestorId = requestorId; - } - - public void setSource(String source) { - this.source = source; - } - - public void setSuppressRollback(boolean suppressRollback) { - this.suppressRollback = suppressRollback; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java index 2db4e1a03..e9451e2ae 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java @@ -21,52 +21,24 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; import java.util.LinkedList; import java.util.List; import java.util.Map; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRequestParameters implements Serializable { private static final long serialVersionUID = -3283942659786236033L; - @SerializedName("subscriptionServiceType") private String subscriptionServiceType; - - @SerializedName("usePreload") private boolean usePreload; - - @SerializedName("userParams") private List<Map<String, String>> userParams = new LinkedList<>(); public SoRequestParameters() { // required by author } - - public String getSubscriptionServiceType() { - return subscriptionServiceType; - } - - public boolean isUsePreload() { - return usePreload; - } - - public List<Map<String, String>> getUserParams() { - return userParams; - } - - public void setSubscriptionServiceType(String subscriptionServiceType) { - this.subscriptionServiceType = subscriptionServiceType; - } - - public void setUsePreload(boolean usePreload) { - this.usePreload = usePreload; - } - - public void setUserParams(List<Map<String, String>> userParams) { - this.userParams = userParams; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java index 82372e57a..a1bdbdf62 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java @@ -21,34 +21,16 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRequestReferences implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("instanceId") private String instanceId; - - @SerializedName("requestId") private String requestId; - - public String getInstanceId() { - return instanceId; - } - - public String getRequestId() { - return requestId; - } - - public void setInstanceId(String instanceId) { - this.instanceId = instanceId; - } - - public void setRequestId(String requestId) { - this.requestId = requestId; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java index 4636a7502..8accc5d3d 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java @@ -21,60 +21,22 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoRequestStatus implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("percentProgress") private int percentProgress; - - @SerializedName("requestState") private String requestState; - - @SerializedName("timestamp") private String timestamp; - - @SerializedName("wasRolledBack") private boolean wasRolledBack; public SoRequestStatus() { //required by author } - - public int getPercentProgress() { - return percentProgress; - } - - public String getRequestState() { - return requestState; - } - - public String getTimestamp() { - return timestamp; - } - - public boolean isWasRolledBack() { - return wasRolledBack; - } - - public void setPercentProgress(int percentProgress) { - this.percentProgress = percentProgress; - } - - public void setRequestState(String requestState) { - this.requestState = requestState; - } - - public void setTimestamp(String timestamp) { - this.timestamp = timestamp; - } - - public void setWasRolledBack(boolean wasRolledBack) { - this.wasRolledBack = wasRolledBack; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java index 7d9a0a969..22079b515 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java @@ -21,59 +21,22 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoResponse implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("requestReferences") private SoRequestReferences requestReferences; - - @SerializedName("requestError") private SoRequestError requestError; - - @SerializedName("request") private SoRequest request; - private int httpResponseCode; public SoResponse() { // required by author } - - public int getHttpResponseCode() { - return httpResponseCode; - } - - public SoRequest getRequest() { - return request; - } - - public SoRequestError getRequestError() { - return requestError; - } - - public SoRequestReferences getRequestReferences() { - return requestReferences; - } - - public void setHttpResponseCode(int httpResponseCode) { - this.httpResponseCode = httpResponseCode; - } - - public void setRequest(SoRequest request) { - this.request = request; - } - - public void setRequestError(SoRequestError requestError) { - this.requestError = requestError; - } - - public void setRequestReferences(SoRequestReferences requestReferences) { - this.requestReferences = requestReferences; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java index 1ecba5f83..e4085feb0 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java @@ -24,7 +24,11 @@ package org.onap.policy.so; import com.google.gson.annotations.SerializedName; import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoResponseWrapper implements Serializable { private static final long serialVersionUID = 7673023687132889069L; @@ -55,27 +59,14 @@ public class SoResponseWrapper implements Serializable { if (other.soResponse != null) { return false; } - } - else if (!soResponse.equals(other.soResponse)) { + } else if (!soResponse.equals(other.soResponse)) { return false; } if (requestId == null) { - if (other.requestId != null) { - return false; - } + return other.requestId == null; + } else { + return requestId.equals(other.requestId); } - else if (!requestId.equals(other.requestId)) { - return false; - } - return true; - } - - public String getRequestId() { - return requestId; - } - - public SoResponse getSoResponse() { - return soResponse; } @Override @@ -87,14 +78,6 @@ public class SoResponseWrapper implements Serializable { return result; } - public void setRequestId(String requestId) { - this.requestId = requestId; - } - - public void setSoResponse(SoResponse response) { - soResponse = response; - } - @Override public String toString() { return "SOResponseWrapper [SOResponse=" + soResponse + ", RequestId=" + requestId + "]"; diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java index 12747d373..78390d7cb 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java @@ -21,47 +21,23 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; import java.util.LinkedList; import java.util.List; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoServiceExceptionHolder implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("messageId") private String messageId; - - @SerializedName("text") private String text; - - @SerializedName("variables") private List<String> variables = new LinkedList<>(); public SoServiceExceptionHolder() { // required by author } - - public String getMessageId() { - return messageId; - } - - public String getText() { - return text; - } - - public List<String> getVariables() { - return variables; - } - - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - public void setText(String text) { - this.text = text; - } - } diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java index 61bb900fa..2e85410c3 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java @@ -21,49 +21,21 @@ package org.onap.policy.so; -import com.google.gson.annotations.SerializedName; - import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class SoSubscriberInfo implements Serializable { private static final long serialVersionUID = -3283942659786236032L; - @SerializedName("globalSubscriberId") private String globalSubscriberId; - - @SerializedName("subscriberCommonSiteId") private String subscriberCommonSiteId; - - @SerializedName("subscriberName") private String subscriberName; public SoSubscriberInfo() { //required by author } - - public String getGlobalSubscriberId() { - return globalSubscriberId; - } - - public String getSubscriberCommonSiteId() { - return subscriberCommonSiteId; - } - - public String getSubscriberName() { - return subscriberName; - } - - public void setGlobalSubscriberId(String globalSubscriberId) { - this.globalSubscriberId = globalSubscriberId; - } - - public void setSubscriberCommonSiteId(String subscriberCommonSiteId) { - this.subscriberCommonSiteId = subscriberCommonSiteId; - } - - public void setSubscriberName(String subscriberName) { - this.subscriberName = subscriberName; - } - } |