Class ViewDTO.Builder

java.lang.Object
org.apache.gravitino.dto.rel.ViewDTO.Builder
Enclosing class:
ViewDTO

public static class ViewDTO.Builder extends Object
Builder class for constructing ViewDTO instances.
  • Method Details

    • withName

      public ViewDTO.Builder withName(String name)
      Sets the view name.
      Parameters:
      name - The view name.
      Returns:
      This builder.
    • withComment

      public ViewDTO.Builder withComment(@Nullable String comment)
      Sets the view comment.
      Parameters:
      comment - The view comment.
      Returns:
      This builder.
    • withColumns

      public ViewDTO.Builder withColumns(ColumnDTO[] columns)
      Sets the view columns.
      Parameters:
      columns - The view output columns.
      Returns:
      This builder.
    • withRepresentations

      public ViewDTO.Builder withRepresentations(RepresentationDTO[] representations)
      Sets the view representations.
      Parameters:
      representations - The view representations.
      Returns:
      This builder.
    • withDefaultCatalog

      public ViewDTO.Builder withDefaultCatalog(@Nullable String defaultCatalog)
      Sets the default catalog used to resolve unqualified identifiers in view representations.
      Parameters:
      defaultCatalog - The default catalog, or null if not set.
      Returns:
      This builder.
    • withDefaultSchema

      public ViewDTO.Builder withDefaultSchema(@Nullable String defaultSchema)
      Sets the default schema used to resolve unqualified identifiers in view representations.
      Parameters:
      defaultSchema - The default schema, or null if not set.
      Returns:
      This builder.
    • withProperties

      public ViewDTO.Builder withProperties(@Nullable Map<String,String> properties)
      Sets the view properties.
      Parameters:
      properties - The view properties.
      Returns:
      This builder.
    • withAudit

      public ViewDTO.Builder withAudit(AuditDTO audit)
      Sets the audit information for the view.
      Parameters:
      audit - The audit information.
      Returns:
      This builder.
    • build

      public ViewDTO build()
      Builds a new ViewDTO.
      Returns:
      The constructed instance.
      Throws:
      IllegalArgumentException - If required fields are missing.