Class SizeEqualsPredicateGenerator
java.lang.Object
nl.datasteel.crudcraft.codegen.writer.search.AbstractPredicateGenerator
nl.datasteel.crudcraft.codegen.writer.search.SizeEqualsPredicateGenerator
- All Implemented Interfaces:
PredicateGenerator
public class SizeEqualsPredicateGenerator
extends AbstractPredicateGenerator
implements PredicateGenerator
Generates a predicate for checking if the size of a collection field
is equal to a specified value in a search request.
This is used to filter results based on the size of a collection property.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.CodeBlock
Generates a CodeBlock that checks if the search request's property has a size equal to a specified value.Methods inherited from class nl.datasteel.crudcraft.codegen.writer.search.AbstractPredicateGenerator
cap
-
Constructor Details
-
SizeEqualsPredicateGenerator
public SizeEqualsPredicateGenerator()
-
-
Method Details
-
generate
Generates a CodeBlock that checks if the search request's property has a size equal to a specified value.- Specified by:
generate
in interfacePredicateGenerator
- Parameters:
f
- the search field containing the property and operator information- Returns:
- a CodeBlock representing the predicate logic for the size equals condition
-