| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
package org.kuali.rice.ksb.messaging.bam; |
| 18 | |
|
| 19 | |
import javax.persistence.CascadeType; |
| 20 | |
import javax.persistence.Column; |
| 21 | |
import javax.persistence.Entity; |
| 22 | |
import javax.persistence.FetchType; |
| 23 | |
import javax.persistence.Id; |
| 24 | |
import javax.persistence.JoinColumn; |
| 25 | |
import javax.persistence.ManyToOne; |
| 26 | |
import javax.persistence.PrePersist; |
| 27 | |
import javax.persistence.Table; |
| 28 | |
|
| 29 | |
import org.apache.commons.lang.StringUtils; |
| 30 | |
import org.kuali.rice.core.jpa.annotations.Sequence; |
| 31 | |
import org.kuali.rice.core.util.OrmUtils; |
| 32 | |
import org.kuali.rice.ksb.service.KSBServiceLocator; |
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
@Entity |
| 40 | |
@Table(name="KRSB_BAM_PARM_T") |
| 41 | |
@Sequence(name="KRSB_BAM_PARM_S", property="bamParamId") |
| 42 | 0 | public class BAMParam { |
| 43 | |
|
| 44 | |
@Id |
| 45 | |
@Column(name="BAM_PARM_ID") |
| 46 | |
private Long bamParamId; |
| 47 | |
@ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST}) |
| 48 | |
@JoinColumn(name="BAM_ID") |
| 49 | |
private BAMTargetEntry bamTargetEntry; |
| 50 | |
@Column(name="PARM") |
| 51 | |
private String param; |
| 52 | |
|
| 53 | |
@PrePersist |
| 54 | |
public void beforeInsert(){ |
| 55 | 0 | OrmUtils.populateAutoIncValue(this, KSBServiceLocator.getRegistryEntityManagerFactory().createEntityManager()); |
| 56 | 0 | } |
| 57 | |
|
| 58 | |
public BAMTargetEntry getBamTargetEntry() { |
| 59 | 0 | return this.bamTargetEntry; |
| 60 | |
} |
| 61 | |
public void setBamTargetEntry(BAMTargetEntry bamTargetEntry) { |
| 62 | 0 | this.bamTargetEntry = bamTargetEntry; |
| 63 | 0 | } |
| 64 | |
public Long getBamParamId() { |
| 65 | 0 | return this.bamParamId; |
| 66 | |
} |
| 67 | |
public void setBamParamId(Long bamParamId) { |
| 68 | 0 | this.bamParamId = bamParamId; |
| 69 | 0 | } |
| 70 | |
public String getParam() { |
| 71 | 0 | return this.param; |
| 72 | |
} |
| 73 | |
public void setParam(String paramToString) { |
| 74 | 0 | if (StringUtils.isEmpty(paramToString)) { |
| 75 | 0 | paramToString = "<null>"; |
| 76 | |
} |
| 77 | 0 | this.param = paramToString; |
| 78 | 0 | } |
| 79 | |
} |