In play application I'm using "activate-framework". Enumerations I have to declare this way:
object State extends Enumeration {
case class State(value: Int) extends Val(value)
val OPEN = State(0)
val CLOSED = State(1)
}
Source: http://activate-framework.org/documentation/entity/
How can I get State from Int something like:
State.valueOf(1) <==== ??
In model I have a field state:
import model.State.State
case class Task(var name:String, var state:State)
it is State.State case class, how Can I convert Int to State.State class? When I do State(1) I receive State.Value not State.State class.