| .. | .. |
|---|
| 1 | 1 | package net.curisit.securis.db; |
|---|
| 2 | 2 | |
|---|
| 3 | +import net.curisit.securis.db.common.CodedEnum; |
|---|
| 4 | + |
|---|
| 3 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; |
|---|
| 4 | 6 | import com.fasterxml.jackson.annotation.JsonValue; |
|---|
| 5 | 7 | |
|---|
| .. | .. |
|---|
| 9 | 11 | * |
|---|
| 10 | 12 | * @author rob |
|---|
| 11 | 13 | */ |
|---|
| 12 | | -public enum PackStatus { |
|---|
| 14 | +public enum PackStatus implements CodedEnum { |
|---|
| 13 | 15 | CREATED("CR"), ACTIVE("AC"), ON_HOLD("OH"), EXPIRED("EX"), CANCELLED("CA"); |
|---|
| 14 | 16 | |
|---|
| 15 | 17 | private final String code; |
|---|
| .. | .. |
|---|
| 18 | 20 | this.code = code; |
|---|
| 19 | 21 | } |
|---|
| 20 | 22 | |
|---|
| 23 | + @Override |
|---|
| 21 | 24 | public String getCode() { |
|---|
| 22 | 25 | return code; |
|---|
| 23 | 26 | } |
|---|
| .. | .. |
|---|
| 34 | 37 | |
|---|
| 35 | 38 | @JsonValue |
|---|
| 36 | 39 | public String getName() { |
|---|
| 37 | | - |
|---|
| 38 | 40 | return this.code; |
|---|
| 39 | 41 | } |
|---|
| 42 | + |
|---|
| 40 | 43 | } |
|---|