Hi hanson,
This is the way I use the beanLib:
Code:
Object replicateObject = new Object();
BeanPopulatable vetoer = new MyVetoer(this.hibernateSessionProvider.getSession());
Set setEntityBean = new HashSet();
Class[] arrayEntityBean = {MySuperClass.class};
setEntityBean.addAll(Arrays.asList(arrayEntityBean));
Set setProperties = new HashSet();
String[] arrayProperties = {"onePropertyNameFromMySuperClass", "otherPropertyNameFromMySuperClass"};
CollectionPropertyName[] tabCollectionPropertyName = CollectionPropertyName.createCollectionPropertyNames(MySuperClass.class, arrayProperties);
setProperties.addAll(Arrays.asList(arrayProperties));
HibernateBeanReplicator replicator = new Hibernate3BeanReplicator()
.initVetoer(vetoer)
.initCollectionPropertyNameSet(setProperties)
.initEntityBeanClassSet(setEntityBean);
replicateObject = replicator.copy(object);
This code is wrapped in a method that I made just to test the lib and MyVetoer is basically, the one that you give in the previous post.
I can't reach SourceForge.net, the website seems to be down so sorry to continue here.
Hope this help you to understand what I am trying to do.