This project has retired. For details please refer to its Attic page.
BindingDescr xref
View Javadoc
1   package org.apache.juddi.model;
2   /*
3    * Copyright 2001-2008 The Apache Software Foundation.
4    * 
5    * Licensed under the Apache License, Version 2.0 (the "License");
6    * you may not use this file except in compliance with the License.
7    * You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
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.ManyToOne;
26  import javax.persistence.Table;
27  
28  /**
29   * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a>
30   * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
31   */
32  @Entity
33  @Table(name = "j3_binding_descr")
34  public class BindingDescr implements java.io.Serializable {
35  
36  	private static final long serialVersionUID = 5776673477204182405L;
37  	private Long id;
38  	private BindingTemplate bindingTemplate;
39  	private String langCode;
40  	private String descr;
41  
42  	public BindingDescr() {
43  	}
44  
45  	public BindingDescr(BindingTemplate bindingTemplate,
46  			String descr) {
47  		this.bindingTemplate = bindingTemplate;
48  		this.descr = descr;
49  	}
50  	public BindingDescr(BindingTemplate bindingTemplate,
51  			String langCode, String descr) {
52  		this.bindingTemplate = bindingTemplate;
53  		this.langCode = langCode;
54  		this.descr = descr;
55  	}
56  
57  	@Id
58  	@GeneratedValue(strategy=GenerationType.AUTO)
59  	public Long getId() {
60  		return this.id;
61  	}
62  	public void setId(Long id) {
63  		this.id = id;
64  	}
65  
66  	@ManyToOne(fetch = FetchType.LAZY)
67  	@JoinColumn(name = "entity_key", nullable = false)
68  	public BindingTemplate getBindingTemplate() {
69  		return this.bindingTemplate;
70  	}
71  	public void setBindingTemplate(BindingTemplate bindingTemplate) {
72  		this.bindingTemplate = bindingTemplate;
73  	}
74  
75  	@Column(name = "lang_code", length = 26)
76  	public String getLangCode() {
77  		return this.langCode;
78  	}
79  	public void setLangCode(String langCode) {
80  		this.langCode = langCode;
81  	}
82  
83  	@Column(name = "descr", nullable = false, length = 255)
84  	public String getDescr() {
85  		return this.descr;
86  	}
87  	public void setDescr(String descr) {
88      		this.descr = descr;
89  	}
90  
91  }