package com.l7tech.server;

import com.l7tech.util.Functions.Binary;
import jakarta.persistence.criteria.Predicate;
import java.util.Map.Entry;

class al implements Binary<Predicate, Predicate, Object> {
   final Entry val$entry;
   final ak this$2;

   al(ak var1, Entry var2) {
      this.this$2 = var1;
      this.val$entry = var2;
   }

   public Predicate call(Predicate var1, Object var2) {
      if (var2 == HibernateEntityManager.NULL || var2 == null) {
         var1 = this.this$2
            .val$builder
            .or(var1, this.this$2.val$builder.isNull(HibernateEntityManager.expandNestedAttribute(this.this$2.val$root, (String)this.val$entry.getKey(), true)));
      } else if (var2 == HibernateEntityManager.NOTNULL) {
         var1 = this.this$2
            .val$builder
            .or(
               var1,
               this.this$2.val$builder.isNotNull(HibernateEntityManager.expandNestedAttribute(this.this$2.val$root, (String)this.val$entry.getKey(), true))
            );
      } else {
         var1 = this.this$2
            .val$builder
            .or(
               var1,
               this.this$2.val$builder.equal(HibernateEntityManager.expandNestedAttribute(this.this$2.val$root, (String)this.val$entry.getKey(), true), var2)
            );
      }

      return var1;
   }
}
