-
@Retention(RUNTIME) @Target(METHOD) public @interface SqlParameter
Identifies a method the result of which will be bound to a parameter in a SQL statement when an instance of the containing type is passed toParameterizedOperation.set(java.lang.String, java.lang.Object, jdk.incubator.sql2.SqlType)
. The following pseudo-code describes how an instance is used to set parameter values:<pre> for (Method getter : annotatedMethods) { Annotation parameter = getter.getAnnotation(SqlParameter.class); op.set(prefix + parameter.marker(), method.invoke(instance), parameter.sqlType()); }</pre>
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
marker
The marker for SQL parameter that the result of this method will be bound to.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
sqlType
The SQL type of the value bound to the parameter.
-
-
-
-
sqlType
java.lang.String sqlType
The SQL type of the value bound to the parameter. Must be either the name of an enum inSqlType
or the fully qualified name of a constantSqlType
, for example an enum that implements that interface.- Returns:
- the name of the SQL type of the value bound to the parameter
- Default:
- "<default>"
-
-