|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface Delete
Defines a delete method. Delete methods normally use SQL delete statements.
@Delete(sql = "delete from person where id = {%1}")
void deletePerson(int id);
{%1} defines a parameter mapping to the primitive type parameter id
If the return parameter of the delete method is int or int[] for collections
then the implementation of the method will return the delete count for each SQL delete statement:
@Delete(sql = "delete from person where id = {%1}")
int[] deletePersons(List<Integer> ids);
SqlParser| Required Element Summary | |
|---|---|
String |
sql
This is the SQL statement. |
| Element Detail |
|---|
public abstract String sql
SqlParser
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||