Class NotEmptyPredicateGenerator

java.lang.Object
nl.datasteel.crudcraft.codegen.writer.search.AbstractPredicateGenerator
nl.datasteel.crudcraft.codegen.writer.search.NotEmptyPredicateGenerator
All Implemented Interfaces:
PredicateGenerator

public class NotEmptyPredicateGenerator extends AbstractPredicateGenerator implements PredicateGenerator
Generates a predicate for the "not empty" search operator. This predicate checks if a field's value is not empty.
  • Constructor Details

    • NotEmptyPredicateGenerator

      public NotEmptyPredicateGenerator()
  • Method Details

    • generate

      public com.squareup.javapoet.CodeBlock generate(SearchField f)
      Constructs a NotEmptyPredicateGenerator.
      Specified by:
      generate in interface PredicateGenerator
      Parameters:
      f - the SearchField to generate the predicate for
      Returns:
      a JavaPoet CodeBlock with null-check, operator-check and cb.* call