package p2.application.twebclientappidauth;

import baseclass.PaoCust;
import p2.application.signature.P2Group;
import p2.pao.PaoSet;
import p2.util.P2Exception;

public class twebclientappidauth extends PaoCust {
    /**
     * ¹¹Ôìº¯Êý
     *
     * @param arg0
     */
    public twebclientappidauth(PaoSet arg0) {
        super(arg0);
    }

    @Override
    public void add() throws P2Exception {
        super.add();
        if (getOwner() instanceof P2Group) {
            setValue("groupname", getOwner().getString("groupname"), 11L);
        }
    }

    @Override
    protected void save() throws P2Exception {
        super.save();
        if ("".equals(getString("groupname"))) {
            setValue("id", getString("systemid") + "-" + getString("moduleid") + "-" + getString("appid"), 11L);
        }

    }
}
