All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nedap.archie.rm.RMObject Maven / Gradle / Ivy

There is a newer version: 3.11.0
Show newest version
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);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy