public static interface DataEntity.Role
Data entity roles are supposed to be enums, but to ensure type safety, we have to have different enums for
different entity types. I.e. resources can only have data of roles from the
Resources.DataRole enum and resource types only from
ResourceTypes.DataRole enum. To achieve this, the DataEntity class
works with instances of this interface (which all the individual enums have to implement) and these enums have
to be "registered" in the private class of data entity - RoleInstanceHolder. Because our data model is
not extensible this is easily achieved.
| Modifier and Type | Method and Description |
|---|---|
String |
name() |
static DataEntity.Role |
valueOf(String name) |
static DataEntity.Role[] |
values() |
static DataEntity.Role valueOf(String name)
static DataEntity.Role[] values()
String name()
Copyright © 2015 Red Hat, Inc.. All rights reserved.