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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.CodeBlock
Constructs a NotEmptyPredicateGenerator.Methods inherited from class nl.datasteel.crudcraft.codegen.writer.search.AbstractPredicateGenerator
cap
-
Constructor Details
-
NotEmptyPredicateGenerator
public NotEmptyPredicateGenerator()
-
-
Method Details
-
generate
Constructs a NotEmptyPredicateGenerator.- Specified by:
generate
in interfacePredicateGenerator
- Parameters:
f
- the SearchField to generate the predicate for- Returns:
- a JavaPoet CodeBlock with null-check, operator-check and cb.* call
-