Class Namespace

  • Direct Known Subclasses:
    ImmutableNamespace

    @Immutable
    public abstract class Namespace
    extends Object
    For a given table name a.b.c.tableName, the Namespace would be the prefix a.b.c, since the last element tableName always represents the name of the actual table and is not included in the Namespace itself. Therefore, the Namespace is always consisting of the first N-1 elements.
    • Field Detail

    • Constructor Detail

      • Namespace

        public Namespace()
    • Method Detail

      • name

        @NotNull
        public abstract @NotNull String name()
      • isEmpty

        @Redacted
        public boolean isEmpty()
      • getElements

        @Redacted
        public String[] getElements()
      • of

        public static Namespace of​(String... elements)
        Builds a Namespace instance for the given elements.
        Parameters:
        elements - The elements to build the namespace from.
        Returns:
        The constructed Namespace instance. If elements is empty, then name() will be an empty string.
      • of

        public static Namespace of​(List<String> elements)
        Builds a Namespace instance for the given elements.
        Parameters:
        elements - The elements to build the namespace from.
        Returns:
        The constructed Namespace instance. If elements is empty, then name() will be an empty string.
      • parse

        public static Namespace parse​(String identifier)
        Builds a Namespace instance for the given elements split by the . (dot) character.
        Parameters:
        identifier - The identifier to build the namespace from.
        Returns:
        Splits the given identifier by . and returns a Namespace instance. If identifier is empty, then name() will be an empty string.