package p2.application.tfieldhide;

import p2.application.condition.ConditionDefRemote;
import p2.common.condition.ConditionInterface;
import p2.p2server.P2Server;
import p2.pao.PaoRemote;
import p2.pao.PaoSetRemote;
import p2.util.P2Exception;

public class IsHideField implements ConditionInterface {
	public IsHideField(ConditionDefRemote paramConditionDefRemote) throws P2Exception {
	}

	@Override
	public boolean evaluateCondition(PaoRemote arg0) throws P2Exception {
		PaoSetRemote TFIELDHIDE_HRID_VIEW = P2Server.getP2Server().getPaoSet("TFIELDHIDE_HRID_VIEW",
				arg0.getUserInfo());
		TFIELDHIDE_HRID_VIEW.setWhere("objectname='" + arg0.getName() + "' and hrid='" + arg0.getUserName() + "'");
		TFIELDHIDE_HRID_VIEW.reset();
        return TFIELDHIDE_HRID_VIEW.count() <= 0;
	}

	@Override
	public String getConditionName() {
		return null;
	}

	@Override
	public String getConditionType() {
		return null;
	}

}
