Package org.jdbi.v3.sqlobject.internal
Class SqlAnnotations
- java.lang.Object
-
- org.jdbi.v3.sqlobject.internal.SqlAnnotations
-
public class SqlAnnotations extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<String>getAnnotationValue(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 Optional<String>getAnnotationValue(Method method, Function<String,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 Optional<String> getAnnotationValue(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 Optional<String> getAnnotationValue(Method method, Function<String,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()
-
-