-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: can I user beanutils copy property
PostPosted: Thu Jun 19, 2008 10:42 am 
Beginner
Beginner

Joined: Wed May 14, 2008 2:06 pm
Posts: 21
can I use BeanUtils.copyProperty to copy properties from one entity to other ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 23, 2008 10:52 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Yes.

http://commons.apache.org/beanutils/api/org/apache/commons/beanutils/BeanUtils.html#copyProperties(java.lang.Object,%20java.lang.Object)

Quote:
copyProperties

public static void copyProperties(java.lang.Object dest,
java.lang.Object orig)
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException

Copy property values from the origin bean to the destination bean for all cases where the property names are the same.

For more details see BeanUtilsBean.

java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
See Also:
BeanUtilsBean.copyProperties(java.lang.Object, java.lang.Object)


_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.