io.polaris.builder.code.config.CodeTableBuilder Maven / Gradle / Ivy
package io.polaris.builder.code.config;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Supplier;
/**
* @author Qt
* @since 1.8
*/
public class CodeTableBuilder {
private final CodeGroupBuilder groupBuilder;
private final CodeTable target;
public CodeTableBuilder(CodeGroupBuilder groupBuilder, CodeTable target) {
this.groupBuilder = groupBuilder;
this.target = target;
}
public CodeTable build() {
return target;
}
public CodeGroupBuilder end() {
return groupBuilder;
}
public CodeTableBuilder name(String name) {
target.setName(name);
return this;
}
public CodeTableBuilder catalog(String catalog) {
target.setCatalog(catalog);
return this;
}
public CodeTableBuilder schema(String schema) {
target.setSchema(schema);
return this;
}
public CodeTableBuilder javaPackage(String javaPackage) {
target.setJavaPackage(javaPackage);
return this;
}
public CodeTableBuilder property(Map property) {
target.setProperty(property);
return this;
}
public CodeTableBuilder property(Supplier