日期:2014-05-16 浏览次数:20604 次
@Entity @Table(name = "NumberIncrement") public class NumberIncrementModel implements Serializable { /** * serialVersionID. */ private static final long serialVersionUID = -1555659864049096945L; @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id; @Column(name = "NUMBER_INCREMENT") private Integer numberIncrement; public NumberIncrementModel(Integer numberIncrement) { this.numberIncrement = numberIncrement; } }
@Entity @Table(name = "JBPM4_NUMBER_INCRECMENT") public class NumberIncrementModel implements Serializable { /** * serialVersionID. */ private static final long serialVersionUID = -1555659864049096945L; private Long id; public void setId(Long id) { this.id = id; } public void setNumberIncrement(Integer numberIncrement) { this.numberIncrement = numberIncrement; } private Integer numberIncrement; @Id @GeneratedValue(strategy=GenerationType.AUTO) public Long getId() { return id; } @Column(name = "NUMBER_INCREMENT") public Integer getNumberIncrement() { return numberIncrement + 2; } public NumberIncrementModel(Integer numberIncrement) { this.numberIncrement = numberIncrement; } }
NumberIncrementModel numberIncrementModel = new NumberIncrementModel(2); XXXService.insertNumberIncrecement(numberIncrementModel);