sf logo

sf.qof
Annotation Type Delete


@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);
 

See Also:
SqlParser

Required Element Summary
 String sql
          This is the SQL statement.
 

Element Detail

sql

public abstract String sql
This is the SQL statement.

Returns:
SQL statement
See Also:
SqlParser

sf logo

Copyright © 2007 brunella ltd. All Rights Reserved.