How to create an enum entity type in Olingo OData V4 java API
<p>I have created an enumeration:</p>

<pre><code>public enum ROLECATEGORY {
    LOW ("Low Risk", 0),
    MEDIUM ("Medium Risk", 1),

    public final String attrname;
    public final int value;

    ROLECATEGORY(String attrname, int value) {
        this.attrname = attrname;
        this.value = value;
    }
    public static ROLECATEGORY valueOf(int val){
        switch(val){
        case 0: return LOW; 
        case 1: return MEDIUM;
        default: throw new IllegalArgumentException("blablabla");
        }
    }
    public int toInt() { return value; }
}
</code></pre>

<p>According to the starter tutorial I've created the normal ODataProvider Class. All I'm missing is a peace of code to get the enum as FQDN type for the property  instantiation:</p>

<pre><code>CsdlProperty p = new CsdlProperty().setName("MYENUM").setType( ?getEnumType("MYENUM")? )
</code></pre>