Replaced all tabs with spaces in java and pom.xml
[so.git] / mso-api-handlers / mso-requests-db / src / main / java / org / onap / so / db / request / beans / OperationStatus.java
index dff9dd6..ece9b5a 100644 (file)
@@ -22,7 +22,6 @@ package org.onap.so.db.request.beans;
 
 import java.io.Serializable;
 import java.util.Date;
-
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
@@ -36,204 +35,203 @@ import java.util.Objects;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
- * The service operation status 
- * <br>
+ * The service operation status <br>
  * <p>
  * </p>
  * 
  * @author
- * @version     ONAP Amsterdam Release  2017-08-28
+ * @version ONAP Amsterdam Release 2017-08-28
  */
 
 @IdClass(OperationStatusId.class)
 @Entity
 @Table(name = "operation_status")
-public class OperationStatus implements Serializable{
-    
+public class OperationStatus implements Serializable {
+
     /**
      * 
      */
     private static final long serialVersionUID = 1L;
 
     @Id
-       @Column(name = "SERVICE_ID")
+    @Column(name = "SERVICE_ID")
     private String serviceId;
     @Id
-       @Column(name = "OPERATION_ID", length=256)
+    @Column(name = "OPERATION_ID", length = 256)
     private String operationId;
-    
-    @Column(name = "SERVICE_NAME", length=256)
+
+    @Column(name = "SERVICE_NAME", length = 256)
     private String serviceName;
-    
-    @Column(name = "OPERATION_TYPE", length=256)
+
+    @Column(name = "OPERATION_TYPE", length = 256)
     private String operation;
-    
-    @Column(name = "USER_ID", length=256)
+
+    @Column(name = "USER_ID", length = 256)
     private String userId;
-    
-    @Column(name = "RESULT", length=256)
+
+    @Column(name = "RESULT", length = 256)
     private String result;
-    
-    @Column(name = "OPERATION_CONTENT", length=256)
+
+    @Column(name = "OPERATION_CONTENT", length = 256)
     private String operationContent;
-    
-    @Column(name = "PROGRESS", length=256)
+
+    @Column(name = "PROGRESS", length = 256)
     private String progress = "0";
-    
-    @Column(name = "REASON", length=256)
+
+    @Column(name = "REASON", length = 256)
     private String reason;
 
-    @Column(name = "OPERATE_AT", length=256, updatable=false)
+    @Column(name = "OPERATE_AT", length = 256, updatable = false)
     @Temporal(TemporalType.TIMESTAMP)
     private Date operateAt;
-    
-    @Column(name = "FINISHED_AT", length=256)
+
+    @Column(name = "FINISHED_AT", length = 256)
     @Temporal(TemporalType.TIMESTAMP)
     private Date finishedAt;
 
     public OperationStatus() {
-       
+
     }
-    
+
     public OperationStatus(String serviceId, String operationId) {
-       this.serviceId = serviceId;
-       this.operationId = operationId;
+        this.serviceId = serviceId;
+        this.operationId = operationId;
     }
-    
-    
+
+
     public String getServiceId() {
         return serviceId;
     }
 
-    
+
     public void setServiceId(String serviceId) {
         this.serviceId = serviceId;
     }
 
-    
+
     public String getOperationId() {
         return operationId;
     }
 
-    
+
     public void setOperationId(String operationId) {
         this.operationId = operationId;
     }
 
-    
+
     public String getOperation() {
         return operation;
     }
 
-    
+
     public void setOperation(String operation) {
         this.operation = operation;
     }
 
-    
+
     public String getServiceName() {
-               return serviceName;
-       }
+        return serviceName;
+    }
 
-       public void setServiceName(String serviceName) {
-               this.serviceName = serviceName;
-       }
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
 
-       public String getUserId() {
+    public String getUserId() {
         return userId;
     }
 
-    
+
     public void setUserId(String userId) {
         this.userId = userId;
     }
 
-    
+
     public String getResult() {
         return result;
     }
 
-    
+
     public void setResult(String result) {
         this.result = result;
     }
 
-    
+
     public String getOperationContent() {
         return operationContent;
     }
 
-    
+
     public void setOperationContent(String operationContent) {
         this.operationContent = operationContent;
     }
 
-    
+
     public String getProgress() {
         return progress;
     }
 
-    
+
     public void setProgress(String progress) {
         this.progress = progress;
     }
 
-    
+
     public String getReason() {
         return reason;
     }
 
-    
+
     public void setReason(String reason) {
         this.reason = reason;
     }
 
-    
+
     public Date getOperateAt() {
         return operateAt;
     }
-    
+
     public Date getFinishedAt() {
         return finishedAt;
     }
 
     @PrePersist
     protected void onCreate() {
-       this.finishedAt = this.operateAt = new Date();
+        this.finishedAt = this.operateAt = new Date();
     }
-    
+
     @PreUpdate
     protected void onUpdate() {
-       this.finishedAt = new Date();
-    }
-
-       @Override
-       public boolean equals(final Object other) {
-               if (this == other) {
-                       return true;
-               }
-               if (!(other instanceof OperationStatus)) {
-                       return false;
-               }
-               OperationStatus castOther = (OperationStatus) other;
-               return Objects.equals(getServiceId(), castOther.getServiceId())
-                               && Objects.equals(getOperationId(), castOther.getOperationId());
-       }
-
-       @Override
-       public int hashCode() {
-               return Objects.hash(getServiceId(), getOperationId());
-       }
-
-       @Override
-       public String toString() {
-               return new ToStringBuilder(this).append("serviceId", getServiceId()).append("operationId", getOperationId())
-                               .append("operation", getOperation()).append("userId", getUserId()).append("result", getResult())
-                               .append("operationContent", getOperationContent()).append("progress", getProgress())
-                               .append("reason", getReason()).append("operateAt", getOperateAt()).append("finishedAt", getFinishedAt())
-                               .toString();
-       }
-
-    
+        this.finishedAt = new Date();
+    }
+
+    @Override
+    public boolean equals(final Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (!(other instanceof OperationStatus)) {
+            return false;
+        }
+        OperationStatus castOther = (OperationStatus) other;
+        return Objects.equals(getServiceId(), castOther.getServiceId())
+                && Objects.equals(getOperationId(), castOther.getOperationId());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getServiceId(), getOperationId());
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this).append("serviceId", getServiceId()).append("operationId", getOperationId())
+                .append("operation", getOperation()).append("userId", getUserId()).append("result", getResult())
+                .append("operationContent", getOperationContent()).append("progress", getProgress())
+                .append("reason", getReason()).append("operateAt", getOperateAt()).append("finishedAt", getFinishedAt())
+                .toString();
+    }
+
+
 
 }