@Override public AtlasEntityDef update(AtlasEntityDef entityDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasEntityDefStoreV1.update({})", entityDef); } validateType(entityDef); AtlasEntityDef ret = StringUtils.isNotBlank(entityDef.getGuid()) ? updateByGuid(entityDef.getGuid(), entityDef) : updateByName(entityDef.getName(), entityDef); if (LOG.isDebugEnabled()) { LOG.debug("<== AtlasEntityDefStoreV1.update({}): {}", entityDef, ret); } return ret; }
@Override public AtlasEntityDef update(AtlasEntityDef entityDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasEntityDefStoreV1.update({})", entityDef); } validateType(entityDef); AtlasEntityDef ret = StringUtils.isNotBlank(entityDef.getGuid()) ? updateByGuid(entityDef.getGuid(), entityDef) : updateByName(entityDef.getName(), entityDef); if (LOG.isDebugEnabled()) { LOG.debug("<== AtlasEntityDefStoreV1.update({}): {}", entityDef, ret); } return ret; }
AtlasEntityDef createdDef = entityDefStore.create(entityDef, preCreateEntityDefs.get(i)); ttr.updateGuid(createdDef.getName(), createdDef.getGuid());
int i = 0; for (AtlasClassificationDef classifiDef : typesDef.getClassificationDefs()) { if (StringUtils.isNotBlank(classifiDef.getGuid())) { classifiDefStore.deleteByGuid(classifiDef.getGuid(), preDeleteClassifiDefs.get(i)); } else { classifiDefStore.deleteByName(classifiDef.getName(), preDeleteClassifiDefs.get(i));
if (StringUtils.isNotBlank(entityDef.getGuid())) { preDeleteEntityDefs.add(entityDefStore.preDeleteByGuid(entityDef.getGuid())); } else { preDeleteEntityDefs.add(entityDefStore.preDeleteByName(entityDef.getName())); int i = 0; for (AtlasEntityDef entityDef : typesDef.getEntityDefs()) { if (StringUtils.isNotBlank(entityDef.getGuid())) { entityDefStore.deleteByGuid(entityDef.getGuid(), preDeleteEntityDefs.get(i)); } else { entityDefStore.deleteByName(entityDef.getName(), preDeleteEntityDefs.get(i));
AtlasEntityDef updated = typeDefStore.updateEntityDefByGuid(entityDef.getGuid(), entityDef); assertNotNull(updated);