public SupportingNodeBuilder(SupportingNode base) { this.key = base.key(); this._nodeRef = base.getNodeRef(); this._topologyRef = base.getTopologyRef(); if (base instanceof SupportingNodeImpl) { SupportingNodeImpl impl = (SupportingNodeImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") Map<Class<? extends Augmentation<SupportingNode>>, Augmentation<SupportingNode>> aug =((AugmentationHolder<SupportingNode>) base).augmentations(); if (!aug.isEmpty()) { this.augmentation = new HashMap<>(aug); } } }
if (!Objects.equals(_nodeRef, other.getNodeRef())) { return false;
public SupportingNodeBuilder(SupportingNode base) { if (base.getKey() == null) { this._key = new SupportingNodeKey( base.getNodeRef(), base.getTopologyRef() ); this._nodeRef = base.getNodeRef(); this._topologyRef = base.getTopologyRef(); } else { this._key = base.getKey(); this._nodeRef = _key.getNodeRef(); this._topologyRef = _key.getTopologyRef(); } if (base instanceof SupportingNodeImpl) { SupportingNodeImpl impl = (SupportingNodeImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (other.getNodeRef() != null) { return false; } else if(!_nodeRef.equals(other.getNodeRef())) { return false;
private void handleSni(final InstanceIdentifier<Node> sni, final Node n, final Boolean inControl, final ReadWriteTransaction trans) { if (sni != null) { final NodeKey k = InstanceIdentifier.keyOf(sni); boolean have = false; /* * We may have found a termination point which has been created as a destination, * so it does not have a supporting node pointer. Since we now know what it is, * fill it in. */ if (n.getSupportingNode() != null) { for (final SupportingNode sn : n.getSupportingNode()) { if (sn.getNodeRef().equals(k.getNodeId())) { have = true; break; } } } if (!have) { final SupportingNode sn = createSupportingNode(k.getNodeId(), inControl); trans.put(LogicalDatastoreType.OPERATIONAL, this.target.child(Node.class, n.getKey()).child( SupportingNode.class, sn.getKey()), sn); } } }