/**
 * Created by Eduardo veras on 19-Jun-16.
 * Edited by Siclait on 19-Jun-16
 */
package Entity;

import java.util.UUID;

public class URL {

    public String id;
    public String originalUrl;

    public URL() {
    }

    public URL(String originalUrl) {
        this.originalUrl = originalUrl;
        this.id = UUID.randomUUID().toString().split("-")[0];
    }
}

@@ -94,16 +94,73 @@
 ntity;%0A%0A
+import javax.persistence.*;%0Aimport java.io.Serializable;%0A
 import j
@@ -175,16 +175,24 @@
 .UUID;%0A%0A
+@Entity%0A
 public c
@@ -204,64 +204,347 @@
 URL 
-%7B%0A%0A    public String id;%0A    public String originalUrl;%0A
+implements Serializable %7B%0A%0A    private static final long serialVersionUID = 1L;%0A%0A    // Attributes%0A    @Id%0A    @Column(name = %22SHORT%22)%0A    private String shortURL;%0A%0A    @Column(name = %22ORIGINAL%22)%0A    private String originalURL;%0A%0A    @ManyToOne  // @Column not allowe iinn many to one relationship%0A    private User user;%0A%0A    // Constructor
 %0A   
@@ -555,24 +555,25 @@
 lic URL() %7B%0A
+%0A
     %7D%0A%0A    p
@@ -602,14 +602,26 @@
 nalU
+RL, User use
 r
-l
 ) %7B%0A
+%0A
     
@@ -629,25 +629,28 @@
    this.
-o
+setO
 riginalU
 rl = ori
@@ -645,13 +645,11 @@
 nalU
-rl = 
+RL(
 orig
@@ -657,10 +657,11 @@
 nalU
-rl
+RL)
 ;%0A  
@@ -675,13 +675,20 @@
 his.
-id = 
+setShortURL(
 UUID
@@ -725,16 +725,703 @@
 (%22-%22)%5B0%5D
+);%0A        this.setUser(user);%0A%0A    %7D%0A%0A    public URL(String shortURL, String originalURL, User user) %7B%0A%0A        this.setOriginalURL(originalURL);%0A        this.setShortURL(shortURL);%0A        this.setUser(user);%0A%0A    %7D%0A%0A    // Getters & Setters%0A    public String getShortURL() %7B%0A        return shortURL;%0A    %7D%0A%0A    public void setShortURL(String shortURL) %7B%0A        this.shortURL = shortURL;%0A    %7D%0A%0A    public String getOriginalURL() %7B%0A        return originalURL;%0A    %7D%0A%0A    public void setOriginalURL(String originalURL) %7B%0A        this.originalURL = originalURL;%0A    %7D%0A%0A    public User getUser() %7B%0A        return user;%0A    %7D%0A%0A    public void setUser(User user) %7B%0A        this.user = user
 ;%0A    %7D%0A

Create URL POJO Entity