This project has retired. For details please refer to its
Attic page.
UddiEntity xref
1 package org.apache.juddi.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 import java.util.Date;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.Id;
23 import javax.persistence.Inheritance;
24 import javax.persistence.InheritanceType;
25 import javax.persistence.Table;
26 import javax.persistence.Temporal;
27 import javax.persistence.TemporalType;
28
29
30
31
32 @Entity
33 @Table(name = "j3_uddi_entity")
34 @Inheritance(strategy = InheritanceType.JOINED)
35 public abstract class UddiEntity implements Comparable<UddiEntity>{
36
37 protected String entityKey;
38 protected Date created;
39 protected Date modified;
40 protected Date modifiedIncludingChildren;
41 protected String nodeId;
42 protected String authorizedName;
43 protected boolean xfer = false;
44
45 @Id
46 @Column(name = "entity_key", nullable = false, length = 255)
47 public String getEntityKey() {
48 return entityKey;
49 }
50 public void setEntityKey(String entityKey) {
51 this.entityKey = entityKey;
52 }
53
54 @Temporal(TemporalType.TIMESTAMP)
55 @Column(name = "created", length = 29)
56 public Date getCreated() {
57 if (created!=null) {
58 return new Date(created.getTime());
59 } else {
60 return null;
61 }
62 }
63 public void setCreated(Date created) {
64 this.created = created;
65 }
66
67 @Temporal(TemporalType.TIMESTAMP)
68 @Column(name = "modified", nullable = false, length = 29)
69 public Date getModified() {
70 if (modified!=null) {
71 return new Date(modified.getTime());
72 } else {
73 return null;
74 }
75 }
76 public void setModified(Date modified) {
77 this.modified = modified;
78 }
79
80 @Temporal(TemporalType.TIMESTAMP)
81 @Column(name = "modified_including_children", length = 29)
82 public Date getModifiedIncludingChildren() {
83 if (modifiedIncludingChildren!=null) {
84 return new Date(modifiedIncludingChildren.getTime());
85 } else {
86 return null;
87 }
88 }
89 public void setModifiedIncludingChildren(Date modifiedIncludingChildren) {
90 this.modifiedIncludingChildren = modifiedIncludingChildren;
91 }
92
93
94
95
96
97 @Column(name = "node_id", nullable=false,length = 255)
98 public String getNodeId() {
99 return nodeId;
100 }
101 public void setNodeId(String nodeId) {
102 this.nodeId = nodeId;
103 }
104
105
106 @Column(name = "authorized_name", nullable=false, length = 255)
107 public String getAuthorizedName() {
108 return authorizedName;
109 }
110 public void setAuthorizedName(String authorizedName) {
111 this.authorizedName = authorizedName;
112 }
113
114 public int compareTo(UddiEntity o) {
115 if (o==null || o.getEntityKey()==null) return 0;
116 if (o.getEntityKey().equals(getEntityKey())) return 1;
117 else return 0;
118 }
119
120 public void setIsTransferInProgress(boolean b) {
121 xfer = b;
122 }
123 @Column(name="xfer", nullable=false)
124 public boolean getIsTransferInProgress()
125 {
126 return xfer;
127 }
128
129 }