/** {@inheritDoc} */ @Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { final String name = ConversionHelp.getPropertyName(reader, context); if (name == null) { return null; } LongProperty prop = new LongProperty(name, Long.parseLong(reader.getValue())); return prop; }
/** {@inheritDoc} */ @Override public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext arg2) { LongProperty prop = (LongProperty) obj; writer.addAttribute(ConversionHelp.ATT_NAME, ConversionHelp.encode(prop.getName())); writer.setValue(prop.getStringValue()); }