com.scalar.db.sql.statement.builder.TruncateTableStatementBuilder Maven / Gradle / Ivy
package com.scalar.db.sql.statement.builder;
import com.scalar.db.sql.TableRef;
import com.scalar.db.sql.statement.TruncateTableStatement;
import javax.annotation.Nullable;
public class TruncateTableStatementBuilder {
private TruncateTableStatementBuilder() {}
public static class Start extends Buildable {
Start(@Nullable String namespaceName, String tableName) {
super(namespaceName, tableName);
}
}
public static class Buildable {
@Nullable private final String namespaceName;
private final String tableName;
private Buildable(@Nullable String namespaceName, String tableName) {
this.namespaceName = namespaceName;
this.tableName = tableName;
}
/**
* Builds a TruncateTableStatement object.
*
* @return a TruncateTableStatement object
*/
public TruncateTableStatement build() {
return TruncateTableStatement.create(TableRef.of(namespaceName, tableName));
}
}
}