package net.qiujuer.powerback.ankey.model.xml;

/**
 * Created by qiujuer
 * on 15/10/19.
 */
public class UserModel {
}

@@ -45,77 +45,1555 @@
 l;%0A%0A
-/**%0A * Created by qiujuer%0A * on 15/10/19.%0A */%0Apublic class UserModel %7B
+import android.content.SharedPreferences;%0A%0Aimport net.qiujuer.powerback.ankey.model.Model;%0A%0Aimport java.util.UUID;%0A%0A/**%0A * Created by qiujuer%0A * on 15/10/19.%0A */%0Apublic class UserModel extends XmlPreference %7B%0A    private UUID id = Model.EMPTY_ID;%0A    private String name;%0A    private String taken;%0A    private String key;%0A%0A%0A    @Override%0A    protected void refresh(SharedPreferences sp) %7B%0A        id = UUID.fromString(sp.getString(%22id%22, id.toString()));%0A        name = sp.getString(%22name%22, name);%0A        taken = sp.getString(%22taken%22, taken);%0A        key = sp.getString(%22key%22, key);%0A    %7D%0A%0A    @Override%0A    protected String getPreferenceName() %7B%0A        return SettingModel.class.getName();%0A    %7D%0A%0A    @Override%0A    public void save() %7B%0A        SharedPreferences sp = getSharedPreferences();%0A        SharedPreferences.Editor editor = sp.edit();%0A%0A        editor.putString(%22id%22, id.toString());%0A        editor.putString(%22name%22, name);%0A        editor.putString(%22taken%22, taken);%0A        editor.putString(%22key%22, key);%0A%0A        editor.apply();%0A    %7D%0A%0A    public void setId(UUID id) %7B%0A        this.id = id;%0A    %7D%0A%0A    public void setKey(String key) %7B%0A        this.key = key;%0A    %7D%0A%0A    public void setName(String name) %7B%0A        this.name = name;%0A    %7D%0A%0A    public void setTaken(String taken) %7B%0A        this.taken = taken;%0A    %7D%0A%0A    public UUID getId() %7B%0A        return id;%0A    %7D%0A%0A    public String getKey() %7B%0A        return key;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public String getTaken() %7B%0A        return taken;%0A    %7D
 %0A%7D%0A

Add UserModel logic