@Test public void serialize() { Assert.assertNull(datatype.serialize(null)); Assert.assertThat(datatype.serialize(null), is(nullValue())); Assert.assertThat(datatype.serialize(Context.getLocationService().getLocation(2)), is("2")); }
@Override public String serialize(Location typedValue) { if (typedValue == null) { return null; } return typedValue.getLocationId().toString(); }
LocationDatatype extends SerializingCustomDatatype<Location> { @Override public String serialize(Location typedValue) { if (typedValue == null) { return null; } return typedValue.getLocationId().toString(); } }
LocationDatatype extends SerializingCustomDatatype<Location> { @Override public String serialize(Location typedValue) { if (typedValue == null) { return null; } return typedValue.getLocationId().toString(); }  }
LocationDatatype extends SerializingCustomDatatype<Location> { @Override public String serialize(Location typedValue) { if (typedValue == null) { return null; } return typedValue.getLocationId().toString(); }  @Override Location deserialize(String serializedValue); @Override String serialize(Location typedValue); }
LocationDatatype extends SerializingCustomDatatype<Location> { @Override public String serialize(Location typedValue) { if (typedValue == null) { return null; } return typedValue.getLocationId().toString(); }  @Override Location deserialize(String serializedValue); @Override String serialize(Location typedValue);  }