de.jaggl.sqlbuilder.columns.string.VarCharColumnBuilder 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.string;
import de.jaggl.sqlbuilder.columns.ColumnDefinition;
import de.jaggl.sqlbuilder.domain.IntSize;
import de.jaggl.sqlbuilder.schema.Table;
/**
* @author Martin Schumacher
*
* @since 2.0.0
*/
public class VarCharColumnBuilder extends StringColumnBuilder
{
private IntSize size;
public VarCharColumnBuilder(Table table, String name)
{
super(table, name);
}
public VarCharColumnBuilder size(int value)
{
size = IntSize.valueOf(Integer.valueOf(value));
return this;
}
public VarCharColumnBuilder size(Integer value)
{
size = IntSize.valueOf(value);
return this;
}
@Override
protected VarCharColumn getColumnInstance()
{
return new VarCharColumn(table, name, null, new ColumnDefinition("VARCHAR", size, isNullable, isDefaultNull, false, false, defaultValue));
}
}