For IntelliJ IDEA,
Android Studio or Eclipse



@Override public Object nullSafeGet(final ResultSet rs, final String[] names, final Object owner) throws HibernateException, SQLException { Character c = CharacterType.INSTANCE.nullSafeGet(rs, names[0]); if (c == null) { return null; } for (NodeLabelSource type : NodeLabelSource.values()) { if (type.toString().equals(c.toString())) { return type; } } throw new HibernateException("Invalid value for NodeUserType: " + c); }
@Override public Object nullSafeGet(final ResultSet rs, final String[] names, final Object owner) throws HibernateException, SQLException { Character c = CharacterType.INSTANCE.nullSafeGet(rs, names[0]); if (c == null) { return null; } for (NodeType type : NodeType.values()) { if (type.toString().equals(c.toString())) { return type; } } throw new HibernateException("Invalid value for NodeUserType: " + c); }