Package org.apache.gravitino.dto.rel
Class ViewDTO.Builder
java.lang.Object
org.apache.gravitino.dto.rel.ViewDTO.Builder
- Enclosing class:
- ViewDTO
Builder class for constructing
ViewDTO instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newViewDTO.Sets the audit information for the view.withColumns(ColumnDTO[] columns) Sets the view columns.withComment(String comment) Sets the view comment.withDefaultCatalog(String defaultCatalog) Sets the default catalog used to resolve unqualified identifiers in view representations.withDefaultSchema(String defaultSchema) Sets the default schema used to resolve unqualified identifiers in view representations.Sets the view name.withProperties(Map<String, String> properties) Sets the view properties.withRepresentations(RepresentationDTO[] representations) Sets the view representations.
-
Method Details
-
withName
Sets the view name.- Parameters:
name- The view name.- Returns:
- This builder.
-
withComment
Sets the view comment.- Parameters:
comment- The view comment.- Returns:
- This builder.
-
withColumns
Sets the view columns.- Parameters:
columns- The view output columns.- Returns:
- This builder.
-
withRepresentations
Sets the view representations.- Parameters:
representations- The view representations.- Returns:
- This builder.
-
withDefaultCatalog
Sets the default catalog used to resolve unqualified identifiers in view representations.- Parameters:
defaultCatalog- The default catalog, ornullif not set.- Returns:
- This builder.
-
withDefaultSchema
Sets the default schema used to resolve unqualified identifiers in view representations.- Parameters:
defaultSchema- The default schema, ornullif not set.- Returns:
- This builder.
-
withProperties
Sets the view properties.- Parameters:
properties- The view properties.- Returns:
- This builder.
-
withAudit
Sets the audit information for the view.- Parameters:
audit- The audit information.- Returns:
- This builder.
-
build
Builds a newViewDTO.- Returns:
- The constructed instance.
- Throws:
IllegalArgumentException- If required fields are missing.
-