com.dmj.sqldsl.builder.column.AliasColumnBuilder Maven / Gradle / Ivy
package com.dmj.sqldsl.builder.column;
import com.dmj.sqldsl.builder.column.type.LambdaType;
import com.dmj.sqldsl.builder.config.EntityConfig;
import com.dmj.sqldsl.model.column.AliasColumn;
import com.dmj.sqldsl.model.column.Column;
public class AliasColumnBuilder implements ColumnBuilder {
private ColumnBuilder, ?> columnBuilder;
private LambdaType alias;
@Override
public Column build(EntityConfig config) {
return new AliasColumn(columnBuilder.build(config), config.translateLambda(alias));
}
public AliasColumnBuilder(final ColumnBuilder, ?> columnBuilder, final LambdaType alias) {
this.columnBuilder = columnBuilder;
this.alias = alias;
}
}