@Test public void testToFacetValue() { EnumConverter converter = new EnumConverter(Gender.class); assertNull(converter.toFacetValue(null)); assertEquals(Gender.FEMALE, converter.toFacetValue("FEMALE")); }
@Override public Object toFacetValue(Object value) { if (value == null) { return null; } return Enum.valueOf(enumType, value.toString()); }
EnumConverter implements Converter { @Override public Object toFacetValue(Object value) { if (value == null) { return null; } return Enum.valueOf(enumType, value.toString()); } }
EnumConverter implements Converter { @Override public Object toFacetValue(Object value) { if (value == null) { return null; } return Enum.valueOf(enumType, value.toString()); } EnumConverter(Class<? extends Enum> enumType); }
EnumConverter implements Converter { @Override public Object toFacetValue(Object value) { if (value == null) { return null; } return Enum.valueOf(enumType, 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 toFacetValue(Object value) { if (value == null) { return null; } return Enum.valueOf(enumType, 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();  }