Package org.apache.gravitino
Class NameIdentifier
java.lang.Object
org.apache.gravitino.NameIdentifier
A name identifier is a sequence of names separated by dots. It's used to identify a metalake, a
catalog, a schema or a table. For example, "metalake1" can represent a metalake,
"metalake1.catalog1" can represent a catalog, "metalake1.catalog1.schema1" can represent a
schema.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Check the given condition is true.boolean
int
hashCode()
boolean
Check if theNameIdentifier
has a namespace.name()
Get the name of theNameIdentifier
.Get the namespace of theNameIdentifier
.static NameIdentifier
Create theNameIdentifier
with the given levels of names.static NameIdentifier
Create theNameIdentifier
with the givenNamespace
and name.static NameIdentifier
Create aNameIdentifier
from the given identifier string.toString()
-
Method Details
-
of
Create theNameIdentifier
with the given levels of names.- Parameters:
names
- The names of the identifier- Returns:
- The created
NameIdentifier
-
of
Create theNameIdentifier
with the givenNamespace
and name.- Parameters:
namespace
- The namespace of the identifiername
- The name of the identifier- Returns:
- The created
NameIdentifier
-
parse
Create aNameIdentifier
from the given identifier string.- Parameters:
identifier
- The identifier string- Returns:
- The created
NameIdentifier
-
hasNamespace
public boolean hasNamespace()Check if theNameIdentifier
has a namespace.- Returns:
- True if the
NameIdentifier
has a namespace, false otherwise.
-
namespace
Get the namespace of theNameIdentifier
.- Returns:
- The namespace of the
NameIdentifier
.
-
name
Get the name of theNameIdentifier
.- Returns:
- The name of the
NameIdentifier
.
-
equals
-
hashCode
public int hashCode() -
toString
-
check
@FormatMethod public static void check(boolean condition, @FormatString String message, Object... args) Check the given condition is true. Throw anIllegalNameIdentifierException
if it's not.- Parameters:
condition
- The condition to check.message
- The message to throw.args
- The arguments to the message.
-