openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: Refresh myself!
Date Fri, 22 May 2009 00:50:47 GMT

Hi Daryl,
     something like:
  /**
   * Pour the persistent state of the given other instance into this
(detached) instance.
   * Some sort of reverse Object.clone().
   * The implementation has to decide whether to deep copy or not.
  **/
  abstract void enolc(JpaEntity other); 

  public void load() throws Exception { // Saveable
        EntityManager em = ...
       this.enolc(em.find(getClass(), getId()); 
    }

  

PS: "copy constructor" is a constructor that takes an instance of the same
type as input argument. Was popular in C++ days.  


-----
Pinaki Poddar                      http://ppoddar.blogspot.com/
                                      
http://www.linkedin.com/in/pinakipoddar
OpenJPA PMC Member/Committer
JPA Expert Group Member
-- 
View this message in context: http://n2.nabble.com/Refresh-myself%21-tp2954027p2954998.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message