public final class EntityV4DtoConverters
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static com.netflix.genie.common.external.dtos.v4.Criterion |
toCriterionDto(CriterionEntity criterionEntity)
Convert a given
CriterionEntity to the equivalent Criterion DTO representation. |
static com.netflix.genie.common.internal.dtos.v4.FinishedJob |
toFinishedJobDto(FinishedJobProjection finishedJobProjection)
Convert a given
FinishedJobProjection to the equivalent FinishedJob DTO representation. |
static com.netflix.genie.common.external.dtos.v4.JobSpecification |
toJobSpecificationDto(JobSpecificationProjection jobSpecificationProjection)
Convert the values contained in the
JobSpecificationProjection to an immutable JobSpecification
DTO. |
static com.netflix.genie.common.external.dtos.v4.Application |
toV4ApplicationDto(ApplicationEntity applicationEntity)
Convert an application entity to a DTO for external exposure.
|
static com.netflix.genie.common.external.dtos.v4.Cluster |
toV4ClusterDto(ClusterEntity clusterEntity)
Convert a cluster entity to a DTO for external exposure.
|
static com.netflix.genie.common.external.dtos.v4.Command |
toV4CommandDto(CommandEntity commandEntity)
Convert a command entity to a DTO for external exposure.
|
static com.netflix.genie.common.external.dtos.v4.JobRequest |
toV4JobRequestDto(V4JobRequestProjection jobRequestProjection)
Convert a job request entity to a DTO.
|
public static com.netflix.genie.common.external.dtos.v4.Application toV4ApplicationDto(ApplicationEntity applicationEntity) throws java.lang.IllegalArgumentException
applicationEntity - The entity to convertjava.lang.IllegalArgumentException - On invalid fieldpublic static com.netflix.genie.common.external.dtos.v4.Cluster toV4ClusterDto(ClusterEntity clusterEntity) throws java.lang.IllegalArgumentException
clusterEntity - The entity to convertjava.lang.IllegalArgumentException - On any invalid field valuepublic static com.netflix.genie.common.external.dtos.v4.Command toV4CommandDto(CommandEntity commandEntity) throws java.lang.IllegalArgumentException
commandEntity - The entity to convertjava.lang.IllegalArgumentException - On any invalid field valuepublic static com.netflix.genie.common.external.dtos.v4.JobRequest toV4JobRequestDto(V4JobRequestProjection jobRequestProjection)
jobRequestProjection - The projection of the V4JobRequestProjection to convertcom.netflix.genie.common.internal.exceptions.unchecked.GenieRuntimeException - When criterion can't be properly convertedpublic static com.netflix.genie.common.external.dtos.v4.Criterion toCriterionDto(CriterionEntity criterionEntity)
CriterionEntity to the equivalent Criterion DTO representation.criterionEntity - The entity to convertpublic static com.netflix.genie.common.internal.dtos.v4.FinishedJob toFinishedJobDto(FinishedJobProjection finishedJobProjection) throws java.lang.IllegalArgumentException
FinishedJobProjection to the equivalent FinishedJob DTO representation.finishedJobProjection - the entity projectionjava.lang.IllegalArgumentException - On any invalid fieldpublic static com.netflix.genie.common.external.dtos.v4.JobSpecification toJobSpecificationDto(JobSpecificationProjection jobSpecificationProjection)
JobSpecificationProjection to an immutable JobSpecification
DTO.jobSpecificationProjection - The entity values to convertcom.netflix.genie.common.internal.exceptions.unchecked.GenieClusterNotFoundException - When the cluster isn't found in the database which it should be at this
point given the input to the db was valid at the time of persistencecom.netflix.genie.common.internal.exceptions.unchecked.GenieCommandNotFoundException - When the command isn't found in the database which it should be at this
point given the input to the db was valid at the time of persistencecom.netflix.genie.common.internal.exceptions.unchecked.GenieRuntimeException - All input should be valid at this point so if we can't create a job spec
dto something has become corrupted in the db