Reformat catalog-dao
[sdc.git] / catalog-dao / src / main / java / org / openecomp / sdc / be / resources / data / auditing / ResourceAdminEvent.java
index da3563e..c30cdb2 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.resources.data.auditing;
 
 import com.datastax.driver.core.utils.UUIDs;
@@ -25,6 +24,10 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn;
 import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.TimeZone;
+import java.util.UUID;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.ToString;
@@ -33,11 +36,6 @@ import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
 import org.openecomp.sdc.be.resources.data.auditing.model.ResourceVersionInfo;
 import org.openecomp.sdc.common.datastructure.AuditingFieldsKey;
 
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.TimeZone;
-import java.util.UUID;
-
 @Getter
 @Setter
 @ToString
@@ -46,80 +44,59 @@ public class ResourceAdminEvent extends AuditingGenericEvent {
 
     @PartitionKey
     protected UUID timebaseduuid;
-
     @ClusteringColumn
     protected Date timestamp1;
-
     @Column
     protected String action;
-
     @Column(name = "resource_type")
     protected String resourceType;
-
     @Column(name = "prev_version")
     protected String prevVersion;
-
     @Column(name = "prev_state")
     protected String prevState;
-
     @Column(name = "curr_state")
     protected String currState;
-
-    @Column(name = "resource_name")
-    private String resourceName;
-
-    @Column(name = "curr_version")
-    private String currVersion;
-
     @Column(name = "request_id")
     protected String requestId;
-
     @Column(name = "service_instance_id")
     protected String serviceInstanceId;
-
     @Column
     protected String status;
-
     @Column(name = "description")
     protected String desc;
-
     @Column
     protected String modifier;
-
     @Column(name = "prev_artifact_UUID")
     protected String prevArtifactUUID;
-
     @Column(name = "curr_artifact_UUID")
     protected String currArtifactUUID;
-
     @Column(name = "artifact_data")
     protected String artifactData;
-
     @Column
     protected String did;
-
     @Column(name = "dprev_status")
     protected String dprevStatus;
-
     @Column(name = "dcurr_status")
     protected String dcurrStatus;
-
     @Column(name = "tosca_node_type")
     protected String toscaNodeType;
-
     @Column
     protected String comment;
-
     @Column(name = "invariant_UUID")
     protected String invariantUUID;
+    @Column(name = "resource_name")
+    private String resourceName;
+    @Column(name = "curr_version")
+    private String currVersion;
 
     public ResourceAdminEvent() {
         timestamp1 = new Date();
         timebaseduuid = UUIDs.timeBased();
     }
 
-    public ResourceAdminEvent(String action, CommonAuditData commonAuditData, ResourceCommonInfo resourceCommonInfo, ResourceVersionInfo prevParams, ResourceVersionInfo currParams,
-                              String invariantUuid, String modifier, String artifactData, String comment, String did, String toscaNodeType) {
+    public ResourceAdminEvent(String action, CommonAuditData commonAuditData, ResourceCommonInfo resourceCommonInfo, ResourceVersionInfo prevParams,
+                              ResourceVersionInfo currParams, String invariantUuid, String modifier, String artifactData, String comment, String did,
+                              String toscaNodeType) {
         this();
         this.action = action;
         this.requestId = commonAuditData.getRequestId();
@@ -155,7 +132,6 @@ public class ResourceAdminEvent extends AuditingGenericEvent {
     @Override
     public void fillFields() {
         fields.put(AuditingFieldsKey.AUDIT_REQUEST_ID.getDisplayName(), getRequestId());
-
         fields.put(AuditingFieldsKey.AUDIT_SERVICE_INSTANCE_ID.getDisplayName(), getServiceInstanceId());
         fields.put(AuditingFieldsKey.AUDIT_ACTION.getDisplayName(), getAction());
         fields.put(AuditingFieldsKey.AUDIT_STATUS.getDisplayName(), getStatus());
@@ -176,7 +152,6 @@ public class ResourceAdminEvent extends AuditingGenericEvent {
         fields.put(AuditingFieldsKey.AUDIT_RESOURCE_DPREV_STATUS.getDisplayName(), getDprevStatus());
         fields.put(AuditingFieldsKey.AUDIT_RESOURCE_TOSCA_NODE_TYPE.getDisplayName(), getToscaNodeType());
         fields.put(AuditingFieldsKey.AUDIT_INVARIANT_UUID.getDisplayName(), getInvariantUUID());
-
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormatPattern);
         simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
         fields.put(AuditingFieldsKey.AUDIT_TIMESTAMP.getDisplayName(), timestamp1.getTime());