public class QualifiedTableName
extends java.lang.Object
Constructor and Description |
---|
QualifiedTableName(java.lang.String tableName,
java.lang.String defaultSchema)
Creates an object parsing the given tableName.
|
QualifiedTableName(java.lang.String tableName,
java.lang.String defaultSchema,
java.lang.String escapePattern)
Creates an object parsing the given tableName.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getQualifiedName() |
java.lang.String |
getQualifiedNameIfEnabled(DatabaseConfig config)
Returns the qualified name using the values given in the constructor.
|
java.lang.String |
getSchema() |
java.lang.String |
getTable() |
java.lang.String |
toString() |
public QualifiedTableName(java.lang.String tableName, java.lang.String defaultSchema)
tableName
- The table name, either qualified or unqualified. If it is qualified (like "MYSCHEMA.MYTABLE")
this schema name has precedence before the given defaultSchema
parameter.defaultSchema
- The schema that is used when the given tableName is not fully qualified
(i.e. it is not like "MYSCHEMA.MYTABLE"). Can be nullpublic QualifiedTableName(java.lang.String tableName, java.lang.String defaultSchema, java.lang.String escapePattern)
tableName
- The table name, either qualified or unqualified. If it is qualified (like "MYSCHEMA.MYTABLE")
this schema name has precedence before the given defaultSchema
parameter.defaultSchema
- The schema that is used when the given tableName is not fully qualified
(i.e. it is not like "MYSCHEMA.MYTABLE"). Can be nullescapePattern
- The escape pattern to be applied on the prefix and the name. Can be null.public java.lang.String getSchema()
public java.lang.String getTable()
public java.lang.String getQualifiedName()
public java.lang.String getQualifiedNameIfEnabled(DatabaseConfig config)
DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES
is set. Otherwise the given
name is returned unqualified (i.e. without prepending the prefix/schema).DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES
is set in the given config
.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2002-2020. All Rights Reserved.