@Test public void testToColumnValue() { EnumConverter converter = new EnumConverter(Gender.class); assertNull(converter.toColumnValue(null)); assertEquals("MALE", converter.toColumnValue(Gender.MALE)); }
@Override public Object toColumnValue(Object value) { if (value == null) { return null; } return value.toString(); }
EnumConverter implements Converter { @Override public Object toColumnValue(Object value) { if (value == null) { return null; } return value.toString(); } }
EnumConverter implements Converter { @Override public Object toColumnValue(Object value) { if (value == null) { return null; } return value.toString(); } EnumConverter(Class<? extends Enum> enumType); }
EnumConverter implements Converter { @Override public Object toColumnValue(Object value) { if (value == null) { return null; } return value.toString(); } EnumConverter(Class<? extends Enum> enumType); @Override DataType getDataType(); @Override Class<?> getValueType(); @Override Object toColumnValue(Object value); @Override Object toFacetValue(Object value); Class<? extends Enum> getEnumType(); }
EnumConverter implements Converter { @Override public Object toColumnValue(Object value) { if (value == null) { return null; } return value.toString(); } EnumConverter(Class<? extends Enum> enumType); @Override DataType getDataType(); @Override Class<?> getValueType(); @Override Object toColumnValue(Object value); @Override Object toFacetValue(Object value); Class<? extends Enum> getEnumType();  }