User: vharcq  
  Date: 02/05/24 14:00:56

  Modified:    modules/ejb/src/xdoclet/modules/ejb/entity Tag:
                        MODULE_REFACTORING_BRANCH
                        ValueObjectTagsHandler.java
  Log:
  After discussion with Craig O'Shannessy.
  VO are now instantiate only once per instance of the bean on the first getter done.
  It is never reset to null after.
  When Getter is called we reset all fields inside the VO before returning it.
  We do not care about eager instantiation of it anymore.
  We do not care about maintaining VO consistent with entity bean value (that was a 
baad idea)
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +2 -81     
xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/Attic/ValueObjectTagsHandler.java
  
  Index: ValueObjectTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/Attic/ValueObjectTagsHandler.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -w -r1.1.2.5 -r1.1.2.6
  --- ValueObjectTagsHandler.java       15 May 2002 19:19:27 -0000      1.1.2.5
  +++ ValueObjectTagsHandler.java       24 May 2002 21:00:56 -0000      1.1.2.6
  @@ -39,7 +39,7 @@
    * @author               Vincent Harcq ([EMAIL PROTECTED])
    * @created              Feb 5, 2002
    * @xdoclet:taghandler   namespace="EjbValueObj"
  - * @version              $Revision: 1.1.2.5 $
  + * @version              $Revision: 1.1.2.6 $
    */
   public class ValueObjectTagsHandler
        extends EjbTagsHandler
  @@ -52,8 +52,6 @@
   
       private String  currentValueObjectMatch;
   
  -    private boolean currentValueObjectVolatile;
  -
       // For aggregation
       private String  currentAggregateType;
   
  @@ -224,27 +222,6 @@
       }
   
       /**
  -     * Gets the CurrentValueObjectVolatile attribute of the ValueObjectTagsHandler 
class
  -     *
  -     * @param clazz                 Describe what the parameter does
  -     * @param tag                   Describe what the parameter does
  -     * @return                      The CurrentValueObjectVolatile value
  -     * @exception XDocletException
  -     */
  -    public static boolean isCurrentValueObjectVolatile(XClass clazz, XTag tag)
  -         throws XDocletException
  -    {
  -        String vol = tag.attributeValue("volatile");
  -
  -        if (vol == null || vol.equals("yes") || vol.equals("true")) {
  -            return true;
  -        }
  -        else {
  -            return false;
  -        }
  -    }
  -
  -    /**
        * Gets the SubTask attribute of the ValueObjectTagsHandler class
        *
        * @return   The SubTask value
  @@ -370,9 +347,8 @@
               currentValueObjectClass = getCurrentValueObjectClass(getCurrentClass(), 
dos[i]);
               currentValueObjectAttribute = getCurrentValueObjectAttribute(dos[i]);
               currentValueObjectMatch = getCurrentValueObjectMatch(dos[i]);
  -            currentValueObjectVolatile = 
isCurrentValueObjectVolatile(getCurrentClass(), dos[i]);
               if (log.isDebugEnabled()) {
  -                log.debug("Generate for " + currentValueObjectClass + " attr=" + 
currentValueObjectAttribute + " match=" + currentValueObjectMatch + " volatile=" + 
currentValueObjectVolatile);
  +                log.debug("Generate for " + currentValueObjectClass + " attr=" + 
currentValueObjectAttribute + " match=" + currentValueObjectMatch);
               }
   
               generate(pTemplate);
  @@ -501,21 +477,6 @@
        * Describe what the method does
        *
        * @param template              Describe what the parameter does
  -     * @exception XDocletException
  -     */
  -    public void ifEagerInstantiation(String template) throws XDocletException
  -    {
  -        String inst = currentTag.attributeValue("instantiation");
  -
  -        if ("eager".equals(inst)) {
  -            generate(template);
  -        }
  -    }
  -
  -    /**
  -     * Describe what the method does
  -     *
  -     * @param template              Describe what the parameter does
        * @param attributes            Describe what the parameter does
        * @exception XDocletException
        */
  @@ -574,46 +535,6 @@
       public void ifUsingValueObject(String template) throws XDocletException
       {
           if 
(DocletContext.getInstance().isSubTaskDefined(ValueObjectSubTask.SUBTASK_NAME)) {
  -            generate(template);
  -        }
  -    }
  -
  -    /**
  -     * Describe what the method does
  -     *
  -     * @return   Describe the return value
  -     */
  -    public boolean currentValueObjectVolatile()
  -    {
  -        return currentValueObjectVolatile;
  -    }
  -
  -    /**
  -     * Evaluates the body of the tag if the current value object is volatile (ie, 
won't be cached internally).
  -     *
  -     * @param template
  -     * @exception XDocletException
  -     * @doc:tag                     type="block"
  -     */
  -    public void ifIsCurrentValueObjectVolatile(String template)
  -         throws XDocletException
  -    {
  -        if (currentValueObjectVolatile()) {
  -            generate(template);
  -        }
  -    }
  -
  -    /**
  -     * Evaluates the body of the tag if the current value object is not volatile 
(ie, will be cached internally).
  -     *
  -     * @param template
  -     * @exception XDocletException
  -     * @doc:tag                     type="block"
  -     */
  -    public void ifIsNotCurrentValueObjectVolatile(String template)
  -         throws XDocletException
  -    {
  -        if (!currentValueObjectVolatile()) {
               generate(template);
           }
       }
  
  
  

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to