Package org.jdbi.v3.sqlobject.internal
Class SqlAnnotations
java.lang.Object
org.jdbi.v3.sqlobject.internal.SqlAnnotations
-
Method Summary
Modifier and TypeMethodDescriptiongetAnnotationValue(Method method) Returns thevalue()of the@SqlBatch,@SqlCall,@SqlQuery,@SqlUpdate,@SqlScripts, or@SqlScriptannotation on the given method if declared and non-empty; empty otherwise.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 Details
-
getAnnotationValue
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()
-