Code example for Collection

Methods: isEmpty

0
        TableUtils.dropTable(getConnectionSource(), clazz, true);
        TableUtils.createTableIfNotExists(getConnectionSource(), clazz);
    } 
 
    public <T> void deleteFromDataBase(Collection<T> objectList, Class<T> modelObjectClass) throws SQLException {
        if (objectList != null && !objectList.isEmpty()) {
            Dao<T, ?> dao = getDao(modelObjectClass);
            dao.delete(objectList);
        } 
    } 
 
    public <T> void createInDatabaseIfNotExist(T modelObject, Class<T> modelObjectClass) throws SQLException {
        if (modelObject != null) {
            Dao<T, ?> dao = getDao(modelObjectClass);
            dao.createIfNotExists(modelObject);
        } 
    } 
 
    public <T> void deleteFromDataBase(T modelObject, Class<T> modelObjectClass) throws SQLException {
        if (modelObject != null) {
            Dao<T, ?> dao = getDao(modelObjectClass);