Package org.apache.gravitino.dto
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
Builder class for constructing a CatalogDTO instance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuditDTO
The audit information of the catalog.protected String
The comment of the catalog.protected String
The name of the catalog.The properties of the catalog.protected String
The provider of the catalog.protected Catalog.Type
The type of the catalog. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds an instance of CatalogDTO using the builder's properties.Sets the audit information of the catalog.withComment
(String comment) Sets the comment of the catalog.Sets the name of the catalog.withProperties
(Map<String, String> properties) Sets the properties of the catalog.withProvider
(String provider) Sets the provider of the catalog.withType
(Catalog.Type type) Sets the type of the catalog.
-
Field Details
-
name
The name of the catalog. -
type
The type of the catalog. -
provider
The provider of the catalog. -
comment
The comment of the catalog. -
properties
The properties of the catalog. -
audit
The audit information of the catalog.
-
-
Constructor Details
-
Builder
protected Builder()Default constructor for the builder.
-
-
Method Details
-
withName
Sets the name of the catalog.- Parameters:
name
- The name of the catalog.- Returns:
- The builder instance.
-
withType
Sets the type of the catalog.- Parameters:
type
- The type of the catalog.- Returns:
- The builder instance.
-
withProvider
Sets the provider of the catalog.- Parameters:
provider
- The provider of the catalog.- Returns:
- The builder instance.
-
withComment
Sets the comment of the catalog.- Parameters:
comment
- The comment of the catalog.- Returns:
- The builder instance.
-
withProperties
Sets the properties of the catalog.- Parameters:
properties
- The properties of the catalog.- Returns:
- The builder instance.
-
withAudit
Sets the audit information of the catalog.- Parameters:
audit
- The audit information of the catalog.- Returns:
- The builder instance.
-
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.
-