org.fluentjdbc.DatabaseTableImpl 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 java.sql.Connection;
import java.util.List;
import java.util.UUID;
import javax.annotation.Nullable;
public class DatabaseTableImpl implements DatabaseTable {
private final String tableName;
public DatabaseTableImpl(String tableName) {
this.tableName = tableName;
}
@Override
public String getTableName() {
return tableName;
}
@Override
public DatabaseSaveBuilder newSaveBuilder(String idField, @Nullable Long id) {
return new DatabaseSaveBuilderWithLong(this, idField, id);
}
@Override
public DatabaseSaveBuilder newSaveBuilderNoGeneratedKeys(String idField, @Nullable Long id) {
return new DatabaseSaveBuilderWithoutGeneratedKeys(this, idField, id);
}
@Override
public DatabaseSaveBuilderWithUUID newSaveBuilderWithUUID(String idField, @Nullable UUID id) {
return new DatabaseSaveBuilderWithUUID(this, idField, id);
}
@Override
public DatabaseSimpleQueryBuilder where(String fieldName, @Nullable Object value) {
return new DatabaseQueryBuilder(this).where(fieldName, value);
}
@Override
public DatabaseSimpleQueryBuilder whereOptional(String fieldName, @Nullable Object value) {
return new DatabaseQueryBuilder(this).whereOptional(fieldName, value);
}
@Override
public DatabaseSimpleQueryBuilder whereIn(String fieldName, List> parameters) {
return new DatabaseQueryBuilder(this).whereIn(fieldName, parameters);
}
@Override
public DatabaseSimpleQueryBuilder whereExpression(String expression, Object parameter) {
return new DatabaseQueryBuilder(this).whereExpression(expression, parameter);
}
@Override
public List listObjects(Connection connection, RowMapper mapper) {
return new DatabaseQueryBuilder(this).list(connection, mapper);
}
@Override
public DatabaseSimpleQueryBuilder whereAll(List fieldNames, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy