Indicates a batch delete.
The annotated method must be a member of a Dao annotated interface.
@Entity
public class Employee {
...
}
@Dao
public interface EmployeeDao {
@BatchDelete
int[] delete(List<Employee> employee);
}
The method may throw following exceptions:
DomaNullPointerExceptionif any of the method parameters arenullOptimisticLockExceptionif optimistic locking is enabled and an update count is 0 for each entitySqlFileNotFoundExceptionifsqlFileistrueand the SQL file is not foundJdbcExceptionif a JDBC related error occurs
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintThe batch size.booleanWhether the version property is ignored.intThe query timeout in seconds.booleanbooleanWhetherOptimisticLockExceptionis suppressed.
-
Element Details
-
sqlFile
boolean sqlFile- Returns:
- whether the annotated method is mapped to an SQL file.
- Default:
- false
-
queryTimeout
int queryTimeoutThe query timeout in seconds.If not specified,
Config.getQueryTimeout()is used.- Returns:
- the query timeout
- See Also:
- Default:
- -1
-
batchSize
int batchSizeThe batch size.If not specified,
Config.getBatchSize()is used.This value is used when
Statement.executeBatch()is executed.- Returns:
- the batch size
- See Also:
- Default:
- -1
-
ignoreVersion
boolean ignoreVersionWhether 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 suppressOptimisticLockExceptionWhetherOptimisticLockExceptionis suppressed.Only if
sqlFile()isfalse, this element value is used.- Returns:
- whether
OptimisticLockExceptionis suppressed
- Default:
- false
-
sqlLog
SqlLogType sqlLog- Returns:
- the output format of SQL logs.
- Default:
- FORMATTED
-