package com.hida.model;

/**
 * POJO for PURLs, logical units of transaction that can be resolved into
 * various records and locations.
 *
 * @author lruffin
 * @author: leland lopez
 */
public class Purl {

    //variables
    private String URL;
    private String PURL;
    private String ERC;
    private String Who;
    private String What;
    private String When;

    /**
     * Purl Constructor
     *
     * @param PURL purlid of model_purl
     */
    public Purl(String PURL) {
        this.PURL = PURL;
    }

    /**
     * No-arg constructor used by Hibernate
     */
    public Purl() {

    }

    public String getURL() {
        return URL;
    }

    public void setURL(String uRL) {
        URL = uRL;
    }

    public String getPURL() {
        return PURL;
    }

    public void setPURL(String pURL) {
        PURL = pURL;
    }

    public String getERC() {
        return ERC;
    }

    public void setERC(String eRC) {
        ERC = eRC;
    }

    public String getWho() {
        return Who;
    }

    public void setWho(String who) {
        Who = who;
    }

    public String getWhat() {
        return What;
    }

    public void setWhat(String what) {
        What = what;
    }

    public String getWhen() {
        return When;
    }

    public void setWhen(String when) {
        When = when;
    }

    /**
     *
     * @return Json String
     */
    public String toJSON() {
        String json = "";
        json += "{";
        json += "\"PURL\":\"" + PURL + "\",";
        json += "\"URL\":\"" + URL + "\",";
        json += "\"ERC\":\"" + ERC + "\",";
        json += "\"Who\":\"" + Who + "\",";
        json += "\"What\":\"" + What + "\",";
        json += "\"When\":\"" + When + "\"";
        json += "}";
        return json;
    }

}

@@ -18,16 +18,111 @@
 model;%0A%0A
+import javax.persistence.Entity;%0Aimport javax.persistence.Id;%0Aimport javax.persistence.Table;%0A%0A
 /**%0A * P
@@ -276,16 +276,46 @@
 pez%0A */%0A
+@Entity%0A@Table(name = %22PURL%22)%0A
 public c
@@ -343,16 +343,32 @@
 riables%0A
+    @Id        %0A
     priv
@@ -378,19 +378,26 @@
  String 
-URL
+Identifier
 ;%0A    pr
@@ -409,21 +409,24 @@
  String 
-P
 URL;
+    
 %0A    pri
@@ -648,20 +648,26 @@
    this.
-PURL
+Identifier
  = PURL;
@@ -848,17 +848,17 @@
 (String 
-u
+U
 RL) %7B%0A  
@@ -867,15 +867,20 @@
     
+this.
 URL = 
-u
+U
 RL;%0A
@@ -907,20 +907,26 @@
 ring get
-PURL
+Identifier
 () %7B%0A   
@@ -937,20 +937,26 @@
  return 
-PURL
+Identifier
 ;%0A    %7D%0A
@@ -979,47 +979,76 @@
  set
-PURL(String pURL) %7B%0A        PURL = pURL
+Identifier(String Identifier) %7B%0A        this.Identifier = Identifier
 ;%0A  
@@ -1138,17 +1138,17 @@
 (String 
-e
+E
 RC) %7B%0A  
@@ -1157,15 +1157,20 @@
     
+this.
 ERC = 
-e
+E
 RC;%0A
@@ -1703,20 +1703,26 @@
 %22:%5C%22%22 + 
-PURL
+Identifier
  + %22%5C%22,%22

Add Hibernate annotations to Purl