@Override
    public void writePortable(PortableWriter writer) throws IOException {
        if(dateProperty != null) {
            writer.writeLong("dateProperty", dateProperty.getTime());
        }
        if(intProperty != null) {
            writer.writeInt("intProperty", intProperty);
        }
        if(longProperty != null) {
            writer.writeLong("longProperty", longProperty);
        }
        if(doubleProperty != null) {
            writer.writeDouble("doubleProperty", doubleProperty);
        }
        if(stringProperty != null) {
            writer.writeUTF("stringProperty", stringProperty);
            writer.writeBoolean("_has__stringProperty", true);
        }
        if(booleanProperty != null) {
            writer.writeBoolean("booleanProperty", booleanProperty);
        }
        if(nestedProperty != null) {
            writer.writePortable("nestedProperty", nestedProperty);
            writer.writeBoolean("_has__nestedProperty", true);
        }
        if(listProperty != null && !listProperty.isEmpty()) {
            writer.writePortableArray("listProperty", listProperty.toArray(new Portable[listProperty.size()]));
            writer.writeBoolean("_has__nestedProperty", true);
        }
    }