Here is my stripped down class and enum.
class A { @Enumerated (value = EnumType.STRING) AType type; } enum AType { X,Y }
if I
query.setParameterList("types", types); ^--
This should do it.
query.setParameterList("types", types);