Package com.tableau.hyperapi

# Class TableName

java.lang.Object
com.tableau.hyperapi.TableName

All Implemented Interfaces:
  `Comparable<TableName>`

public final class TableName extends Object implements Comparable<TableName>
A table name.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static Comparator<TableName>`
  `nullSafeTableNameComparator`
  The null-safe table name comparator.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TableName(DatabaseName databaseName, Name schemaName, Name tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(DatabaseName databaseName, Name schemaName, String tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(DatabaseName databaseName, String schemaName, Name tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(DatabaseName databaseName, String schemaName, String tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(Name tableName)`
  Constructs a properly escaped non-qualified TableName from a Name
  `TableName(Name schemaName, Name tableName)`
  Constructs a properly escaped qualified TableName.
  `TableName(Name databaseName, Name schemaName, Name tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(Name databaseName, Name schemaName, String tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(Name schemaName, String tableName)`
  Constructs a properly escaped partly qualified TableName.
  `TableName(Name databaseName, String schemaName, Name tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(Name databaseName, String schemaName, String tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(SchemaName schemaName, Name tableName)`
  Constructs a properly escaped partly qualified TableName.
  `TableName(SchemaName schemaName, String tableName)`
  Constructs a properly escaped partly qualified TableName.
  `TableName(String tableName)`
  Constructs a properly escaped non-qualified TableName.
  `TableName(String schemaName, Name tableName)`
  Constructs a properly escaped partly qualified TableName.
  `TableName(String databaseName, Name schemaName, Name tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(String databaseName, Name schemaName, String tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(String schemaName, String tableName)`
  Constructs a properly escaped partly qualified TableName.
  `TableName(String databaseName, String schemaName, Name tableName)`
  Constructs a properly escaped fully qualified TableName.
  `TableName(String databaseName, String schemaName, String tableName)`
  Constructs a properly escaped fully qualified TableName.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(TableName other)`
  Compares this name with the specified name for order.
  `boolean`
  `equals(Object that)`
  Checks for equality.
  `Optional<DatabaseName>`
  `getDatabaseName()`
  Gets the optional Database name prefix
  `Name`
  `getName()`
  Gets the Schema name without the optional Schema name prefix
  `Optional<SchemaName>`
  `getSchemaName()`
  Gets the optional Schema name prefix
  `int`
  `hashCode()`
  Computes a hash code.
  `boolean`
  `isFullyQualified()`
  Returns whether the table name is qualified i.e Whether the table name has a schema name prefix
  `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

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### nullSafeTableNameComparator

    public static Comparator<TableName> nullSafeTableNameComparator
    The null-safe table name comparator.

- ## Constructor Details

  - ### TableName

    public TableName(Name tableName)
    Constructs a properly escaped non-qualified TableName from a Name
    Parameters:
      `tableName` - A non-qualified escaped table name

  - ### TableName

    public TableName(String tableName)
    Constructs a properly escaped non-qualified TableName.

    The name will be equivalent to calling Sql::escapeName().

    Parameters:
      `tableName` - A non-qualified unescaped table name.

  - ### TableName

    public TableName(SchemaName schemaName, Name tableName)
    Constructs a properly escaped partly qualified TableName.
    Parameters:
      `schemaName` - The schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(SchemaName schemaName, String tableName)
    Constructs a properly escaped partly qualified TableName.
    Parameters:
      `schemaName` - The schema name
      `tableName` - An unescaped table name.

  - ### TableName

    public TableName(Name schemaName, Name tableName)
    Constructs a properly escaped qualified TableName.
    Parameters:
      `schemaName` - The schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(Name schemaName, String tableName)
    Constructs a properly escaped partly qualified TableName.
    Parameters:
      `schemaName` - The schema name
      `tableName` - An unescaped table name.

  - ### TableName

    public TableName(String schemaName, String tableName)
    Constructs a properly escaped partly qualified TableName.
    Parameters:
      `schemaName` - An unescaped schema name
      `tableName` - An unescaped table name

  - ### TableName

    public TableName(String schemaName, Name tableName)
    Constructs a properly escaped partly qualified TableName.
    Parameters:
      `schemaName` - An unescaped schema name
      `tableName` - The table name

  - ### TableName

    public TableName(DatabaseName databaseName, Name schemaName, Name tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - The database name
      `schemaName` - The schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(DatabaseName databaseName, Name schemaName, String tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - The database name
      `schemaName` - An unescaped schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(DatabaseName databaseName, String schemaName, Name tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - The database name
      `schemaName` - An unescaped schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(DatabaseName databaseName, String schemaName, String tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - The database name
      `schemaName` - An unescaped schema name
      `tableName` - An unescaped table name.

  - ### TableName

    public TableName(Name databaseName, Name schemaName, Name tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - The database name
      `schemaName` - The schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(Name databaseName, Name schemaName, String tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - The database name
      `schemaName` - The schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(Name databaseName, String schemaName, Name tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - The database name
      `schemaName` - The schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(Name databaseName, String schemaName, String tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - The database name
      `schemaName` - The schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(String databaseName, Name schemaName, Name tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - An unescaped database name
      `schemaName` - An unescaped schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(String databaseName, Name schemaName, String tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - An unescaped database name
      `schemaName` - The schema name
      `tableName` - An unescaped table name.

  - ### TableName

    public TableName(String databaseName, String schemaName, Name tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - An unescaped database name
      `schemaName` - An unescaped schema name
      `tableName` - The table name.

  - ### TableName

    public TableName(String databaseName, String schemaName, String tableName)
    Constructs a properly escaped fully qualified TableName.
    Parameters:
      `databaseName` - An unescaped database name
      `schemaName` - An unescaped schema name
      `tableName` - An unescaped table 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 Schema name prefix
    Returns:
      The schema name

  - ### getSchemaName

    public Optional<SchemaName> getSchemaName()
    Gets the optional Schema name prefix
    Returns:
      The optional 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 table name is qualified i.e Whether the table name has a schema name prefix
    Returns:
      Whether the Table Name is fully qualified

  - ### equals

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

  - ### compareTo

    public int compareTo(TableName other)
    Compares this name with the specified name for order.
    Specified by:
      `compareTo` in interface `Comparable<TableName>`
    Parameters:
      `other` - The other table 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`