Class SchemaName

java.lang.Object
com.tableau.hyperapi.SchemaName
All Implemented Interfaces:
Comparable<SchemaName>

public final class SchemaName extends Object implements Comparable<SchemaName>
A schema name.
  • Field Details

    • nullSafeSchemaNameComparator

      public static Comparator<SchemaName> nullSafeSchemaNameComparator
      The null-safe Schema name comparator
  • Constructor Details

    • SchemaName

      public SchemaName(Name schemaName)
      Constructs a properly escaped non-qualified SchemaName from a Name
      Parameters:
      schemaName - A non-qualified escaped schema name
    • SchemaName

      public SchemaName(String 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

      public SchemaName(DatabaseName databaseName, Name schemaName)
      Constructs a properly escaped qualified SchemaName.
      Parameters:
      databaseName - The database Name
      schemaName - The schema name.
    • SchemaName

      public SchemaName(Name databaseName, Name schemaName)
      Constructs a properly escaped qualified SchemaName.
      Parameters:
      databaseName - The database Name
      schemaName - The schema name.
    • SchemaName

      public SchemaName(String databaseName, Name schemaName)
      Constructs a properly escaped qualified SchemaName.
      Parameters:
      databaseName - An unescaped database Name
      schemaName - The schema name.
    • SchemaName

      public SchemaName(DatabaseName databaseName, String schemaName)
      Constructs a properly escaped qualified SchemaName.
      Parameters:
      databaseName - The database Name
      schemaName - An unescaped schema name.
    • SchemaName

      public SchemaName(Name databaseName, String schemaName)
      Constructs a properly escaped qualified SchemaName.
      Parameters:
      databaseName - The database Name
      schemaName - An unescaped schema name.
    • SchemaName

      public SchemaName(String databaseName, String schemaName)
      Constructs a properly escaped qualified SchemaName.
      Parameters:
      databaseName - An unescaped databaseName
      schemaName - An unescaped schema name
  • Method Details

    • toString

      public String toString()
      Gets a correctly escaped string representation of this schema name, which can be used in a SQL query to refer to the schema
      Overrides:
      toString in class Object
      Returns:
      The escaped schema name
    • getName

      public Name getName()
      Gets the Schema name without the optional Database name prefix
      Returns:
      The schema name
    • getDatabaseName

      public Optional<DatabaseName> 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

      public boolean equals(Object that)
      Checks two names for equality.
      Overrides:
      equals in class Object
      Parameters:
      that - The other name.
      Returns:
      Whether the two names are equal.
    • compareTo

      public int compareTo(SchemaName other)
      Compares this name with the other schema name for order.
      Specified by:
      compareTo in interface Comparable<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.
      Overrides:
      hashCode in class Object