public UpdatedGroup build() { return new UpdatedGroupImpl(this); }
public OriginalGroup build() { return new OriginalGroupImpl(this); }
public UpdatedGroupBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.UpdatedGroup>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.UpdatedGroup> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
@Override public void update(final InstanceIdentifier<Group> identifier, final Group original, final Group update, final InstanceIdentifier<FlowCapableNode> nodeIdent) { final Group originalGroup = (original); final Group updatedGroup = (update); final UpdateGroupInputBuilder builder = new UpdateGroupInputBuilder(); builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class))); builder.setGroupRef(new GroupRef(identifier)); builder.setTransactionUri(new Uri(provider.getNewTransactionId())); builder.setUpdatedGroup((new UpdatedGroupBuilder(updatedGroup)).build()); builder.setOriginalGroup((new OriginalGroupBuilder(originalGroup)).build()); this.provider.getSalGroupService().updateGroup(builder.build()); }
public UpdatedGroupBuilder(UpdatedGroup base) { this._buckets = base.getBuckets(); this._containerName = base.getContainerName(); this._groupId = base.getGroupId(); this._groupName = base.getGroupName(); this._groupType = base.getGroupType(); this._barrier = base.isBarrier(); if (base instanceof UpdatedGroupImpl) { UpdatedGroupImpl impl = (UpdatedGroupImpl) 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.opendaylight.group.service.rev130918.group.update.UpdatedGroup> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.UpdatedGroup>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
public OriginalGroupBuilder(OriginalGroup base) { this._buckets = base.getBuckets(); this._containerName = base.getContainerName(); this._groupId = base.getGroupId(); this._groupName = base.getGroupName(); this._groupType = base.getGroupType(); this._barrier = base.isBarrier(); if (base instanceof OriginalGroupImpl) { OriginalGroupImpl impl = (OriginalGroupImpl) 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.opendaylight.group.service.rev130918.group.update.OriginalGroup> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
private OriginalGroupImpl(OriginalGroupBuilder base) { this._buckets = base.getBuckets(); this._containerName = base.getContainerName(); this._groupId = base.getGroupId(); this._groupName = base.getGroupName(); this._groupType = base.getGroupType(); this._barrier = base.isBarrier(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
private UpdatedGroupImpl(UpdatedGroupBuilder base) { this._buckets = base.getBuckets(); this._containerName = base.getContainerName(); this._groupId = base.getGroupId(); this._groupName = base.getGroupName(); this._groupType = base.getGroupType(); this._barrier = base.isBarrier(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.UpdatedGroup>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.UpdatedGroup>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.UpdatedGroup>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.UpdatedGroup>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public OriginalGroupBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
groupBuilder.setGroupRef(new GroupRef(identifier)); groupBuilder.setTransactionUri(new Uri(getNewTransactionId())); groupBuilder.setUpdatedGroup((new UpdatedGroupBuilder(updGroup)).build()); if (origGroup == null){ LOG.warn("updateGroup: orig group is null not setting it"); groupBuilder.setOriginalGroup((new OriginalGroupBuilder(origGroup)).build());
if (!Objects.equals(_buckets, other.getBuckets())) { return false; if (!Objects.equals(_containerName, other.getContainerName())) { return false; if (!Objects.equals(_groupId, other.getGroupId())) { return false; if (!Objects.equals(_groupName, other.getGroupName())) { return false; if (!Objects.equals(_groupType, other.getGroupType())) { return false; if (!Objects.equals(_barrier, other.isBarrier())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
if (!Objects.equals(_buckets, other.getBuckets())) { return false; if (!Objects.equals(_containerName, other.getContainerName())) { return false; if (!Objects.equals(_groupId, other.getGroupId())) { return false; if (!Objects.equals(_groupName, other.getGroupName())) { return false; if (!Objects.equals(_groupType, other.getGroupType())) { return false; if (!Objects.equals(_barrier, other.isBarrier())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;