io.github.mmm.orm.spi.access.DbUpdateAccess Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mmm-orm-spi Show documentation
Show all versions of mmm-orm-spi Show documentation
Service Provider API (SPI) for mmm-orm.
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package io.github.mmm.orm.spi.access;
import io.github.mmm.entity.bean.EntityBean;
import io.github.mmm.orm.statement.update.UpdateStatement;
/**
* Interface providing support for {@link #update(UpdateStatement)}.
*/
public interface DbUpdateAccess {
/**
* @param statement the {@link UpdateStatement} to execute.
* @return the number of records that have been deleted.
*/
long update(UpdateStatement> statement);
/**
* @param entity the {@link EntityBean} to update.
*/
void update(EntityBean entity);
/**
* @param entities the {@link EntityBean}s to update as batch operation.
*/
default void updateAll(EntityBean... entities) {
for (EntityBean entity : entities) {
update(entity);
}
}
}