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.util.Collection;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.Nullable;
public class DatabaseTableImpl implements DatabaseTable {
private final String tableName;
public DatabaseTableImpl(String tableName) {
this.tableName = tableName;
}
@Override
public DatabaseListableQueryBuilder unordered() {
return new DatabaseTableQueryBuilder(this);
}
@Override
public DatabaseListableQueryBuilder orderBy(String orderByClause) {
return query().orderBy(orderByClause);
}
@Override
public DatabaseTableAlias alias(String alias) {
return new DatabaseTableAlias(tableName, alias);
}
@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 whereOptional(String fieldName, @Nullable Object value) {
return query().whereOptional(fieldName, value);
}
@Override
public DatabaseSimpleQueryBuilder whereExpression(String expression) {
return query().whereExpression(expression);
}
@Override
public DatabaseSimpleQueryBuilder whereExpression(String expression, Object parameter) {
return query().whereExpression(expression, parameter);
}
public DatabaseSimpleQueryBuilder whereExpressionWithMultipleParameters(String expression, Collection> parameters){
return query().whereExpressionWithMultipleParameters(expression, parameters);
}
@Override
public DatabaseSimpleQueryBuilder whereAll(List fields, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy