org.somda.sdc.biceps.common.access.WriteDescriptionResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biceps Show documentation
Show all versions of biceps Show documentation
SDCri is a set of Java libraries that implements a network communication framework conforming
with the IEEE 11073 SDC specifications. This project implements the functionality described in
IEEE 11073-10207.
package org.somda.sdc.biceps.common.access;
import org.somda.sdc.biceps.common.MdibEntity;
import org.somda.sdc.biceps.model.participant.MdibVersion;
import org.somda.sdc.common.util.ObjectStringifier;
import org.somda.sdc.common.util.Stringified;
import java.util.Collections;
import java.util.List;
/**
* Read-only result set of a write description call.
*/
public class WriteDescriptionResult {
@Stringified
private final MdibVersion mdibVersion;
private final List insertedEntities;
private final List updatedEntities;
private final List deletedEntities;
/**
* Constructor to initialize all values of the result set.
*
* @param mdibVersion the MDIB version.
* @param insertedEntities all inserted entities.
* @param updatedEntities all updated entities.
* @param deletedEntities all deleted entities.
*/
public WriteDescriptionResult(MdibVersion mdibVersion,
List insertedEntities,
List updatedEntities,
List deletedEntities) {
this.mdibVersion = mdibVersion;
this.insertedEntities = Collections.unmodifiableList(insertedEntities);
this.updatedEntities = Collections.unmodifiableList(updatedEntities);
this.deletedEntities = Collections.unmodifiableList(deletedEntities);
}
/**
* Gets the MDIB version that ensued during the preceding write operation.
*
* @return the MDIB version.
*/
public MdibVersion getMdibVersion() {
return mdibVersion;
}
/**
* Gets all inserted entities.
*
* @return the entities.
*/
public List getInsertedEntities() {
return insertedEntities;
}
/**
* Gets all updated entities.
*
* @return the entities.
*/
public List getUpdatedEntities() {
return updatedEntities;
}
/**
* Gets all deleted entities.
*
* @return the entities.
*/
public List getDeletedEntities() {
return deletedEntities;
}
@Override
public String toString() {
return ObjectStringifier.stringify(this);
}
}