rendered paste bodyTiger.java:
package net.oxbeef.entity;
import java.io.Serializable;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name="tiger")
@SequenceGenerator(name = "tiger_sequence", sequenceName = "tiger_id_seq")
public class Tiger implements Serializable {
private Integer id;
private String name;
private String color;
public Tiger() {
super();
}
public Tiger(Integer id, String name, String color) {
this.id = id;
this.name = name;
this.color = color;
}
public String toString() {
return "A Tiger named " + name + " (" + id + ") who is " + color;
}
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tiger_sequence")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public void notsupported() {}
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public void supports() {}
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void requires() {}
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public void requiresnew() {}
@TransactionAttribute(TransactionAttributeType.MANDATORY)
public void mandatory() {}
@TransactionAttribute(TransactionAttributeType.NEVER)
public void never() {}
}