make Java 8 compiler happy

no idea why this is necessary
IdType introduced
cast to raw Class<Enum> added

Eclipse in Java 8 mode didn't accept previous code
return removed