Class ImmutableHiveDatabase

    • Method Detail

      • getId

        public String getId()
        Unique id for this object.

        This id is unique for the entire lifetime of this Contents object and persists across renames. Two contents with the same key will have different id.

        Overrides:
        getId in class Contents
      • getDatabaseDefinition

        public byte[] getDatabaseDefinition()
        Specified by:
        getDatabaseDefinition in class HiveDatabase
        Returns:
        A cloned databaseDefinition array
      • withId

        public final ImmutableHiveDatabase withId​(String value)
        Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for id
        Returns:
        A modified copy of the this object
      • withDatabaseDefinition

        public final ImmutableHiveDatabase withDatabaseDefinition​(byte... elements)
        Copy the current immutable object with elements that replace the content of databaseDefinition. The array is cloned before being saved as attribute values.
        Parameters:
        elements - The non-null elements for databaseDefinition
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableHiveDatabase that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Returns a precomputed-on-construction hash code from attributes: id, databaseDefinition.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value HiveDatabase with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableHiveDatabase copyOf​(HiveDatabase instance)
        Creates an immutable copy of a HiveDatabase value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable HiveDatabase instance