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 voidCheck the given condition is true.booleaninthashCode()booleanCheck if theNameIdentifierhas a namespace.name()Get the name of theNameIdentifier.Get the namespace of theNameIdentifier.static NameIdentifierCreate theNameIdentifierwith the given levels of names.static NameIdentifierCreate theNameIdentifierwith the givenNamespaceand name.static NameIdentifierCreate aNameIdentifierfrom the given identifier string.toString()
-
Method Details
-
of
Create theNameIdentifierwith the given levels of names.- Parameters:
names- The names of the identifier- Returns:
- The created
NameIdentifier
-
of
Create theNameIdentifierwith the givenNamespaceand name.- Parameters:
namespace- The namespace of the identifiername- The name of the identifier- Returns:
- The created
NameIdentifier
-
parse
Create aNameIdentifierfrom the given identifier string.- Parameters:
identifier- The identifier string- Returns:
- The created
NameIdentifier
-
hasNamespace
public boolean hasNamespace()Check if theNameIdentifierhas a namespace.- Returns:
- True if the
NameIdentifierhas 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 anIllegalNameIdentifierExceptionif it's not.- Parameters:
condition- The condition to check.message- The message to throw.args- The arguments to the message.
-