package p2.application.datadeleteconfig;

import p2.pao.PaoSet;
import p2.util.P2AppException;
import p2.util.P2Exception;
import baseclass.PaoCust;

public class datadeleteconfig extends PaoCust {

	public datadeleteconfig(PaoSet arg0) {
		super(arg0);
	}

	@Override
	public void modify() throws P2Exception {
		// TODO Auto-generated method stub
		super.modify();
		getOwner().setValue("updateflag", getOwner().getInt("updateflag") + 1, 11L);
		
	}

	@Override
	public void add() throws P2Exception {
		super.add();
		setValue("objectname", getOwner().getString("objectname"));
	}

	@Override
	public void canDelete() throws P2Exception {
		super.canDelete();
		if ("DATADELETECONFIGHEAD".equals(getString("objectname"))) {
			throw new P2AppException("", "该条数据无法删除");
		}
	}

}
