Package org.apache.gravitino.dto.util
Class DTOConverters
java.lang.Object
org.apache.gravitino.dto.util.DTOConverters
Utility class for converting between DTOs and domain objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Credential
fromDTO
(CredentialDTO credential) Converts a CredentialDTO to a credential.static Credential[]
fromDTO
(CredentialDTO[] credentials) Converts CredentialDTO array to credential array.static JobTemplate
fromDTO
(JobTemplateDTO jobTemplateDTO) Converts a JobTemplateDTO to a JobTemplate.static PolicyContent
fromDTO
(PolicyContentDTO policyContentDTO) Converts a PolicyContentDTO to a PolicyContent.static Column
Converts a ColumnDTO to a Column.static Distribution
fromDTO
(DistributionDTO distributionDTO) Converts a DistributionDTO to a Distribution.static Index
Converts a IndexDTO to an Index.static Transform
fromDTO
(Partitioning partitioning) Converts a partitioning DTO to a Transform.static Partition
fromDTO
(PartitionDTO partitionDTO) Converts a PartitionDTO to a Partition.static SortOrder
fromDTO
(SortOrderDTO sortOrderDTO) Converts a SortOrderDTO to a SortOrder.static Table
Converts a TableDTO to a Table.static Column[]
Converts a ColumnDTO to a Column.static Index[]
Converts an array of IndexDTOs to an array of Indexes.static Transform[]
fromDTOs
(Partitioning[] partitioning) Converts an array of Partitioning DTOs to an array of Transforms.static SortOrder[]
fromDTOs
(SortOrderDTO[] sortOrderDTO) Converts an array of SortOrderDTOs to an array of SortOrders.static Expression
Converts a FunctionArg DTO to an Expression.static Expression[]
fromFunctionArgs
(FunctionArg[] args) Converts a FunctionArg DTO to an Expression.static Privilege
fromPrivilegeDTO
(PrivilegeDTO privilegeDTO) Converts a Privilege DTO to a Privilegestatic AuditDTO
static GroupDTO
Converts a group implementation to a GroupDTO.static OwnerDTO
static PrivilegeDTO
Converts a privilege implementation to a PrivilegeDTO.static RoleDTO
Converts a role implementation to a RoleDTO.static SecurableObjectDTO
toDTO
(SecurableObject securableObject) Converts a securable object implementation to a SecurableObjectDTO.static UserDTO
Converts a user implementation to a UserDTO.static CatalogDTO
Converts aCatalog
to aCatalogDTO
.static CredentialDTO
toDTO
(Credential credential) Converts a Credential to a CredentialDTO.static CredentialDTO[]
toDTO
(Credential[] credentials) Converts credentials to CredentialDTOs.static FileInfoDTO[]
Converts array of FileInfo to array of FileInfoDTO.static FilesetDTO
Converts a Fileset to a FilesetDTO.static TopicDTO
Converts a Topic to a TopicDTO.static MetadataObjectDTO
toDTO
(MetadataObject metadataObject) Converts a MetadataObject to a MetadataObjectDTO.static MetalakeDTO
Converts aMetalake
to aMetalakeDTO
.static ModelDTO
Converts a Model to a ModelDTO.static ModelVersionDTO
toDTO
(ModelVersion modelVersion) Converts a ModelVersion to a ModelVersionDTO.static PolicyContentDTO
toDTO
(PolicyContent policyContent) Converts a PolicyContent to a PolicyContentDTO.static ColumnDTO
static DistributionDTO
toDTO
(Distribution distribution) Converts a Distribution implementation to a DistributionDTO.static SortOrderDTO
Converts a SortOrder implementation to a SortOrderDTO.static Partitioning
Converts a Transform implementation to a Partitioning DTO.static IndexDTO
Converts an index implementation to an IndexDTO.static PartitionDTO
Converts aPartition
to aPartitionDTO
.static TableDTO
Converts a table implementation to aTableDTO
.static SchemaDTO
static TagDTO
Converts a Tag to a TagDTO.static GroupDTO[]
Converts an array of Groups to an array of GroupDTOs.static UserDTO[]
Converts an array of Users to an array of UserDTOs.static CatalogDTO[]
Converts an array of Catalogs to an array of CatalogDTOs.static ModelVersionDTO[]
toDTOs
(ModelVersion[] modelVersions) Converts an array of ModelVersions to an array of ModelVersionDTOs.static ColumnDTO[]
Converts an array of Columns to an array of ColumnDTOs.static SortOrderDTO[]
Converts an array of SortOrders to an array of SortOrderDTOs.static Partitioning[]
Converts an array of Transforms to an array of Partitioning DTOs.static IndexDTO[]
Converts an array of Indexes to an array of IndexDTOs.static PartitionDTO[]
Converts an array of Partitions to an array of PartitionDTOs.static StatisticDTO[]
Converts an array of statistics to an array of StatisticDTOs.static FunctionArg
toFunctionArg
(Expression expression) Converts an Expression to an FunctionArg DTO.static FunctionArg[]
toFunctionArg
(Expression[] expressions) Converts an array of Expressions to an array of FunctionArg DTOs.
-
Method Details
-
toDTO
- Parameters:
audit
- The audit.- Returns:
- The audit DTO.
-
toDTO
- Parameters:
owner
- The owner.- Returns:
- The owner DTO.
-
toDTO
Converts aMetalake
to aMetalakeDTO
.- Parameters:
metalake
- The metalake.- Returns:
- The metalake DTO.
-
toDTO
Converts aPartition
to aPartitionDTO
.- Parameters:
partition
- The partition.- Returns:
- The partition DTO.
-
toDTO
Converts aCatalog
to aCatalogDTO
.- Parameters:
catalog
- The catalog.- Returns:
- The catalog DTO.
-
toDTO
- Parameters:
schema
- The schema.- Returns:
- The schema DTO.
-
toDTO
- Parameters:
column
- The column.- Returns:
- The column DTO.
-
toDTO
Converts a table implementation to aTableDTO
.- Parameters:
table
- The table implementation.- Returns:
- The table DTO.
-
toDTO
Converts a Distribution implementation to a DistributionDTO.- Parameters:
distribution
- The distribution implementation.- Returns:
- The distribution DTO.
-
toDTO
Converts a SortOrder implementation to a SortOrderDTO.- Parameters:
sortOrder
- The sort order implementation.- Returns:
- The sort order DTO.
-
toDTO
Converts a Transform implementation to a Partitioning DTO.- Parameters:
transform
- The transform implementation.- Returns:
- The partitioning DTO.
-
toDTO
Converts an index implementation to an IndexDTO.- Parameters:
index
- The index implementation.- Returns:
- The index DTO.
-
toDTO
Converts a user implementation to a UserDTO.- Parameters:
user
- The user implementation.- Returns:
- The user DTO.
-
toDTO
Converts a group implementation to a GroupDTO.- Parameters:
group
- The group implementation.- Returns:
- The group DTO.
-
toDTO
Converts a role implementation to a RoleDTO.- Parameters:
role
- The role implementation.- Returns:
- The role DTO.
-
toDTO
Converts a securable object implementation to a SecurableObjectDTO.- Parameters:
securableObject
- The securable object implementation.- Returns:
- The securable object DTO.
-
toDTO
Converts a privilege implementation to a PrivilegeDTO.- Parameters:
privilege
- The privilege implementation.- Returns:
- The privilege DTO.
-
toDTO
Converts a MetadataObject to a MetadataObjectDTO.- Parameters:
metadataObject
- The metadata object to be converted.- Returns:
- The metadata object DTO.
-
toDTO
Converts a Tag to a TagDTO.- Parameters:
tag
- The tag to be converted.inherited
- The inherited flag.- Returns:
- The tag DTO.
-
toDTO
Converts a PolicyContent to a PolicyContentDTO.- Parameters:
policyContent
- The policyContent to be converted.- Returns:
- The policy content DTO.
-
toDTO
Converts credentials to CredentialDTOs.- Parameters:
credentials
- the credentials to be converted.- Returns:
- The credential DTOs.
-
toDTO
Converts a Credential to a CredentialDTO.- Parameters:
credential
- the credential to be converted.- Returns:
- The credential DTO.
-
toFunctionArg
Converts an Expression to an FunctionArg DTO.- Parameters:
expression
- The expression to be converted.- Returns:
- The expression DTO.
-
toFunctionArg
Converts an array of Expressions to an array of FunctionArg DTOs.- Parameters:
expressions
- The expressions to be converted.- Returns:
- The array of FunctionArg DTOs.
-
toDTO
Converts a Fileset to a FilesetDTO.- Parameters:
fileset
- The fileset to be converted.- Returns:
- The fileset DTO.
-
toDTO
Converts array of FileInfo to array of FileInfoDTO.- Parameters:
files
- The FileInfo array to convert.- Returns:
- The converted FileInfoDTO array.
-
toDTO
Converts a Topic to a TopicDTO.- Parameters:
topic
- The topic to be converted.- Returns:
- The topic DTO.
-
toDTO
Converts a Model to a ModelDTO.- Parameters:
model
- The model to be converted.- Returns:
- The model DTO.
-
toDTO
Converts a ModelVersion to a ModelVersionDTO.- Parameters:
modelVersion
- The model version to be converted.- Returns:
- The model version DTO.
-
toDTOs
Converts an array of ModelVersions to an array of ModelVersionDTOs.- Parameters:
modelVersions
- The modelVersions to be converted.- Returns:
- The array of ModelVersionDTOs.
-
toDTOs
Converts an array of Columns to an array of ColumnDTOs.- Parameters:
columns
- The columns to be converted.- Returns:
- The array of ColumnDTOs.
-
toDTOs
Converts an array of SortOrders to an array of SortOrderDTOs.- Parameters:
sortOrders
- The sort orders to be converted.- Returns:
- The array of SortOrderDTOs.
-
toDTOs
Converts an array of Transforms to an array of Partitioning DTOs.- Parameters:
transforms
- The transforms to be converted.- Returns:
- The array of Partitioning DTOs.
-
toDTOs
Converts an array of Indexes to an array of IndexDTOs.- Parameters:
indexes
- The indexes to be converted.- Returns:
- The array of IndexDTOs.
-
toDTOs
Converts an array of Partitions to an array of PartitionDTOs.- Parameters:
partitions
- The partitions to be converted.- Returns:
- The array of PartitionDTOs.
-
toDTOs
Converts an array of Catalogs to an array of CatalogDTOs.- Parameters:
catalogs
- The catalogs to be converted.- Returns:
- The array of CatalogDTOs.
-
toDTOs
Converts an array of Users to an array of UserDTOs.- Parameters:
users
- The users to be converted.- Returns:
- The array of UserDTOs.
-
toDTOs
Converts an array of Groups to an array of GroupDTOs.- Parameters:
groups
- The groups to be converted.- Returns:
- The array of GroupDTOs.
-
toDTOs
Converts an array of statistics to an array of StatisticDTOs.- Parameters:
statistics
- The statistics to be converted.- Returns:
- The array of StatisticDTOs.
-
fromDTO
Converts a DistributionDTO to a Distribution.- Parameters:
distributionDTO
- The distribution DTO.- Returns:
- The distribution.
-
fromFunctionArgs
Converts a FunctionArg DTO to an Expression.- Parameters:
args
- The function argument DTOs to be converted.- Returns:
- The array of Expressions.
-
fromFunctionArg
Converts a FunctionArg DTO to an Expression.- Parameters:
arg
- The function argument DTO to be converted.- Returns:
- The expression.
-
fromDTO
Converts a IndexDTO to an Index.- Parameters:
indexDTO
- The Index DTO to be converted.- Returns:
- The index.
-
fromDTOs
Converts an array of IndexDTOs to an array of Indexes.- Parameters:
indexDTOs
- The Index DTOs to be converted.- Returns:
- The array of Indexes.
-
fromDTO
Converts a PartitionDTO to a Partition.- Parameters:
partitionDTO
- The partition DTO to be converted.- Returns:
- The partition.
-
fromDTO
Converts a SortOrderDTO to a SortOrder.- Parameters:
sortOrderDTO
- The sort order DTO to be converted.- Returns:
- The sort order.
-
fromDTOs
Converts an array of SortOrderDTOs to an array of SortOrders.- Parameters:
sortOrderDTO
- The sort order DTOs to be converted.- Returns:
- The array of SortOrders.
-
fromDTOs
Converts an array of Partitioning DTOs to an array of Transforms.- Parameters:
partitioning
- The partitioning DTOs to be converted.- Returns:
- The array of Transforms.
-
fromDTOs
Converts a ColumnDTO to a Column.- Parameters:
columns
- The column DTO to be converted.- Returns:
- The column.
-
fromDTO
Converts CredentialDTO array to credential array.- Parameters:
credentials
- The credential DTO array to be converted.- Returns:
- The credential array.
-
fromDTO
Converts a CredentialDTO to a credential.- Parameters:
credential
- The credential DTO to be converted.- Returns:
- The credential.
-
fromDTO
Converts a ColumnDTO to a Column.- Parameters:
column
- The column DTO to be converted.- Returns:
- The column.
-
fromDTO
Converts a TableDTO to a Table.- Parameters:
tableDTO
- The table DTO to be converted.- Returns:
- The table.
-
fromDTO
Converts a partitioning DTO to a Transform.- Parameters:
partitioning
- The partitioning DTO to be converted.- Returns:
- The transform.
-
fromPrivilegeDTO
Converts a Privilege DTO to a Privilege- Parameters:
privilegeDTO
- The privilege DTO to be converted.- Returns:
- The privilege.
-
fromDTO
Converts a JobTemplateDTO to a JobTemplate.- Parameters:
jobTemplateDTO
- The job template DTO to be converted.- Returns:
- The job template.
-
fromDTO
Converts a PolicyContentDTO to a PolicyContent.- Parameters:
policyContentDTO
- The policy content DTO to be converted.- Returns:
- The policy content.
-