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