Class SchemaDTO.Builder<S extends SchemaDTO.Builder>

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

public static class SchemaDTO.Builder<S extends SchemaDTO.Builder> extends Object
Builder class for constructing SchemaDTO instances.
  • Field Details

    • name

      protected String name
      The name of the schema.
    • comment

      protected String comment
      The comment associated with the schema.
    • properties

      protected Map<String,String> properties
      The properties associated with the schema.
    • audit

      protected AuditDTO audit
      The audit information for the schema.
  • Method Details

    • withName

      public S withName(String name)
      Sets the name of the schema.
      Parameters:
      name - The name of the schema.
      Returns:
      The Builder instance.
    • withComment

      public S withComment(String comment)
      Sets the comment associated with the schema.
      Parameters:
      comment - The comment associated with the schema.
      Returns:
      The Builder instance.
    • withProperties

      public S withProperties(Map<String,String> properties)
      Sets the properties associated with the schema.
      Parameters:
      properties - The properties associated with the schema.
      Returns:
      The Builder instance.
    • withAudit

      public S withAudit(AuditDTO audit)
      Sets the audit information for the schema.
      Parameters:
      audit - The audit information for the schema.
      Returns:
      The Builder instance.
    • build

      public SchemaDTO build()
      Builds a Schema DTO based on the provided builder parameters.
      Returns:
      A new SchemaDTO instance.
      Throws:
      IllegalArgumentException - If required fields name and audit are not set.