Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type hierarchy around DataManager #8526

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ public void updateCommentVisibility(String userId,
0,
0);

if (relationships != null)
if ((relationships != null) && (relationships.getElementList() != null))
{
for (OpenMetadataRelationship relationship : relationships.getElementList())
{
Expand Down Expand Up @@ -809,7 +809,7 @@ public void clearAcceptedAnswer(String userId,
0,
0);

if (relationships != null)
if ((relationships != null) && (relationships.getElementList() != null))
{
for (OpenMetadataRelationship relationship : relationships.getElementList())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void update0050ApplicationsAndProcesses()
private EntityDef addDataAccessManagerEntity()
{
return archiveHelper.getDefaultEntityDef(OpenMetadataType.DATA_ACCESS_MANAGER,
this.archiveBuilder.getEntityDef(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName));
this.archiveBuilder.getEntityDef(OpenMetadataType.DATA_MANAGER.typeName));
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,18 +372,8 @@ private void update0224Databases()

private EntityDef addDatabaseManagerEntity()
{
final String guid = OpenMetadataType.DATABASE_MANAGER.typeGUID;
final String name = OpenMetadataType.DATABASE_MANAGER.typeName;
final String description = OpenMetadataType.DATABASE_MANAGER.description;
final String descriptionGUID = OpenMetadataType.DATABASE_MANAGER.descriptionGUID;
final String descriptionWiki = OpenMetadataType.DATABASE_MANAGER.wikiURL;

return archiveHelper.getDefaultEntityDef(guid,
name,
this.archiveBuilder.getEntityDef(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName),
description,
descriptionGUID,
descriptionWiki);
return archiveHelper.getDefaultEntityDef(OpenMetadataType.DATABASE_MANAGER,
this.archiveBuilder.getEntityDef(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,8 @@ private ClassificationDef getUserAccessDirectoryClassification()

private ClassificationDef getMasterDataManagerClassification()
{
return archiveHelper.getClassificationDef(OpenMetadataType.MASTER_DATA_MANAGER.typeGUID,
OpenMetadataType.MASTER_DATA_MANAGER.typeName,
return archiveHelper.getClassificationDef(OpenMetadataType.MASTER_DATA_MANAGER,
null,
OpenMetadataType.MASTER_DATA_MANAGER.description,
OpenMetadataType.MASTER_DATA_MANAGER.descriptionGUID,
OpenMetadataType.MASTER_DATA_MANAGER.wikiURL,
this.archiveBuilder.getEntityDef(OpenMetadataType.REFERENCEABLE.typeName),
false);
}
Expand All @@ -234,12 +230,8 @@ private void update0137ToDos()

private RelationshipDef getActionTargetRelationship()
{
RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(OpenMetadataType.ACTION_TARGET_RELATIONSHIP.typeGUID,
OpenMetadataType.ACTION_TARGET_RELATIONSHIP.typeName,
RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(OpenMetadataType.ACTION_TARGET_RELATIONSHIP,
null,
OpenMetadataType.ACTION_TARGET_RELATIONSHIP.description,
OpenMetadataType.ACTION_TARGET_RELATIONSHIP.descriptionGUID,
OpenMetadataType.ACTION_TARGET_RELATIONSHIP.wikiURL,
ClassificationPropagationRule.NONE);

RelationshipEndDef relationshipEndDef;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ private void update0050ApplicationsAndProcesses()
{
this.archiveBuilder.addEntityDef(addCatalogEntity());
this.archiveBuilder.addEntityDef(addDataManagerEntity());
this.archiveBuilder.addTypeDefPatch(updateDatabaseManager());
}


Expand All @@ -630,6 +631,20 @@ private EntityDef addDataManagerEntity()
this.archiveBuilder.getEntityDef(OpenMetadataType.SOFTWARE_SERVER_CAPABILITY.typeName));
}

private TypeDefPatch updateDatabaseManager()
{
/*
* Create the Patch
*/
TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(OpenMetadataType.DATABASE_MANAGER.typeName);

typeDefPatch.setUpdatedBy(originatorName);
typeDefPatch.setUpdateTime(creationDate);
typeDefPatch.setSuperType(this.archiveBuilder.getEntityDef(OpenMetadataType.DATA_MANAGER.typeName));

return typeDefPatch;
}


/*
* -------------------------------------------------------------------------------------------------------
Expand Down
Loading