com.ibm.pdq.annotation
Annotation Type Select
@Target(value=METHOD) @Retention(value=RUNTIME) public @interface SelectUsed in an interface to indicate to the pureQuery Generator that the annotated declared method executes an SQL SELECT statement. The SQL statement can be specified in the
@Select
annotation, and it must return a single
ResultSet
. See the pureQuery Runtime documentation for details on how SQL statements can
be specified for annotated methods. When the pureQuery Generator is invoked for an interface, it generates an
implementation class for the interface. The generated version of a method that is annotated with
@Select
executes the specified SQL SELECT statement. Optional Element Summary
Modifier and Type | Optional Element and Description |
---|---|
pattern
For future enhancement.
|
|
sql
Indicates the SQL SELECT statement to execute when the implemented version of the annotated method is invoked.
|
|
value
Indicates the SQL SELECT statement to execute when the implemented version of the annotated method is invoked.
|
Optional Element Detail
pattern
public abstract String pattern
For future enhancement.
Default:
""
sql
public abstract String sql
Indicates the SQL SELECT statement to execute when the implemented version of the annotated method is invoked. For
database queries, the SQL statement must be executable by the target database. For queries over collections, the
syntax must conform to the SQL92 standard syntax, with pureQuery extensions.
Default:
""
value
public abstract String value
Indicates the SQL SELECT statement to execute when the implemented version of the annotated method is invoked. For
database queries, the SQL statement must be executable by the target database. For queries over collections, the
syntax must conform to the SQL92 standard syntax, with pureQuery extensions.
Note: value=
does not need to be provided explicitly. For example, the SQL statement can be
specified as: @Select("SELECT * FROM DEPARTMENT")
.
Default:
""