| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
package org.apache.camel.bam.model; |
| 18 |
|
|
| 19 |
|
import javax.persistence.CascadeType; |
| 20 |
|
import javax.persistence.Entity; |
| 21 |
|
import javax.persistence.FetchType; |
| 22 |
|
import javax.persistence.GeneratedValue; |
| 23 |
|
import javax.persistence.Id; |
| 24 |
|
import javax.persistence.ManyToOne; |
| 25 |
|
import javax.persistence.UniqueConstraint; |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
@Entity |
| 31 |
|
@UniqueConstraint(columnNames = {"name" }) |
| 32 |
22 |
public class ActivityDefinition extends EntitySupport { |
| 33 |
|
private String name; |
| 34 |
|
private ProcessDefinition processDefinition; |
| 35 |
|
|
| 36 |
|
|
| 37 |
|
@Override |
| 38 |
|
@Id |
| 39 |
|
@GeneratedValue |
| 40 |
|
public Long getId() { |
| 41 |
44 |
return super.getId(); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
@Override |
| 45 |
|
public String toString() { |
| 46 |
4 |
return "Activity[" + getId() + " name: " + getName() + "]"; |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
public String getName() { |
| 50 |
136 |
return name; |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
public void setName(String name) { |
| 54 |
14 |
this.name = name; |
| 55 |
14 |
} |
| 56 |
|
|
| 57 |
|
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST }) |
| 58 |
|
public ProcessDefinition getProcessDefinition() { |
| 59 |
140 |
return processDefinition; |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
public void setProcessDefinition(ProcessDefinition processDefinition) { |
| 63 |
14 |
this.processDefinition = processDefinition; |
| 64 |
14 |
} |
| 65 |
|
} |