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