Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Status implements Serializable {
- private static final long serialVersionUID = -6253387194209148223L;
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(unique = true, nullable = false)
- private Integer id;
- @Column(nullable = false, length = 90)
- private String descr;
- @Column(name = "dropdown_order", nullable = false)
- private Integer dropdownOrder;
- public enum StatusEnum {
- DRAFT(1), PENDING_REVIEW(2), UNDER_REVIEW(3);
- private Integer status;
- private StatusEnum(Integer status) {
- this.status = status;
- }
- public Integer getStatus() {
- return status;
- }
- public void setStatus(Integer status) {
- this.status = status;
- }
- }
- Integer status = StatusEnum.DRAFT.getStatus();
- Status status = statusDao.findByPk(status.longValue());
Add Comment
Please, Sign In to add comment