This project has retired. For details please refer to its Attic page.
ObjectType xref
View Javadoc
1   /*
2    * Copyright 2012 The Apache Software Foundation.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.apache.juddi.model;
17  
18  import java.util.List;
19  import javax.persistence.CascadeType;
20  import javax.persistence.Column;
21  import javax.persistence.Entity;
22  import javax.persistence.FetchType;
23  import javax.persistence.GeneratedValue;
24  import javax.persistence.GenerationType;
25  import javax.persistence.Id;
26  import javax.persistence.JoinColumn;
27  import javax.persistence.ManyToOne;
28  import javax.persistence.OneToMany;
29  import javax.persistence.OrderBy;
30  import javax.persistence.Table;
31  
32  /**
33   *
34   */
35  @Entity
36  @Table(name="j3_object_type")
37  public class ObjectType implements java.io.Serializable {
38      private static final long serialVersionUID = -3233157941119408716L;
39      
40      private Long id;
41      private Signature signature;
42      private List<ObjectTypeContent> content;
43      private String xmlID;
44      private String mimeType;
45      private String encoding;
46      
47      @Id
48      @GeneratedValue(strategy=GenerationType.AUTO)
49      public Long getId() {
50          return id;
51      }
52  
53      public void setId(Long id) {
54          this.id = id;
55      }
56  
57      @ManyToOne(fetch = FetchType.LAZY)
58      @JoinColumn(name = "signature_key", nullable = false)
59      public Signature getSignature() {
60          return signature;
61      }
62  
63      public void setSignature(Signature signature) {
64          this.signature = signature;
65      }
66      
67      @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "objectType")
68      @OrderBy
69      public List<ObjectTypeContent> getContent() {
70          return content;
71      }
72  
73      public void setContent(List<ObjectTypeContent> content) {
74          this.content = content;
75      }
76  
77      @Column(name="xml_id")
78      public String getXmlID() {
79          return xmlID;
80      }
81  
82      public void setXmlID(String xmlID) {
83          this.xmlID = xmlID;
84      }
85  
86      @Column(name="mime_type")
87      public String getMimeType() {
88          return mimeType;
89      }
90  
91      public void setMimeType(String mimeType) {
92          this.mimeType = mimeType;
93      }
94  
95      @Column(name="encoding")
96      public String getEncoding() {
97          return encoding;
98      }
99  
100     public void setEncoding(String encoding) {
101         this.encoding = encoding;
102     }
103 }