package cn.estsh.i3plus.pojo.aps.validator;

import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.aps.common.BeanInfo;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class MainKeyValidator implements ConstraintValidator<MainKey, BaseBean> {
    @Override
    public boolean isValid(BaseBean bean, ConstraintValidatorContext constraintValidatorContext) {
        return BeanInfo.getMainKeyValidator().isValid(bean);
    }
}
