Annotation Interface Delete


@Target(METHOD) @Retention(RUNTIME) public @interface Delete
Indicates a delete operation.

The annotated method must be a member of a Dao annotated interface.

 @Entity
 public class Employee {
     ...
 }

 @Dao
 public interface EmployeeDao {

     @Delete
     int delete(Employee employee);
 }
 
The method may throw following exceptions:
  • Element Details

    • sqlFile

      boolean sqlFile
      Returns:
      whether the annotated method should be mapped to an SQL file.
      Default:
      false
    • queryTimeout

      int queryTimeout
      The query timeout in seconds.

      If not specified, Config.getQueryTimeout() is used.

      Returns:
      the query timeout
      See Also:
      Default:
      -1
    • ignoreVersion

      boolean ignoreVersion
      Whether the version property is ignored.

      If true, the column that mapped to the version property is excluded from SQL DELETE statements.

      Returns:
      whether the version property is ignored
      Default:
      false
    • suppressOptimisticLockException

      boolean suppressOptimisticLockException
      Whether OptimisticLockException is suppressed.

      Only if sqlFile() is false, this value is used.

      Returns:
      whether OptimisticLockException is suppressed
      Default:
      false
    • sqlLog

      SqlLogType sqlLog
      Returns:
      the output format to be used for SQL logs when this delete operation is executed.
      Default:
      FORMATTED
    • returning

      Returning returning
      Returns:
      the Returning annotation configuration, which defines inclusions or exclusions for returning values.
      Default:
      @org.seasar.doma.Returning