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.
 
 @FunctionalInterface public interface VariableResolverResolves values for variables appearing in SQL queries with named parameters.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static @NotNull VariableResolverforBean(@NotNull java.lang.Object object)Returns aVariableResolverthat is backed by given bean.static @NotNull VariableResolverforMap(@NotNull java.util.Map<java.lang.String,?> variables)Returns aVariableResolverthat is backed by given map.@Nullable java.lang.ObjectgetValue(@NotNull java.lang.String variable)Returns the value of given variable, which could be null.
 
- 
- 
- 
Method Detail- 
getValue@Nullable @Nullable java.lang.Object getValue(@NotNull @NotNull java.lang.String variable)Returns the value of given variable, which could be null.- Throws:
- VariableResolutionException- if resolution fails
 
 - 
forMap@NotNull static @NotNull VariableResolver forMap(@NotNull @NotNull java.util.Map<java.lang.String,?> variables) Returns aVariableResolverthat is backed by given map.
 - 
forBean@NotNull static @NotNull VariableResolver forBean(@NotNull @NotNull java.lang.Object object) Returns aVariableResolverthat 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.
 
- 
 
-