I'm creating a task module and the requirement is as follow:
When user completed the task, copy the current task and change the  completion 
date property to null and add to the database.  Is there any example that copy 
the persistent object then add to the database?

  |     @Override
  |     public String update()
  |     {
  |             if (this.instance.getTaskCompleted().equals("Y")) {
  |                     
  |                    try {
  |                             TitleXiTaskHome titleXiTask = (TitleXiTaskHome) 
super.clone();
  |                             titleXiTask.instance.setTaskCompleted("N");
  |                             titleXiTask.instance.setCompletedDate(null);
  |                             titleXiTask.persist();
  |                     } catch (CloneNotSupportedException e) {
  |                             // TODO Auto-generated catch block
  |                             e.printStackTrace();
  |                     }
  |             }
  |             super.update();
  |             return "success";
  |     }
  | 

I'm getting CloneNotSupportedException error.

Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063193#4063193

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063193
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to