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 javax.persistence.Column;
19  import javax.persistence.Entity;
20  import javax.persistence.FetchType;
21  import javax.persistence.GeneratedValue;
22  import javax.persistence.GenerationType;
23  import javax.persistence.Id;
24  import javax.persistence.JoinColumn;
25  import javax.persistence.Lob;
26  import javax.persistence.ManyToOne;
27  import javax.persistence.Table;
28  
29  /**
30   *
31   */
32  @Entity
33  @Table(name="j3_signature_transform_data_v")
34  public class SignatureTransformDataValue implements java.io.Serializable {
35      private static final long serialVersionUID = -2233157941119408702L;
36      
37      private Long id;
38      private String contentType;
39      private byte[] contentBytes;
40      private SignatureTransform signatureTransform;
41      
42      @Id
43      @GeneratedValue(strategy=GenerationType.AUTO)
44      public Long getId() {
45          return id;
46      }
47  
48      public void setId(Long id) {
49          this.id = id;
50      }
51  
52      @ManyToOne(fetch = FetchType.LAZY)
53      @JoinColumn(name = "signature_transform_key", nullable = false)
54      public SignatureTransform getSignatureTransform() {
55          return signatureTransform;
56      }
57  
58      public void setSignatureTransform(SignatureTransform signatureTransform) {
59          this.signatureTransform = signatureTransform;
60      }
61  
62      @Column(name="content_type")
63      public String getContentType() {
64          return contentType;
65      }
66  
67      public void setContentType(String contentType) {
68          this.contentType = contentType;
69      }
70  
71      @Lob
72      @Column(name="content_bytes", length = 65636)
73      public byte[] getContentBytes() {
74          return contentBytes;
75      }
76  
77      public void setContentBytes(byte[] contentBytes) {
78          this.contentBytes = contentBytes;
79      }
80  }