forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'datahub-project:master' into master
- Loading branch information
Showing
71 changed files
with
16,883 additions
and
4,355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
.../java/com/linkedin/datahub/graphql/types/common/mappers/GroupingCriterionInputMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.linkedin.datahub.graphql.types.common.mappers; | ||
|
||
import com.linkedin.data.template.SetMode; | ||
import com.linkedin.datahub.graphql.generated.GroupingCriterion; | ||
import com.linkedin.datahub.graphql.types.entitytype.EntityTypeMapper; | ||
import com.linkedin.datahub.graphql.types.mappers.ModelMapper; | ||
import javax.annotation.Nonnull; | ||
|
||
public class GroupingCriterionInputMapper | ||
implements ModelMapper<GroupingCriterion, com.linkedin.metadata.query.GroupingCriterion> { | ||
|
||
public static final GroupingCriterionInputMapper INSTANCE = new GroupingCriterionInputMapper(); | ||
|
||
public static com.linkedin.metadata.query.GroupingCriterion map( | ||
@Nonnull final GroupingCriterion groupingCriterion) { | ||
return INSTANCE.apply(groupingCriterion); | ||
} | ||
|
||
@Override | ||
public com.linkedin.metadata.query.GroupingCriterion apply(GroupingCriterion input) { | ||
return new com.linkedin.metadata.query.GroupingCriterion() | ||
.setBaseEntityType( | ||
input.getBaseEntityType() != null | ||
? EntityTypeMapper.getName(input.getBaseEntityType()) | ||
: null, | ||
SetMode.REMOVE_OPTIONAL_IF_NULL) | ||
.setGroupingEntityType(EntityTypeMapper.getName(input.getGroupingEntityType())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.