Example usage for org.hibernate.internal.util SerializationHelper clone

List of usage examples for org.hibernate.internal.util SerializationHelper clone

Introduction

In this page you can find the example usage for org.hibernate.internal.util SerializationHelper clone.

Prototype

public static Object clone(Serializable object) throws SerializationException 

Source Link

Document

Deep clone an Object using serialization.

This is many times slower than writing clone methods by hand on all objects in your object graph.

Usage

From source file:com.flipkart.flux.type.ListJsonType.java

License:Apache License

/** Performs deep copy of an object using serialization and de-serialization*/
@Override// w w w .j  a  va2s  .  c o m
public Object deepCopy(Object value) throws HibernateException {
    return SerializationHelper.clone((Serializable) value);
}

From source file:edu.cad.utils.hibernateutils.EntityCloner.java

public static <T> T clone(Class<T> clazz, T dtls) {
    T clonedObject = (T) SerializationHelper.clone((Serializable) dtls);
    return clonedObject;
}