Class SqlAnnotations

java.lang.Object
org.jdbi.v3.sqlobject.internal.SqlAnnotations

public class SqlAnnotations extends Object
  • Method Details

    • getAnnotationValue

      public static Optional<String> getAnnotationValue(Method method)
      Returns the value() of the @SqlBatch, @SqlCall, @SqlQuery, @SqlUpdate, @SqlScripts, or @SqlScript annotation 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 the value() of the @SqlBatch, @SqlCall, @SqlQuery, @SqlUpdate, @SqlScripts, or @SqlScript annotation on the given method if declared; empty otherwise. Note: @SqlScripts values are mapped individually and concatenated with " ; ", hence the transformation parameter.
      Parameters:
      method - the method
      transformation - the String transformation (e.g. SQL lookup) to apply to the found value(s)
      Returns:
      the annotation value()