class ToBeValidatedFilter implements Filter {

    @Override
    public boolean filter(final Object datamodelObj) {
        if(datamodelObj instanceof DbLicense){

            if(toBeValidated){
                return ((DbLicense)datamodelObj).isApproved() == null;
            }
            else{
                return ((DbLicense)datamodelObj).isApproved() != null;
            }
        }

        return false;
    }

    public  ToBeValidatedFilter(final Boolean toBeValidated);

}