public static void templateChild(
      FormInstance dm, String prefixPath, TreeReference parent, Restorable r) {
    TreeReference childRef =
        (prefixPath == null ? parent : RestoreUtils.childRef(prefixPath, parent));
    childRef = childRef(r.getRestorableType(), childRef);

    templateData(r, dm, childRef);
  }
  public static FormInstance createDataModel(Restorable r) {
    FormInstance dm = newDataModel(r.getRestorableType());

    if (r instanceof Persistable) {
      addData(dm, RECORD_ID_TAG, new Integer(((Persistable) r).getID()));
    }

    return dm;
  }