org.sql.generation.api.grammar.factories
Interface ColumnsFactory


public interface ColumnsFactory

A factory to create various expressions related to columns. This factory is obtainable from SQLVendor.

Author:
Stanislav Muhametsin
See Also:
SQLVendor

Method Summary
 ColumnReferenceByExpression colExp(ValueExpression expression)
          Creates column reference, which has value of some expression.
 ColumnReferenceByName colName(String colName)
           Creates column reference, which references column by name, without table name.
 ColumnReferenceByName colName(String tableName, String colName)
          Creates column reference, which reference column by its name and by name of table, to which it belongs.
 ColumnNameList colNames(List<String> names)
          Constructs new ColumnNameList using specified column names.
 ColumnNameList colNames(String... names)
          Constructs new ColumnNameList.
 

Method Detail

colExp

ColumnReferenceByExpression colExp(ValueExpression expression)
Creates column reference, which has value of some expression.

Parameters:
expression - The expression for the column.
Returns:
The new ColumnReferenceByExpression.

colName

ColumnReferenceByName colName(String colName)

Creates column reference, which references column by name, without table name.

Calling this method is equivalent in calling colName(String, String) and passing null as first argument.

Parameters:
colName - The name of the column.
Returns:
The new ColumnReferenceByName.

colName

ColumnReferenceByName colName(String tableName,
                              String colName)
Creates column reference, which reference column by its name and by name of table, to which it belongs.

Parameters:
tableName - The name of the table. May be null.
colName - The name of the column.
Returns:
The new ColumnReferenceByName.

colNames

ColumnNameList colNames(String... names)
Constructs new ColumnNameList.

Parameters:
names - The column names. At least one element must be present.
Returns:
The new ColumnNameList.

colNames

ColumnNameList colNames(List<String> names)
Constructs new ColumnNameList using specified column names. A new copy of List will be allocated for the ColumnNameList.

Parameters:
names - The column names. Must contain at least one name.
Returns:
The new ColumnNameList.


Copyright © 2010-2011. All Rights Reserved.