Class CatalogDTO.Builder<S extends CatalogDTO.Builder>

java.lang.Object
org.apache.gravitino.dto.CatalogDTO.Builder<S>
Type Parameters:
S - The type of the builder instance.
Enclosing class:
CatalogDTO

public static class CatalogDTO.Builder<S extends CatalogDTO.Builder> extends Object
Builder class for constructing a CatalogDTO instance.
  • Field Details

    • name

      protected String name
      The name of the catalog.
    • type

      protected Catalog.Type type
      The type of the catalog.
    • provider

      protected String provider
      The provider of the catalog.
    • comment

      protected String comment
      The comment of the catalog.
    • properties

      protected Map<String,String> properties
      The properties of the catalog.
    • audit

      protected AuditDTO audit
      The audit information of the catalog.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for the builder.
  • Method Details

    • withName

      public S withName(String name)
      Sets the name of the catalog.
      Parameters:
      name - The name of the catalog.
      Returns:
      The builder instance.
    • withType

      public S withType(Catalog.Type type)
      Sets the type of the catalog.
      Parameters:
      type - The type of the catalog.
      Returns:
      The builder instance.
    • withProvider

      public S withProvider(String provider)
      Sets the provider of the catalog.
      Parameters:
      provider - The provider of the catalog.
      Returns:
      The builder instance.
    • withComment

      public S withComment(String comment)
      Sets the comment of the catalog.
      Parameters:
      comment - The comment of the catalog.
      Returns:
      The builder instance.
    • withProperties

      public S withProperties(Map<String,String> properties)
      Sets the properties of the catalog.
      Parameters:
      properties - The properties of the catalog.
      Returns:
      The builder instance.
    • withAudit

      public S withAudit(AuditDTO audit)
      Sets the audit information of the catalog.
      Parameters:
      audit - The audit information of the catalog.
      Returns:
      The builder instance.
    • build

      public CatalogDTO build()
      Builds an instance of CatalogDTO using the builder's properties.
      Returns:
      An instance of CatalogDTO.
      Throws:
      IllegalArgumentException - If name, type or audit are not set.