com.nedap.archie.rm.RMObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openehr-rm Show documentation
Show all versions of openehr-rm Show documentation
An implementation of the openehr reference model
package com.nedap.archie.rm;
import com.esotericsoftware.kryo.kryo5.Kryo;
import com.nedap.archie.base.OpenEHRBase;
import com.nedap.archie.util.KryoUtil;
import java.io.Serializable;
/**
* Common base class for all RM Objects. Should this be an interface instead?
*
* Created by pieter.bos on 01/03/16.
*/
public abstract class RMObject extends OpenEHRBase implements Serializable, Cloneable {
public RMObject clone() {
Kryo kryo = null;
try {
kryo = KryoUtil.getPool().obtain();
return kryo.copy(this);
} finally {
KryoUtil.getPool().free(kryo);
}
}
}