void store(Connection connection, ValueList list) {
        list.append(types.size());
        ValueList nestedList = connection.createList();
        for (String eName : types.keySet()) {
            ElementType type = types.get(eName);
            list.append(eName);
            list.append(type.type);
            DocumentType nested = type.nestedType;
            if (nested != null) {
                nestedList.clear();
                nested.store(connection,nestedList);
                list.append(nestedList);
            }
            String ref = type.reference;
            if (ref != null) {
                list.append(ref);
                list.append(type.referenceKey);
            }
        }
    }