Adding UI extensibility
[aai/sparky-be.git] / src / main / java / org / onap / aai / sparky / sync / entity / IndexableEntity.java
  *
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
-package org.onap.aai.sparky.synchronizer.entity;
+package org.onap.aai.sparky.sync.entity;
 
 import java.sql.Timestamp;
 import java.text.SimpleDateFormat;
 
-import org.onap.aai.sparky.config.oxm.OxmModelLoader;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
 
 /**
  * The Class IndexableEntity.
@@ -35,44 +36,7 @@ public abstract class IndexableEntity {
   protected String entityType;
   protected String entityPrimaryKeyValue;
   protected String lastmodTimestamp;
-
-  /**
-   * @return the lastmodTimestamp
-   */
-  public String getLastmodTimestamp() {
-    return lastmodTimestamp;
-  }
-
-  /**
-   * @param lastmodTimestamp the lastmodTimestamp to set
-   */
-  public void setLastmodTimestamp(String lastmodTimestamp) {
-    this.lastmodTimestamp = lastmodTimestamp;
-  }
-
-  /**
-   * @return the loader
-   */
-  public OxmModelLoader getLoader() {
-    return loader;
-  }
-
-  /**
-   * @param loader the loader to set
-   */
-  public void setLoader(OxmModelLoader loader) {
-    this.loader = loader;
-  }
-
-  /**
-   * @return the timestampFormat
-   */
-  public static String getTimestampFormat() {
-    return TIMESTAMP_FORMAT;
-  }
-
   protected String link;
-  protected OxmModelLoader loader;
 
   private static final String TIMESTAMP_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
 
@@ -86,28 +50,22 @@ public abstract class IndexableEntity {
     this.setEntityTimeStamp(currentFormattedTimeStamp);
   }
 
-  /**
-   * Instantiates a new indexable entity.
-   *
-   * @param loader the loader
-   */
-  public IndexableEntity(OxmModelLoader loader) {
-    this();
-    this.loader = loader;
-  }
-
+  @JsonIgnore
   public String getId() {
     return id;
   }
 
+  @JsonProperty("entityType")
   public String getEntityType() {
     return entityType;
   }
 
+  @JsonProperty("entityPrimaryKeyValue")
   public String getEntityPrimaryKeyValue() {
     return entityPrimaryKeyValue;
   }
 
+  @JsonProperty("lastmodTimestamp")
   public String getEntityTimeStamp() {
     return lastmodTimestamp;
   }
@@ -128,6 +86,7 @@ public abstract class IndexableEntity {
     this.lastmodTimestamp = lastmodTimestamp;
   }
 
+  @JsonProperty("link")
   public String getLink() {
     return link;
   }