public class ColumnImpl extends Object implements Column, Serializable
Constructor and Description |
---|
ColumnImpl(String sqlExpression)
Constructor which tries to guess schema, table and column names from
an SQL expression.
|
ColumnImpl(String tableName,
String columnName)
Constructor.
|
ColumnImpl(String schemaName,
String tableName,
String columnName)
Constructor.
|
ColumnImpl(String schemaName,
String tableName,
String columnName,
String sqlExpression)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getColumnName()
Returns the column name.
|
String |
getFullTableName()
Returns the table name prefixed with the schema name if it exists.
|
String |
getSchemaName()
Returns the name of any fixed schema prefix for the column's table
(if any).
|
String |
getSqlExpression()
Returns the SQL expression for the column, qualified by the
table name but not by the schema name.
|
String |
getTableName()
Returns the table name.
|
int |
hashCode() |
String |
toString() |
public ColumnImpl(String tableName, String columnName)
tableName
- the table name, not null or blank.columnName
- the column name, not null or blank.NullPointerException
- if columnName or tableName are null.IllegalArgumentException
- if columnName or tableName are blank.public ColumnImpl(String schemaName, String tableName, String columnName)
schemaName
- the schema name, may be null but not blank.tableName
- the table name, may be null but not blank.
If it contains a dot, then only the portion after the dot
will be taken as table name.
If it contains a dot and schemaName is null, then the schema
name will be set as the portion before the dot.columnName
- the column name, not null or blank.NullPointerException
- if columnName or tableName are null.IllegalArgumentException
- if columnName or tableName are blank.public ColumnImpl(String schemaName, String tableName, String columnName, String sqlExpression)
schemaName
- the schema name, may be null but not blank.tableName
- the table name, may be null but not blank.
If it contains a dot, then only the portion after the dot
will be taken as table name.
If it contains a dot and schemaName is null, then the schema
name will be set as the portion before the dot.columnName
- the column name, may be null but not blank.sqlExpression
- the SQL expression for the column,
not null or blank.NullPointerException
- if tableName or sqlExpression are null.IllegalArgumentException
- if tableName or sqlExpression are blank.public ColumnImpl(String sqlExpression)
sqlExpression
- the SQL expression, not null, not blank.NullPointerException
- if sqlExpression is null.IllegalArgumentException
- if table or column name cannot be
guessed from sqlExpression.public String getColumnName()
getColumnName
in interface Column
public String getTableName()
getTableName
in interface Column
public String getFullTableName()
getFullTableName
in interface Column
public String getSchemaName()
getSchemaName
in interface Column
public String getSqlExpression()
getSqlExpression
in interface Column
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.