01: package com.technoetic.xplanner.domain;
02:
03: import net.sf.hibernate.PersistentEnum;
04:
05: public class IterationStatusPersistent extends IterationStatus
06: implements PersistentEnum {
07: protected IterationStatusPersistent(int code) {
08: super (code);
09: }
10:
11: public static IterationStatus fromInt(int i) {
12: switch (i) {
13: case 0:
14: return ACTIVE;
15: case 1:
16: return INACTIVE;
17: default:
18: throw new RuntimeException("Unknown iteration status code");
19: }
20: }
21:
22: }
|