Class RangePredicateGenerator
java.lang.Object
nl.datasteel.crudcraft.codegen.writer.search.AbstractPredicateGenerator
nl.datasteel.crudcraft.codegen.writer.search.RangePredicateGenerator
- All Implemented Interfaces:
PredicateGenerator
public class RangePredicateGenerator
extends AbstractPredicateGenerator
implements PredicateGenerator
Generates a predicate for checking if a field's value falls within a specified range
in a search request. This is used to filter results based on a range of values for a 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 range defined by start and end values.Methods inherited from class nl.datasteel.crudcraft.codegen.writer.search.AbstractPredicateGenerator
cap
-
Constructor Details
-
RangePredicateGenerator
public RangePredicateGenerator()
-
-
Method Details
-
generate
Generates a CodeBlock that checks if the search request's property has a range defined by start and end values.- 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 range condition
-