public void delete(Class<?> entityType, WhereBuilder whereBuilder) throws DbException { if (!tableIsExist(entityType)) return; try { beginTransaction(); execNonQuery(SqlInfoBuilder.buildDeleteSqlInfo(this, entityType, whereBuilder)); setTransactionSuccessful(); } finally { endTransaction(); } }
public void delete(Object entity) throws DbException { if (!tableIsExist(entity.getClass())) return; try { beginTransaction(); execNonQuery(SqlInfoBuilder.buildDeleteSqlInfo(this, entity)); setTransactionSuccessful(); } finally { endTransaction(); } }
public void deleteAll(List<?> entities) throws DbException { if (entities == null || entities.size() == 0 || !tableIsExist(entities.get(0).getClass())) return; try { beginTransaction(); for (Object entity : entities) { execNonQuery(SqlInfoBuilder.buildDeleteSqlInfo(this, entity)); } setTransactionSuccessful(); } finally { endTransaction(); } }