Coverage Report - org.kuali.rice.ksb.messaging.bam.BAMTargetEntry
 
Classes in this File Line Coverage Branch Coverage Complexity
BAMTargetEntry
0%
0/42
N/A
1
 
 1  
 /*
 2  
  * Copyright 2005-2007 The Kuali Foundation
 3  
  * 
 4  
  * 
 5  
  * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
 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  
 package org.kuali.rice.ksb.messaging.bam;
 18  
 
 19  
 import java.io.Serializable;
 20  
 import java.sql.Timestamp;
 21  
 import java.util.ArrayList;
 22  
 import java.util.List;
 23  
 
 24  
 import javax.persistence.Basic;
 25  
 import javax.persistence.CascadeType;
 26  
 import javax.persistence.Column;
 27  
 import javax.persistence.Entity;
 28  
 import javax.persistence.FetchType;
 29  
 import javax.persistence.GeneratedValue;
 30  
 import javax.persistence.Id;
 31  
 import javax.persistence.Lob;
 32  
 import javax.persistence.OneToMany;
 33  
 import javax.persistence.Table;
 34  
 import javax.persistence.Transient;
 35  
 
 36  
 import org.hibernate.annotations.GenericGenerator;
 37  
 import org.hibernate.annotations.Parameter;
 38  
 import org.kuali.rice.core.framework.persistence.jpa.OrmUtils;
 39  
 import org.kuali.rice.ksb.api.messaging.AsynchronousCallback;
 40  
 import org.kuali.rice.ksb.service.KSBServiceLocator;
 41  
 
 42  
 
 43  
 /**
 44  
  * An entry in the BAM representing a service method invocation.
 45  
  *
 46  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 47  
  */
 48  
 @Entity
 49  
 @Table(name="KRSB_BAM_T")
 50  
 //@Sequence(name="KRSB_BAM_S", property="bamId")
 51  0
 public class BAMTargetEntry implements Serializable {
 52  
 
 53  
         private static final long serialVersionUID = -8376674801367598316L;
 54  
 
 55  
         @Id
 56  
         @GeneratedValue(generator="KRSB_BAM_S")
 57  
         @GenericGenerator(name="KRSB_BAM_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
 58  
                         @Parameter(name="sequence_name",value="KRSB_BAM_S"),
 59  
                         @Parameter(name="value_column",value="id")
 60  
         })
 61  
         @Column(name="BAM_ID")
 62  
         private Long bamId;
 63  
         @Column(name="SVC_NM")
 64  
         private String serviceName;
 65  
         @Column(name="MTHD_NM")
 66  
         private String methodName;
 67  
         @Column(name="THRD_NM")
 68  
         private String threadName;
 69  
         @Column(name="CALL_DT")
 70  
         private Timestamp callDate;
 71  
         @Column(name="SVC_URL")
 72  
         private String serviceURL;
 73  
         @Column(name="TGT_TO_STR")
 74  
         private String targetToString;
 75  
         @Column(name="EXCPN_TO_STR")
 76  
         private String exceptionToString;
 77  
         @Lob
 78  
         @Basic(fetch=FetchType.LAZY)
 79  
         @Column(name="EXCPN_MSG", length=4000)
 80  
         private String exceptionMessage;
 81  
         @Column(name="SRVR_IND")
 82  
         private Boolean serverInvocation;
 83  0
         @OneToMany(cascade=CascadeType.ALL, mappedBy="bamParamId")
 84  
         private List<BAMParam> bamParams = new ArrayList<BAMParam>();
 85  
         
 86  
         //for async calls not bam
 87  
         @Transient
 88  
         private AsynchronousCallback callback;
 89  
         
 90  
         //@PrePersist
 91  
     public void beforeInsert(){
 92  0
         OrmUtils.populateAutoIncValue(this, KSBServiceLocator.getRegistryEntityManagerFactory().createEntityManager());
 93  0
     }
 94  
         
 95  
         public void addBamParam(BAMParam bamParam) {
 96  0
                 this.bamParams.add(bamParam);
 97  0
         }
 98  
         public String getExceptionToString() {
 99  0
                 return this.exceptionToString;
 100  
         }
 101  
         public void setExceptionToString(String exceptionToString) {
 102  0
                 this.exceptionToString = exceptionToString;
 103  0
         }
 104  
         public String getServiceName() {
 105  0
                 return this.serviceName;
 106  
         }
 107  
         public void setServiceName(String serviceName) {
 108  0
                 this.serviceName = serviceName;
 109  0
         }
 110  
         public String getServiceURL() {
 111  0
                 return this.serviceURL;
 112  
         }
 113  
         public void setServiceURL(String serviceURL) {
 114  0
                 this.serviceURL = serviceURL;
 115  0
         }
 116  
         public String getTargetToString() {
 117  0
                 return this.targetToString;
 118  
         }
 119  
         public void setTargetToString(String targetToString) {
 120  0
                 this.targetToString = targetToString;
 121  0
         }
 122  
         public Long getBamId() {
 123  0
                 return this.bamId;
 124  
         }
 125  
         public void setBamId(Long bamId) {
 126  0
                 this.bamId = bamId;
 127  0
         }
 128  
         public String getExceptionMessage() {
 129  0
                 return this.exceptionMessage;
 130  
         }
 131  
         public void setExceptionMessage(String exceptionMessage) {
 132  0
                 this.exceptionMessage = exceptionMessage;
 133  0
         }
 134  
         public Boolean getServerInvocation() {
 135  0
                 return this.serverInvocation;
 136  
         }
 137  
         public void setServerInvocation(Boolean clientInvocation) {
 138  0
                 this.serverInvocation = clientInvocation;
 139  0
         }
 140  
         public Timestamp getCallDate() {
 141  0
                 return this.callDate;
 142  
         }
 143  
         public void setCallDate(Timestamp callDate) {
 144  0
                 this.callDate = callDate;
 145  0
         }
 146  
         public String getMethodName() {
 147  0
                 return this.methodName;
 148  
         }
 149  
         public void setMethodName(String methodName) {
 150  0
                 this.methodName = methodName;
 151  0
         }
 152  
         public String getThreadName() {
 153  0
                 return this.threadName;
 154  
         }
 155  
         public void setThreadName(String threadName) {
 156  0
                 this.threadName = threadName;
 157  0
         }
 158  
         public List<BAMParam> getBamParams() {
 159  0
                 return this.bamParams;
 160  
         }
 161  
         public void setBamParams(List<BAMParam> bamParams) {
 162  0
                 this.bamParams = bamParams;
 163  0
         }
 164  
         public AsynchronousCallback getCallback() {
 165  0
                 return this.callback;
 166  
         }
 167  
         public void setCallback(AsynchronousCallback callback) {
 168  0
                 this.callback = callback;
 169  0
         }
 170  
 }
 171