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 at7 *8 * http://www.apache.org/licenses/LICENSE-2.09 *10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */16package org.apache.juddi.model;
1718import javax.persistence.Column;
19import javax.persistence.Entity;
20import javax.persistence.FetchType;
21import javax.persistence.GeneratedValue;
22import javax.persistence.GenerationType;
23import javax.persistence.Id;
24import javax.persistence.JoinColumn;
25import javax.persistence.Lob;
26import javax.persistence.ManyToOne;
27import javax.persistence.Table;
2829/**30 *31 */32 @Entity
33 @Table(name="j3_object_type_content")
34publicclassObjectTypeContentimplements java.io.Serializable {
35privatestaticfinallong serialVersionUID = -3233157941119408715L;
3637private Long id;
38privateObjectType objectType;
39private byte[] content;
4041 @Id
42 @GeneratedValue(strategy=GenerationType.AUTO)
43public Long getId() {
44return id;
45 }
4647publicvoid setId(Long id) {
48this.id = id;
49 }
5051 @ManyToOne(fetch = FetchType.LAZY)
52 @JoinColumn(name = "object_type_key", nullable = false)
53publicObjectType getObjectType() {
54return objectType;
55 }
5657publicvoid setObjectType(ObjectType objectType) {
58this.objectType = objectType;
59 }
6061 @Lob
62 @Column(length = 65636)
63public byte[] getContent() {
64return content;
65 }
6667publicvoid setContent(byte[] content) {
68this.content = content;
69 }
70 }