Package com.tableau.hyperapi
Class SchemaName
java.lang.Object
com.tableau.hyperapi.SchemaName
- All Implemented Interfaces:
Comparable<SchemaName>
A schema name.
-
Field Summary
Modifier and TypeFieldDescriptionstatic Comparator
<SchemaName> The null-safe Schema name comparator -
Constructor Summary
ConstructorDescriptionSchemaName
(DatabaseName databaseName, Name schemaName) Constructs a properly escaped qualified SchemaName.SchemaName
(DatabaseName databaseName, String schemaName) Constructs a properly escaped qualified SchemaName.SchemaName
(Name schemaName) Constructs a properly escaped non-qualified SchemaName from a NameSchemaName
(Name databaseName, Name schemaName) Constructs a properly escaped qualified SchemaName.SchemaName
(Name databaseName, String schemaName) Constructs a properly escaped qualified SchemaName.SchemaName
(String schemaName) Constructs a properly escaped non-qualified SchemaName.SchemaName
(String databaseName, Name schemaName) Constructs a properly escaped qualified SchemaName.SchemaName
(String databaseName, String schemaName) Constructs a properly escaped qualified SchemaName. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(SchemaName other) Compares this name with the other schema name for order.boolean
Checks two names for equality.Gets the optional Database name prefixgetName()
Gets the Schema name without the optional Database name prefixint
hashCode()
Computes a hash code.boolean
Returns whether the schema name is qualified i.e Whether the schema name has a database name prefixtoString()
Gets a correctly escaped string representation of this schema name, which can be used in a SQL query to refer to the schema
-
Field Details
-
nullSafeSchemaNameComparator
The null-safe Schema name comparator
-
-
Constructor Details
-
SchemaName
Constructs a properly escaped non-qualified SchemaName from a Name- Parameters:
schemaName
- A non-qualified escaped schema name
-
SchemaName
Constructs a properly escaped non-qualified SchemaName.The name will be equivalent to calling Sql::escapeName().
- Parameters:
schemaName
- A non-qualified unescaped schema name.
-
SchemaName
Constructs a properly escaped qualified SchemaName.- Parameters:
databaseName
- The database NameschemaName
- The schema name.
-
SchemaName
Constructs a properly escaped qualified SchemaName.- Parameters:
databaseName
- The database NameschemaName
- The schema name.
-
SchemaName
Constructs a properly escaped qualified SchemaName.- Parameters:
databaseName
- An unescaped database NameschemaName
- The schema name.
-
SchemaName
Constructs a properly escaped qualified SchemaName.- Parameters:
databaseName
- The database NameschemaName
- An unescaped schema name.
-
SchemaName
Constructs a properly escaped qualified SchemaName.- Parameters:
databaseName
- The database NameschemaName
- An unescaped schema name.
-
SchemaName
Constructs a properly escaped qualified SchemaName.- Parameters:
databaseName
- An unescaped databaseNameschemaName
- An unescaped schema name
-
-
Method Details
-
toString
Gets a correctly escaped string representation of this schema name, which can be used in a SQL query to refer to the schema -
getName
Gets the Schema name without the optional Database name prefix- Returns:
- The schema name
-
getDatabaseName
Gets the optional Database name prefix- Returns:
- The optional database name
-
isFullyQualified
public boolean isFullyQualified()Returns whether the schema name is qualified i.e Whether the schema name has a database name prefix- Returns:
- Whether the schema name fully qualified
-
equals
Checks two names for equality. -
compareTo
Compares this name with the other schema name for order.- Specified by:
compareTo
in interfaceComparable<SchemaName>
- Parameters:
other
- The other name.- Returns:
- A negative integer, zero, or a positive integer as this name is less than, equal to, or greater than the other name.
-
hashCode
public int hashCode()Computes a hash code.
-