Package org.dbunit.util
Class QualifiedTableName
java.lang.Object
org.dbunit.util.QualifiedTableName
Utility to parse a fully qualified table name into its components schema and table.
- Since:
- 2.3.0
- Version:
- $Revision$ $Date$
- Author:
- gommma, Last changed by: $Author$
-
Constructor Summary
ConstructorsConstructorDescriptionQualifiedTableName(String tableName, String defaultSchema) Creates an object parsing the given tableName.QualifiedTableName(String tableName, String defaultSchema, String escapePattern) Creates an object parsing the given tableName. -
Method Summary
-
Constructor Details
-
QualifiedTableName
Creates an object parsing the given tableName.- Parameters:
tableName- The table name, either qualified or unqualified. If it is qualified (like "MYSCHEMA.MYTABLE") this schema name has precedence before the givendefaultSchemaparameter.defaultSchema- The schema that is used when the given tableName is not fully qualified (i.e. it is not like "MYSCHEMA.MYTABLE"). Can be null
-
QualifiedTableName
Creates an object parsing the given tableName.- Parameters:
tableName- The table name, either qualified or unqualified. If it is qualified (like "MYSCHEMA.MYTABLE") this schema name has precedence before the givendefaultSchemaparameter.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.
-
-
Method Details
-
getSchema
- Returns:
- The schema name which can be null if no schema has been given in the constructor
-
getTable
- Returns:
- The name of the plain, unqualified table
-
getQualifiedName
- Returns:
- The qualified table name with the prepended schema if a schema is available
-
getQualifiedNameIfEnabled
Returns the qualified name using the values given in the constructor. The qualified table name is only returned if the featureDatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMESis set. Otherwise the given name is returned unqualified (i.e. without prepending the prefix/schema).- Returns:
- The qualified table name with the prepended schema if a schema is available.
The qualified table name is only returned if the feature
DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMESis set in the givenconfig.
-
toString
-