Package org.apache.gravitino.dto.rel
Class TableDTO.Builder<S extends TableDTO.Builder>
java.lang.Object
org.apache.gravitino.dto.rel.TableDTO.Builder<S>
- Type Parameters:
S
- The type of the builder subclass.
- Enclosing class:
- TableDTO
Builder class for constructing TableDTO instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuditDTO
The audit information for the table.protected ColumnDTO[]
The columns of the table.protected String
The comment associated with the table.protected DistributionDTO
The distribution of the table.protected IndexDTO[]
The indexes of the table.protected String
The name of the table.protected Partitioning[]
The partitioning of the table.The properties associated with the table.protected SortOrderDTO[]
The distribution of the table. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a Table DTO based on the provided builder parameters.static TableDTO.Builder
builder()
Creates a new instance ofTableDTO.Builder
.Sets the audit information for the table.withColumns
(ColumnDTO[] columns) Sets the columns of the table.withComment
(String comment) Sets the comment associated with the table.withDistribution
(DistributionDTO distributionDTO) Sets the distribution of the table.Sets the indexes of the table.Sets the name of the table.withPartitioning
(Partitioning[] Partitioning) Sets the partitioning of the table.withProperties
(Map<String, String> properties) Sets the properties associated with the table.withSortOrders
(SortOrderDTO[] sortOrderDTOs) Sets the sort orders of the table.
-
Field Details
-
name
The name of the table. -
comment
The comment associated with the table. -
columns
The columns of the table. -
properties
The properties associated with the table. -
audit
The audit information for the table. -
sortOrderDTOs
The distribution of the table. -
distributionDTO
The distribution of the table. -
Partitioning
The partitioning of the table. -
indexes
The indexes of the table.
-
-
Method Details
-
withName
Sets the name of the table.- Parameters:
name
- The name of the table.- Returns:
- The Builder instance.
-
withComment
Sets the comment associated with the table.- Parameters:
comment
- The comment associated with the table.- Returns:
- The Builder instance.
-
withColumns
Sets the columns of the table.- Parameters:
columns
- The columns of the table.- Returns:
- The Builder instance.
-
withProperties
Sets the properties associated with the table.- Parameters:
properties
- The properties associated with the table.- Returns:
- The Builder instance.
-
withAudit
Sets the audit information for the table.- Parameters:
audit
- The audit information for the table.- Returns:
- The Builder instance.
-
withDistribution
Sets the distribution of the table.- Parameters:
distributionDTO
- The distribution of the table.- Returns:
- The Builder instance.
-
withSortOrders
Sets the sort orders of the table.- Parameters:
sortOrderDTOs
- The sort orders of the table.- Returns:
- The Builder instance.
-
withPartitioning
Sets the partitioning of the table.- Parameters:
Partitioning
- The partitioning of the table.- Returns:
- The Builder instance.
-
withIndex
Sets the indexes of the table.- Parameters:
indexes
- The indexes of the table.- Returns:
- The Builder instance.
-
build
Builds a Table DTO based on the provided builder parameters.- Returns:
- A new TableDTO instance.
- Throws:
IllegalArgumentException
- If required fields name, columns and audit are not set.
-
builder
Creates a new instance ofTableDTO.Builder
.- Returns:
- The new instance.
-