Package com.tableau.hyperapi
Class Name
java.lang.Object
com.tableau.hyperapi.Name
- All Implemented Interfaces:
Comparable<Name>
A name.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares this name with the specified name for order.boolean
Checks two names for equality.Returns the original unescaped name.int
hashCode()
Computes a hash code.toString()
Gets a correctly escaped string representation of this name, which can be used in a SQL query to refer to the named entity.
-
Constructor Details
-
Name
Constructs a properly escaped SQL name.The name will be equivalent to calling Sql::escapeName().
- Parameters:
unescapedName
- An unescaped name.
-
-
Method Details
-
toString
Gets a correctly escaped string representation of this name, which can be used in a SQL query to refer to the named entity. -
getUnescaped
Returns the original unescaped name.Don't use the result of this method in SQL, as it is prone to SQL injection. The method should be used for use-cases where the original name is more readable (e.g., logging).
- Returns:
- The original unescaped name; or empty if the name was created with `createUnescaped`.
-
equals
Checks two names for equality. -
compareTo
Compares this name with the specified name for order.- Specified by:
compareTo
in interfaceComparable<Name>
- 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.
-