org.nakedobjects.nos.remote.command.java.JavaClientResult Maven / Gradle / Ivy
package org.nakedobjects.nos.remote.command.java;
import java.io.Serializable;
import org.nakedobjects.noa.adapter.Version;
import org.nakedobjects.noa.util.ByteDecoder;
import org.nakedobjects.noa.util.ByteEncoder;
import org.nakedobjects.noa.util.Encodable;
import org.nakedobjects.nof.reflect.remote.data.ClientActionResultData;
import org.nakedobjects.nof.reflect.remote.data.ObjectData;
import org.nakedobjects.nof.reflect.remote.data.ReferenceData;
public class JavaClientResult implements ClientActionResultData, Encodable, Serializable {
private static final long serialVersionUID = 1L;
private final ReferenceData[] madePersistent;
private final Version[] changedVersion;
private final ObjectData[] updates;
JavaClientResult(final ReferenceData[] madePersistent, final Version[] changedVersion, final ObjectData[] updates) {
this.madePersistent = madePersistent;
this.changedVersion = changedVersion;
this.updates = updates;
}
public JavaClientResult(final ByteDecoder decoder) {
changedVersion = (Version[]) decoder.getObjects();
madePersistent = (ObjectData[]) decoder.getObjects();
updates = (ObjectData[]) decoder.getObjects();
}
public void encode(final ByteEncoder encoder) {
encoder.add(changedVersion);
encoder.add(madePersistent);
encoder.add(updates);
}
public ReferenceData[] getPersisted() {
return madePersistent;
}
public Version[] getChanged() {
return changedVersion;
}
public ObjectData[] getUpdates() {
return updates;
}
}
// Copyright (c) Naked Objects Group Ltd.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy