List of usage examples for org.hibernate Session getTypeHelper
TypeHelper getTypeHelper();
From source file:fi.vm.sade.eperusteet.repository.custom.TekstiPalanenRepositoryCustomImpl.java
License:EUPL
protected <E extends Enum<E>> Type enumType(Session session, Class<E> e) { Properties params = new Properties(); params.put("enumClass", e.getCanonicalName()); params.put("type", "12");/*type 12 instructs to use the String representation of enum value*/ return session.getTypeHelper().custom(EnumType.class, params); }