jon         2002/06/20 15:04:43

  Modified:    src/templates/om BaseManager.vm
  Log:
  added a method getInstance(String)
  
  fixed some javadoc
  
  -jon
  
  Revision  Changes    Path
  1.8       +27 -4     jakarta-turbine-torque/src/templates/om/BaseManager.vm
  
  Index: BaseManager.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/templates/om/BaseManager.vm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BaseManager.vm    22 Mar 2002 01:52:46 -0000      1.7
  +++ BaseManager.vm    20 Jun 2002 22:04:43 -0000      1.8
  @@ -81,6 +81,19 @@
       }
   
       /**
  +     * Static accessor for the @see #getInstanceImpl(String).
  +     *
  +     * @param id an <code>String</code> value of the key
  +     * @return a <code>${interfaceName}</code> value
  +     * @exception TorqueException if an error occurs
  +     */
  +    public static ${interfaceName} getInstance(String id)
  +        throws TorqueException
  +    {
  +        return getManager().getInstanceImpl(id);
  +    }
  +
  +    /**
        * Static accessor for the @see #getInstanceImpl(ObjectKey, boolean).
        *
        * @param id an <code>ObjectKey</code> value
  @@ -158,7 +171,6 @@
           setClassName("${package}.${interfaceName}");
       }
   
  -
       /**
        * Get a fresh instance of a ${interfaceName}Manager
        */
  @@ -179,7 +191,7 @@
   
   
       /**
  -     * Get a user with the given id.
  +     * Get a ${interfaceName} with the given id.
        *
        * @param id <code>ObjectKey</code> value
        */
  @@ -192,6 +204,17 @@
       /**
        * Get a ${interfaceName} with the given id.
        *
  +     * @param id <code>String</code> value
  +     */
  +    protected ${interfaceName} getInstanceImpl(String id)
  +        throws TorqueException
  +    {
  +        return getInstanceImpl(new ObjectKey(id));
  +    }
  +
  +    /**
  +     * Get a ${interfaceName} with the given id.
  +     *
        * @param id <code>ObjectKey</code> value
        * @param fromCache if true, look for cached ${interfaceName}s before loading
        * from storage.
  @@ -218,7 +241,7 @@
       /**
        * Gets a list of ${interfaceName}s based on id's.
        *
  -     * @param userIds a List of <code>ObjectKeys</code> value
  +     * @param ids a List of <code>ObjectKeys</code> value
        * @param fromCache if true, look for cached ${interfaceName}s before loading
        * from storage.
        * @return a <code>List</code> of ${interfaceName}s
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to