forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dataPlatformInstance) - Resolve and display dataPlatformInstance…
… on entities (datahub-project#4867) Co-authored-by: Chris Collins <[email protected]>
- Loading branch information
1 parent
809c949
commit dabc3f8
Showing
58 changed files
with
555 additions
and
11 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
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
26 changes: 26 additions & 0 deletions
26
...a/com/linkedin/datahub/graphql/types/common/mappers/DataPlatformInstanceAspectMapper.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,26 @@ | ||
package com.linkedin.datahub.graphql.types.common.mappers; | ||
|
||
import com.linkedin.datahub.graphql.generated.DataPlatformInstance; | ||
import com.linkedin.datahub.graphql.generated.EntityType; | ||
import com.linkedin.datahub.graphql.types.mappers.ModelMapper; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class DataPlatformInstanceAspectMapper implements ModelMapper<com.linkedin.common.DataPlatformInstance, DataPlatformInstance> { | ||
|
||
public static final DataPlatformInstanceAspectMapper INSTANCE = new DataPlatformInstanceAspectMapper(); | ||
|
||
public static DataPlatformInstance map(@Nonnull final com.linkedin.common.DataPlatformInstance dataPlatformInstance) { | ||
return INSTANCE.apply(dataPlatformInstance); | ||
} | ||
|
||
@Override | ||
public DataPlatformInstance apply(@Nonnull final com.linkedin.common.DataPlatformInstance input) { | ||
final DataPlatformInstance result = new DataPlatformInstance(); | ||
if (input.hasInstance()) { | ||
result.setType(EntityType.DATA_PLATFORM_INSTANCE); | ||
result.setUrn(input.getInstance().toString()); | ||
} | ||
return result; | ||
} | ||
} |
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.