Class ColumnRef.ColumnRefBuilder
java.lang.Object
com.github.tadukoo.database.mysql.syntax.reference.ColumnRef.ColumnRefBuilder
- All Implemented Interfaces:
ColumnRef.AliasOrBuild
,ColumnRef.Build
,ColumnRef.ColumnName
,ColumnRef.TableNameOrColumnName
- Enclosing class:
- ColumnRef
public static class ColumnRef.ColumnRefBuilder
extends Object
implements ColumnRef.TableNameOrColumnName, ColumnRef.ColumnName, ColumnRef.AliasOrBuild, ColumnRef.Build
A builder to use to build a
ColumnRef
. It takes the following parameters:
Parameter | Description | Required or Default |
---|---|---|
tableName | The name of the table the column is on | Defaults to null (no table name) |
columnName | The name of the column | Required |
alias | The alias to use for the column | Defaults to null (no alias) |
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
Not allowed to instantiate outside ColumnRef -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newColumnRef
using the set parametersprivate void
Checks for any errors in the set parameterscolumnName
(String columnName)
-
Field Details
-
tableName
The name of the table the column is on -
columnName
The name of the column -
alias
The alias to use for the column
-
-
Constructor Details
-
ColumnRefBuilder
private ColumnRefBuilder()Not allowed to instantiate outside ColumnRef
-
-
Method Details
-
tableName
- Specified by:
tableName
in interfaceColumnRef.TableNameOrColumnName
- Parameters:
tableName
- The name of the table the column is in- Returns:
- this, to continue building
-
tableRef
- Specified by:
tableRef
in interfaceColumnRef.TableNameOrColumnName
- Parameters:
tableRef
- TheTableRef
to use to get the table name the column is in- Returns:
- this, to continue building
-
columnName
- Specified by:
columnName
in interfaceColumnRef.ColumnName
- Parameters:
columnName
- The name of the column- Returns:
- this, to continue building
-
alias
- Specified by:
alias
in interfaceColumnRef.AliasOrBuild
- Parameters:
alias
- The alias to use for the column- Returns:
- this, to continue building
-
checkForErrors
private void checkForErrors()Checks for any errors in the set parameters -
build
Builds a newColumnRef
using the set parameters- Specified by:
build
in interfaceColumnRef.Build
- Returns:
- The newly built
ColumnRef
-