1
2
3
4 package de.tivsource.page.entity.picture;
5
6 import javax.persistence.Column;
7 import javax.persistence.Entity;
8 import javax.persistence.EnumType;
9 import javax.persistence.Enumerated;
10 import javax.persistence.FetchType;
11 import javax.persistence.Id;
12 import javax.persistence.JoinColumn;
13 import javax.persistence.ManyToOne;
14
15 import org.hibernate.envers.Audited;
16 import org.hibernate.search.annotations.DocumentId;
17
18 import de.tivsource.page.enumeration.UrlType;
19
20
21
22
23
24
25 @Audited
26 @Entity
27 public class PictureUrl {
28
29
30
31
32
33
34 @Id
35 @DocumentId
36 @Column(name="uuid", unique=true, length=42)
37 private String uuid;
38
39 @Enumerated(EnumType.STRING)
40 private UrlType urlType;
41
42 private String url;
43
44 @ManyToOne(targetEntity=Picture.class, fetch=FetchType.LAZY)
45 @JoinColumn(name="picture_uuid")
46 private Picture picture;
47
48 public String getUuid() {
49 return uuid;
50 }
51
52 public void setUuid(String uuid) {
53 this.uuid = uuid;
54 }
55
56 public UrlType getUrlType() {
57 return urlType;
58 }
59
60 public void setUrlType(UrlType urlType) {
61 this.urlType = urlType;
62 }
63
64 public String getUrl() {
65 return url;
66 }
67
68 public void setUrl(String url) {
69 this.url = url;
70 }
71
72 public Picture getPicture() {
73 return picture;
74 }
75
76 public void setPicture(Picture picture) {
77 this.picture = picture;
78 }
79
80 }