CloneUtils Icon

CloneUtils

beta
5.0 Stars (2)
1 Download (This Week)
Last Update:
Download cloneutils-1.0.1.jar
Browse All Files
Windows Mac Linux

Description

A simple library for cloning java objects. And it can do it in three ways. The shallow copy, the serialized copy and the deep clone. It is useful if you need to detach an entity from an EntityManager.

CloneUtils Web Site

Categories

Libraries

License

Apache License V2.0

Features

  • Clone shallow objects.
  • Clone objects with serialization.
  • Deep clone objects using reflexion.
  • Deep clone deattach from EntityManager or SessionFactory.

KEEP ME UPDATED

User Ratings

★★★★★
★★★★
★★★
★★
2
0
0
0
0
ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
Write a Review

User Reviews

  • tfileme
    1 of 5 2 of 5 3 of 5 4 of 5 5 of 5

    Thanks for so usefull software.

    Posted 05/22/2013
  • julio_helden
    1 of 5 2 of 5 3 of 5 4 of 5 5 of 5

    Hi Alan, first of all i would like to thank you for your initiative in solve this huge problem. I used the HibernateBeanCloner and it worked very well :). Right now, i am facing a scenario where the object i would like to clone has an attribute and this attribute in an enumeration: @Entity public class Lights extends BasePojo { private static final long serialVersionUID = -3511966258961336172L; private Double powerDensityMax; private Double powerDensityMaxA; private Double powerDensityMaxB; private Double powerDensityMaxC; private Double powerDensityMaxD; @Enumerated(EnumType.STRING) @Column(nullable = false) private AssemblyType assemblyType; when i tried to clone it using HibernateBeanCloner i received the following error: java.lang.InstantiationException: br.org.certi.maestro.framework.lights.pojo.AssemblyType at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308) at org.cloner.deep.HibernateBeanCloner.cloneBean(HibernateBeanCloner.java:13) at org.cloner.deep.DefaultCloner.doclone(DefaultCloner.java:42) at org.cloner.deep.DefaultCloner.cloneFields(DefaultCloner.java:69) at org.cloner.deep.HibernateBeanCloner.cloneBean(HibernateBeanCloner.java:23) at org.cloner.deep.DefaultCloner.doclone(DefaultCloner.java:42) at org.cloner.deep.DefaultCloner.cloneFields(DefaultCloner.java:69) at org.cloner.deep.HibernateBeanCloner.cloneBean(HibernateBeanCloner.java:23) at org.cloner.deep.DefaultCloner.doclone(DefaultCloner.java:42) at org.cloner.deep.DefaultCloner.cloneFields(DefaultCloner.java:69) at org.cloner.deep.HibernateBeanCloner.cloneBean(HibernateBeanCloner.java:23) at org.cloner.deep.DefaultCloner.doclone(DefaultCloner.java:42) at org.cloner.deep.DefaultCloner.cloneFields(DefaultCloner.java:69) at org.cloner.deep.HibernateBeanCloner.cloneBean(HibernateBeanCloner.java:23) at org.cloner.deep.DefaultCloner.doclone(DefaultCloner.java:42) at org.cloner.deep.DeepCloner.deepClone(DeepCloner.java:29) I think you can't instantiate an enumeration. Is there an workarround for it ? Best regards, Julio Helden.

    Posted 12/01/2011
Read more reviews

Additional Project Details

Languages

English

Intended Audience

Developers

Programming Language

Java

Registered

2010-05-02
Screenshots can attract more users to your project.
Features can attract more users to your project.