org.fluentjdbc.DatabaseTable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-jdbc Show documentation
Show all versions of fluent-jdbc Show documentation
A Java library used to execute JDBC statements and build SQL
package org.fluentjdbc;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import java.sql.SQLException;
import java.util.List;
import java.util.UUID;
import java.util.stream.Stream;
@ParametersAreNonnullByDefault
public interface DatabaseTable extends DatabaseQueriable {
DatabaseListableQueryBuilder unordered();
DatabaseListableQueryBuilder orderBy(String orderByClause);
DatabaseTableAlias alias(String alias);
@FunctionalInterface
interface RowMapper {
T mapRow(DatabaseRow row) throws SQLException;
}
@FunctionalInterface
interface RowConsumer {
void apply(DatabaseRow row) throws SQLException;
}
String getTableName();
DatabaseSaveBuilder newSaveBuilder(String idColumn, @Nullable Long idValue);
/**
* Use instead of {@link #newSaveBuilder} if the database driver does not
* support RETURN_GENERATED_KEYS
*/
DatabaseSaveBuilder newSaveBuilderNoGeneratedKeys(String idColumn, @Nullable Long idValue);
DatabaseSaveBuilder newSaveBuilderWithUUID(String fieldName, @Nullable UUID uuid);
DatabaseInsertBuilder insert();
DatabaseUpdateBuilder update();
DatabaseBulkInsertBuilder bulkInsert(Iterable objects);
DatabaseBulkInsertBuilder bulkInsert(Stream objects);
DatabaseBulkDeleteBuilder bulkDelete(Iterable objects);
DatabaseBulkUpdateBuilder bulkUpdate(List objects);
DatabaseDeleteBuilder delete();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy