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 CredentialfromDTO(CredentialDTO credential) Converts a CredentialDTO to a credential.static Credential[]fromDTO(CredentialDTO[] credentials) Converts CredentialDTO array to credential array.static JobTemplatefromDTO(JobTemplateDTO jobTemplateDTO) Converts a JobTemplateDTO to a JobTemplate.static PolicyContentfromDTO(PolicyContentDTO policyContentDTO) Converts a PolicyContentDTO to a PolicyContent.static ColumnConverts a ColumnDTO to a Column.static DistributionfromDTO(DistributionDTO distributionDTO) Converts a DistributionDTO to a Distribution.static IndexConverts a IndexDTO to an Index.static TransformfromDTO(Partitioning partitioning) Converts a partitioning DTO to a Transform.static PartitionfromDTO(PartitionDTO partitionDTO) Converts a PartitionDTO to a Partition.static SortOrderfromDTO(SortOrderDTO sortOrderDTO) Converts a SortOrderDTO to a SortOrder.static TableConverts 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 ExpressionConverts a FunctionArg DTO to an Expression.static Expression[]fromFunctionArgs(FunctionArg[] args) Converts a FunctionArg DTO to an Expression.static PrivilegefromPrivilegeDTO(PrivilegeDTO privilegeDTO) Converts a Privilege DTO to a Privilegestatic AuditDTOstatic GroupDTOConverts a group implementation to a GroupDTO.static OwnerDTOstatic PrivilegeDTOConverts a privilege implementation to a PrivilegeDTO.static RoleDTOConverts a role implementation to a RoleDTO.static SecurableObjectDTOtoDTO(SecurableObject securableObject) Converts a securable object implementation to a SecurableObjectDTO.static UserDTOConverts a user implementation to a UserDTO.static CatalogDTOConverts aCatalogto aCatalogDTO.static CredentialDTOtoDTO(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 FilesetDTOConverts a Fileset to a FilesetDTO.static TopicDTOConverts a Topic to a TopicDTO.static MetadataObjectDTOtoDTO(MetadataObject metadataObject) Converts a MetadataObject to a MetadataObjectDTO.static MetalakeDTOConverts aMetalaketo aMetalakeDTO.static ModelDTOConverts a Model to a ModelDTO.static ModelVersionDTOtoDTO(ModelVersion modelVersion) Converts a ModelVersion to a ModelVersionDTO.static PolicyContentDTOtoDTO(PolicyContent policyContent) Converts a PolicyContent to a PolicyContentDTO.static ColumnDTOstatic DistributionDTOtoDTO(Distribution distribution) Converts a Distribution implementation to a DistributionDTO.static SortOrderDTOConverts a SortOrder implementation to a SortOrderDTO.static PartitioningConverts a Transform implementation to a Partitioning DTO.static IndexDTOConverts an index implementation to an IndexDTO.static PartitionDTOConverts aPartitionto aPartitionDTO.static TableDTOConverts a table implementation to aTableDTO.static SchemaDTOstatic TagDTOConverts 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 FunctionArgtoFunctionArg(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 aMetalaketo aMetalakeDTO.- Parameters:
metalake- The metalake.- Returns:
- The metalake DTO.
-
toDTO
Converts aPartitionto aPartitionDTO.- Parameters:
partition- The partition.- Returns:
- The partition DTO.
-
toDTO
Converts aCatalogto 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.
-