View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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.kuali.rice.ksb.messaging.bam;
17  
18  import org.apache.commons.lang.StringUtils;
19  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
20  
21  import javax.persistence.CascadeType;
22  import javax.persistence.Column;
23  import javax.persistence.Entity;
24  import javax.persistence.FetchType;
25  import javax.persistence.GeneratedValue;
26  import javax.persistence.Id;
27  import javax.persistence.JoinColumn;
28  import javax.persistence.Lob;
29  import javax.persistence.ManyToOne;
30  import javax.persistence.Table;
31  
32  /**
33   * A parameter of a method invocation recorded by the BAM.
34   *
35   * @author Kuali Rice Team (rice.collab@kuali.org)
36   */
37  @Entity
38  @Table(name = "KRSB_BAM_PARM_T")
39  public class BAMParam {
40  
41  	@Id
42  	@GeneratedValue(generator = "KRSB_BAM_PARM_S")
43      @PortableSequenceGenerator(name = "KRSB_BAM_PARM_S")
44      @Column(name = "BAM_PARM_ID")
45  	private Long bamParamId;
46  
47  	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
48  	@JoinColumn(name = "BAM_ID")
49  	private BAMTargetEntry bamTargetEntry;
50  
51  	@Lob
52  	@Column(name = "PARM")
53  	private String param;
54  		
55  	public BAMTargetEntry getBamTargetEntry() {
56  		return this.bamTargetEntry;
57  	}
58  	public void setBamTargetEntry(BAMTargetEntry bamTargetEntry) {
59  		this.bamTargetEntry = bamTargetEntry;
60  	}
61  	public Long getBamParamId() {
62  		return this.bamParamId;
63  	}
64  	public void setBamParamId(Long bamParamId) {
65  		this.bamParamId = bamParamId;
66  	}
67  	public String getParam() {
68  		return this.param;
69  	}
70  	public void setParam(String paramToString) {
71  		if (StringUtils.isEmpty(paramToString)) {
72  			paramToString = "<null>";//oracle blows null constraint on empty strings
73  		}
74  		this.param = paramToString;
75  	}
76  }