de.jaggl.sqlbuilder.columns.ColumnBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqlbuilder-core Show documentation
Show all versions of sqlbuilder-core Show documentation
A Java-Library to build SQL-Statements
package de.jaggl.sqlbuilder.columns;
import static de.jaggl.sqlbuilder.schema.TableBuilderUtil.addColumnToTable;
import de.jaggl.sqlbuilder.schema.Table;
import lombok.AllArgsConstructor;
/**
* @author Martin Schumacher
*
* @since 2.0.0
*/
@AllArgsConstructor
public abstract class ColumnBuilder
{
protected final Table table;
protected final String name;
protected abstract T getColumnInstance();
public T build()
{
T columnInstance = getColumnInstance();
addColumnToTable(columnInstance, table);
return columnInstance;
}
}