Package org.jdbi.v3.sqlobject.internal
Class SqlAnnotations
- java.lang.Object
-
- org.jdbi.v3.sqlobject.internal.SqlAnnotations
-
public class SqlAnnotations extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSqlAnnotations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Optional<java.lang.String>getAnnotationValue(java.lang.reflect.Method method)Returns thevalue()of the@SqlBatch,@SqlCall,@SqlQuery,@SqlUpdate,@SqlScripts, or@SqlScriptannotation on the given method if declared and non-empty; empty otherwise.static java.util.Optional<java.lang.String>getAnnotationValue(java.lang.reflect.Method method, java.util.function.Function<java.lang.String,java.lang.String> transformation)Returns thevalue()of the@SqlBatch,@SqlCall,@SqlQuery,@SqlUpdate,@SqlScripts, or@SqlScriptannotation on the given method if declared; empty otherwise.
-
-
-
Method Detail
-
getAnnotationValue
public static java.util.Optional<java.lang.String> getAnnotationValue(java.lang.reflect.Method method)
Returns thevalue()of the@SqlBatch,@SqlCall,@SqlQuery,@SqlUpdate,@SqlScripts, or@SqlScriptannotation on the given method if declared and non-empty; empty otherwise.- Parameters:
method- the method- Returns:
- the annotation
value()
-
getAnnotationValue
public static java.util.Optional<java.lang.String> getAnnotationValue(java.lang.reflect.Method method, java.util.function.Function<java.lang.String,java.lang.String> transformation)Returns thevalue()of the@SqlBatch,@SqlCall,@SqlQuery,@SqlUpdate,@SqlScripts, or@SqlScriptannotation on the given method if declared; empty otherwise. Note:@SqlScriptsvalues are mapped individually and concatenated with" ; ", hence the transformation parameter.- Parameters:
method- the methodtransformation- the String transformation (e.g. SQL lookup) to apply to the found value(s)- Returns:
- the annotation
value()
-
-