use of com.hortonworks.registries.storage.StorableKey in project registry by hortonworks.
the class CatalogTagService method removeTag.
@Override
public Tag removeTag(Long tagId) {
Tag tag = getTag(tagId);
if (tag != null) {
if (!getEntities(tagId, false).isEmpty()) {
throw new TagNotEmptyException("Tag not empty, has child entities.");
}
removeTagsFromStorable(getTaggedEntity(tag), tag.getTags());
dao.<Tag>remove(new StorableKey(TAG_NAMESPACE, tag.getPrimaryKey()));
}
return tag;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class EnvironmentService method removeServiceClusterMapping.
public NamespaceServiceClusterMap removeServiceClusterMapping(Long namespaceId, String serviceName, Long clusterId) {
assertEnvironmentIsNotInternal(namespaceId);
StorableKey key = getStorableKeyForNamespaceServiceClusterMapping(namespaceId, serviceName, clusterId);
NamespaceServiceClusterMap ret = this.dao.remove(key);
invalidateTopologyActionsMetricsInstances(namespaceId);
return ret;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class EnvironmentService method getStorableKeyForNamespaceServiceClusterMapping.
private StorableKey getStorableKeyForNamespaceServiceClusterMapping(Long namespaceId, String serviceName, Long clusterId) {
NamespaceServiceClusterMap mapping = new NamespaceServiceClusterMap();
mapping.setNamespaceId(namespaceId);
mapping.setServiceName(serviceName);
mapping.setClusterId(clusterId);
return new StorableKey(NAMESPACE_SERVICE_CLUSTER_MAPPING_NAMESPACE, mapping.getPrimaryKey());
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class EnvironmentService method removeService.
public Service removeService(Long serviceId) {
Service service = new Service();
service.setId(serviceId);
return dao.remove(new StorableKey(SERVICE_NAMESPACE, service.getPrimaryKey()));
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class EnvironmentService method getComponent.
public Component getComponent(Long componentId) {
Component component = new Component();
component.setId(componentId);
return this.dao.get(new StorableKey(COMPONENT_NAMESPACE, component.getPrimaryKey()));
}
Aggregations