Package org.dalesbred.query
Interface VariableResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Resolves values for variables appearing in SQL queries with named parameters.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull VariableResolver
Returns aVariableResolver
that is backed by given bean.static @NotNull VariableResolver
Returns aVariableResolver
that is backed by given map.@Nullable Object
Returns the value of given variable, which could be null.
-
Method Details
-
getValue
Returns the value of given variable, which could be null.- Throws:
VariableResolutionException
- if resolution fails
-
forMap
Returns aVariableResolver
that is backed by given map. -
forBean
Returns aVariableResolver
that is backed by given bean. When variables are looked up, tries to find a matching getter or accessible field for the variable and returns its value.
-