@Retention(value=RUNTIME) @Target(value=METHOD) @Documented public @interface Query
NamedParameterJdbcTemplate
. Those
parameters will get bound to the arguments of the annotated method.Modifier and Type | Optional Element and Description |
---|---|
String |
name
The named query to be used.
|
Class<? extends ResultSetExtractor> |
resultSetExtractorClass
Optional
ResultSetExtractor to use to convert the result of the query to domain class instances. |
Class<? extends RowMapper> |
rowMapperClass
Optional
RowMapper to use to convert the result of the query to domain class instances. |
String |
value
The SQL statement to execute when the annotated method gets invoked.
|
public abstract String value
public abstract String name
${domainClass}.${queryMethodName}
will be used.public abstract Class<? extends RowMapper> rowMapperClass
RowMapper
to use to convert the result of the query to domain class instances. Cannot be used
along with resultSetExtractorClass()
only one of the two can be set.public abstract Class<? extends ResultSetExtractor> resultSetExtractorClass
ResultSetExtractor
to use to convert the result of the query to domain class instances. Cannot be
used along with rowMapperClass()
only one of the two can be set.Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.