You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by "Roman Shaposhnik (JIRA)" <ji...@apache.org> on 2011/09/10 06:03:19 UTC

[jira] [Reopened] (OOZIE-277) GH-402: Eliminate methods of bean copying in JPA executor or store class

     [ https://issues.apache.org/jira/browse/OOZIE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roman Shaposhnik reopened OOZIE-277:
------------------------------------


> GH-402: Eliminate methods of bean copying in JPA executor or store class
> ------------------------------------------------------------------------
>
>                 Key: OOZIE-277
>                 URL: https://issues.apache.org/jira/browse/OOZIE-277
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Hadoop QA
>
> JPA executors and store classes very often can see the copy methods to copy the bean. 
> Ex.
>     private WorkflowActionBean getBeanForRunningAction(WorkflowActionBean a) {
>         if (a != null) {
>             WorkflowActionBean action = new WorkflowActionBean();
>             action.setId(a.getId());
>         }
>     }
> The reason for that is :
> # In Oozie's bean classes, we have several fields have two variables associated with it. Like "Status", there is enum object "status" and string object "statusStr", or like "StartTime", there is timestamp object "startTimestamp" and date object "startTime". JPA only assign the value to default object without going through the setter methods. A fresh bean from JPA will contain the value in all default variables, not the other transient ones. The caller might need to use those values when the bean is being passed to client side where the JSON bean is used. That's why the value needs to be reset to both variables to make sure the consistent behaviors. 
> This issue is used to address these copy methods and try to make it simpler.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira