class MysqlSerializer extends TableSerializer {

    public MysqlSerializer(HugeConfig config) {
        super(config);
    }

    @Override
    public MysqlBackendEntry newBackendEntry(HugeType type, Id id) {
        return new MysqlBackendEntry(type, id);
    }

    @Override
    protected TableBackendEntry newBackendEntry(TableBackendEntry.Row row) {
        return new MysqlBackendEntry(row);
    }

    @Override
    protected MysqlBackendEntry convertEntry(BackendEntry backendEntry) {
        if (!(backendEntry instanceof MysqlBackendEntry)) {
            throw new BackendException("Not supported by MysqlSerializer");
        }
        return (MysqlBackendEntry) backendEntry;
    }

    @Override
    protected Set<Object> parseIndexElemIds(TableBackendEntry entry) {
        Set<Object> elemIds = InsertionOrderUtil.newSet();
        elemIds.add(entry.column(HugeKeys.ELEMENT_IDS));
        for (TableBackendEntry.Row row : entry.subRows()) {
            elemIds.add(row.column(HugeKeys.ELEMENT_IDS));
        }
        return elemIds;
    }

    @Override
    protected Id toId(Number number) {
        return IdGenerator.of(number.longValue());
    }

    @Override
    protected Id[] toIdArray(Object object) {
        assert object instanceof String;
        String value = (String) object;
        Number[] values = JsonUtil.fromJson(value, Number[].class);
        Id[] ids = new Id[values.length];
        int i = 0;
        for (Number number : values) {
            ids[i++] = IdGenerator.of(number.longValue());
        }
        return ids;
    }

    @Override
    protected Object toLongSet(Collection<Id> ids) {
        return this.toLongList(ids);
    }

    @Override
    protected Object toLongList(Collection<Id> ids) {
        long[] values = new long[ids.size()];
        int i = 0;
        for (Id id : ids) {
            values[i++] = id.asLong();
        }
        return JsonUtil.toJson(values);
    }

    @Override
    protected void formatProperty(HugeProperty<?> prop,
                                  TableBackendEntry.Row row) {
        throw new BackendException("Not support updating single property " +
                                   "by MySQL");
    }

    @Override
    protected void formatProperties(HugeElement element,
                                    TableBackendEntry.Row row) {
        Map<Number, Object> properties = new HashMap<>();
        // Add all properties of a Vertex
        for (HugeProperty<?> prop : element.getProperties()) {
            Number key = prop.propertyKey().id().asLong();
            Object val = prop.value();
            properties.put(key, val);
        }
        row.column(HugeKeys.PROPERTIES, JsonUtil.toJson(properties));
    }

    @Override
    protected void parseProperties(HugeElement element,
                                   TableBackendEntry.Row row) {<FILL_FUNCTION_BODY>}

    @Override
    protected void writeUserdata(SchemaElement schema,
                                 TableBackendEntry entry) {
        assert entry instanceof MysqlBackendEntry;
        entry.column(HugeKeys.USER_DATA, JsonUtil.toJson(schema.userdata()));
    }

    @Override
    protected void readUserdata(SchemaElement schema,
                                TableBackendEntry entry) {
        assert entry instanceof MysqlBackendEntry;
        // Parse all user data of a schema element
        String json = entry.column(HugeKeys.USER_DATA);
        @SuppressWarnings("unchecked")
        Map<String, Object> userdata = JsonUtil.fromJson(json, Map.class);
        for (Map.Entry<String, Object> e : userdata.entrySet()) {
            schema.userdata(e.getKey(), e.getValue());
        }
    }

    @Override
    public BackendEntry writeOlapVertex(HugeVertex vertex) {
        throw new NotImplementedException("Unsupported writeOlapVertex()");
    }
}

        String properties = row.column(HugeKeys.PROPERTIES);
        // Query edge will wrapped by a vertex, whose properties is empty
        if (properties.isEmpty()) {
            return;
        }

        @SuppressWarnings("unchecked")
        Map<String, Object> props = JsonUtil.fromJson(properties, Map.class);
        for (Map.Entry<String, Object> prop : props.entrySet()) {
            /*
             * The key is string instead of int, because the key in json
             * must be string
             */
            Id pkeyId = this.toId(Long.valueOf(prop.getKey()));
            String colJson = JsonUtil.toJson(prop.getValue());
            this.parseProperty(pkeyId, colJson, element);
        }
    
<methods>public void <init>(HugeConfig) ,public org.apache.hugegraph.backend.serializer.TableBackendEntry newBackendEntry(org.apache.hugegraph.type.HugeType, org.apache.hugegraph.backend.id.Id) ,public org.apache.hugegraph.structure.HugeEdge readEdge(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.schema.EdgeLabel readEdgeLabel(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.structure.HugeIndex readIndex(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.query.ConditionQuery, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.schema.IndexLabel readIndexLabel(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.schema.PropertyKey readPropertyKey(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.structure.HugeVertex readVertex(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.schema.VertexLabel readVertexLabel(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.backend.store.BackendEntry writeEdge(org.apache.hugegraph.structure.HugeEdge) ,public org.apache.hugegraph.backend.store.BackendEntry writeEdgeLabel(org.apache.hugegraph.schema.EdgeLabel) ,public org.apache.hugegraph.backend.store.BackendEntry writeEdgeProperty(HugeEdgeProperty<?>) ,public org.apache.hugegraph.backend.store.BackendEntry writeId(org.apache.hugegraph.type.HugeType, org.apache.hugegraph.backend.id.Id) ,public org.apache.hugegraph.backend.store.BackendEntry writeIndex(org.apache.hugegraph.structure.HugeIndex) ,public org.apache.hugegraph.backend.store.BackendEntry writeIndexLabel(org.apache.hugegraph.schema.IndexLabel) ,public org.apache.hugegraph.backend.store.BackendEntry writePropertyKey(org.apache.hugegraph.schema.PropertyKey) ,public org.apache.hugegraph.backend.store.BackendEntry writeVertex(org.apache.hugegraph.structure.HugeVertex) ,public org.apache.hugegraph.backend.store.BackendEntry writeVertexLabel(org.apache.hugegraph.schema.VertexLabel) ,public org.apache.hugegraph.backend.store.BackendEntry writeVertexProperty(HugeVertexProperty<?>) <variables>