public class NameIdentifier
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
check(boolean condition,
java.lang.String message,
java.lang.Object... args)
Check the given condition is true.
|
static void |
checkCatalog(NameIdentifier ident)
Check the given
NameIdentifier is a catalog identifier. |
static void |
checkMetalake(NameIdentifier ident)
Check the given
NameIdentifier is a metalake identifier. |
static void |
checkSchema(NameIdentifier ident)
Check the given
NameIdentifier is a schema identifier. |
static void |
checkTable(NameIdentifier ident)
Check the given
NameIdentifier is a table identifier. |
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
boolean |
hasNamespace()
Check if the
NameIdentifier has a namespace. |
java.lang.String |
name()
Get the name of the
NameIdentifier. |
Namespace |
namespace()
Get the namespace of the
NameIdentifier. |
static NameIdentifier |
of(Namespace namespace,
java.lang.String name)
Create the
NameIdentifier with the given Namespace and name. |
static NameIdentifier |
of(java.lang.String... names)
Create the
NameIdentifier with the given levels of names. |
static NameIdentifier |
ofCatalog(java.lang.String metalake,
java.lang.String catalog)
Create the catalog
NameIdentifier with the given metalake and catalog name. |
static NameIdentifier |
ofMetalake(java.lang.String metalake)
Create the metalake
NameIdentifier with the given name. |
static NameIdentifier |
ofSchema(java.lang.String metalake,
java.lang.String catalog,
java.lang.String schema)
Create the schema
NameIdentifier with the given metalake, catalog and schema name. |
static NameIdentifier |
ofTable(java.lang.String metalake,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
Create the table
NameIdentifier with the given metalake, catalog, schema and table
name. |
static NameIdentifier |
parse(java.lang.String identifier)
Create a
NameIdentifier from the given identifier string. |
java.lang.String |
toString() |
public static NameIdentifier of(java.lang.String... names)
NameIdentifier with the given levels of names.names - The names of the identifierNameIdentifierpublic static NameIdentifier of(Namespace namespace, java.lang.String name)
NameIdentifier with the given Namespace and name.namespace - The namespace of the identifiername - The name of the identifierNameIdentifierpublic static NameIdentifier ofMetalake(java.lang.String metalake)
NameIdentifier with the given name.metalake - The metalake nameNameIdentifierpublic static NameIdentifier ofCatalog(java.lang.String metalake, java.lang.String catalog)
NameIdentifier with the given metalake and catalog name.metalake - The metalake namecatalog - The catalog nameNameIdentifierpublic static NameIdentifier ofSchema(java.lang.String metalake, java.lang.String catalog, java.lang.String schema)
NameIdentifier with the given metalake, catalog and schema name.metalake - The metalake namecatalog - The catalog nameschema - The schema nameNameIdentifierpublic static NameIdentifier ofTable(java.lang.String metalake, java.lang.String catalog, java.lang.String schema, java.lang.String table)
NameIdentifier with the given metalake, catalog, schema and table
name.metalake - The metalake namecatalog - The catalog nameschema - The schema nametable - The table nameNameIdentifierpublic static void checkMetalake(NameIdentifier ident)
NameIdentifier is a metalake identifier. Throw an IllegalNameIdentifierException if it's not.ident - The metalake NameIdentifier to check.public static void checkCatalog(NameIdentifier ident)
NameIdentifier is a catalog identifier. Throw an IllegalNameIdentifierException if it's not.ident - The catalog NameIdentifier to check.public static void checkSchema(NameIdentifier ident)
NameIdentifier is a schema identifier. Throw an IllegalNameIdentifierException if it's not.ident - The schema NameIdentifier to check.public static void checkTable(NameIdentifier ident)
NameIdentifier is a table identifier. Throw an IllegalNameIdentifierException if it's not.ident - The table NameIdentifier to check.public static NameIdentifier parse(java.lang.String identifier)
NameIdentifier from the given identifier string.identifier - The identifier stringNameIdentifierpublic boolean hasNamespace()
NameIdentifier has a namespace.NameIdentifier has a namespace, false otherwise.public Namespace namespace()
NameIdentifier.NameIdentifier.public java.lang.String name()
NameIdentifier.NameIdentifier.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static void check(boolean condition,
java.lang.String message,
java.lang.Object... args)
IllegalNameIdentifierException if it's not.condition - The condition to check.message - The message to throw.args - The arguments to the message.