Class StartsWithPredicateGenerator
java.lang.Object
nl.datasteel.crudcraft.codegen.writer.search.AbstractPredicateGenerator
nl.datasteel.crudcraft.codegen.writer.search.StartsWithPredicateGenerator
- All Implemented Interfaces:
PredicateGenerator
public class StartsWithPredicateGenerator
extends AbstractPredicateGenerator
implements PredicateGenerator
Generates a predicate for checking if a string field starts with a given value.
This is used in search requests to filter results based on the starting characters
of a string property.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.CodeBlock
Generates a CodeBlock that checks if the search request's property starts with a specified value.Methods inherited from class nl.datasteel.crudcraft.codegen.writer.search.AbstractPredicateGenerator
cap
-
Constructor Details
-
StartsWithPredicateGenerator
public StartsWithPredicateGenerator()
-
-
Method Details
-
generate
Generates a CodeBlock that checks if the search request's property starts with 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 starts with condition
-