HHH-8683 Caching enum constants to avoid memory allocation by repeated calls to getEnumConstants()
HHH-8683 Making EnumState a parameterized class, thus allowing to access its value more safely