Class Content

java.lang.Object
org.projectnessie.model.Content
Direct Known Subclasses:
DeltaLakeTable, GenericContent, IcebergContent, Namespace, UDF

public abstract class Content extends Object
Base class for an object stored within Nessie.
  • Constructor Details

    • Content

      public Content()
  • Method Details

    • getId

      @Nullable @Nullable public abstract String getId()
      Unique id for this object.

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

    • getType

      @Redacted public abstract Content.Type getType()
      Returns the Content.Type value for this content object.

      The name of the returned value should match the JSON type name used for serializing the content object.

    • withId

      public abstract Content withId(String id)
    • unwrap

      public <T> Optional<T> unwrap(Class<T> clazz)
      Unwrap object if possible, otherwise throw.
      Type Parameters:
      T - Type to wrap to.
      Parameters:
      clazz - Class we're trying to return.
      Returns:
      The return value