You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/10/21 23:06:52 UTC

cvs commit: jakarta-turbine-torque/src/java/org/apache/torque Torque.java

dlr         01/10/21 14:06:52

  Modified:    src/java/org/apache/torque Torque.java
  Log:
  Patch by Peter Donald <do...@apache.org> with some documentation
  clarifications by myself:
  
  Heres a patch to remove a method getDefaultMap() that returns identical
  value to getDefaultDB() and is only used in the Torque class.
  
  Revision  Changes    Path
  1.18      +6 -18     jakarta-turbine-torque/src/java/org/apache/torque/Torque.java
  
  Index: Torque.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/Torque.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- Torque.java	2001/09/20 04:51:45	1.17
  +++ Torque.java	2001/10/21 21:06:52	1.18
  @@ -83,7 +83,7 @@
    * @author <a href="mailto:magnus@handtolvur.is">Magn�s ��r Torfason</a>
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
    * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
  - * @version $Id: Torque.java,v 1.17 2001/09/20 04:51:45 dlr Exp $
  + * @version $Id: Torque.java,v 1.18 2001/10/21 21:06:52 dlr Exp $
    */
   public class Torque
   {
  @@ -263,18 +263,18 @@
       public static DatabaseMap getDatabaseMap()
           throws TorqueException
       {
  -        return getDatabaseMap(getDefaultMap());
  +        return getDatabaseMap(getDefaultDB());
       }
   
       /**
        * Returns the database map information. Name relates to the name
        * of the connection pool to associate with the map.
        *
  -     * @param name The name of the <code>DatabaseMap</code> to
  -     * retrieve.
  +     * @param name The name of the database corresponding to the
  +     * <code>DatabaseMap</code> to retrieve.
        * @return The named <code>DatabaseMap</code>.
  -     * @throws TorqueException Any exceptions caught during procssing will be
  -     *         rethrown wrapped into a TorqueException.
  +     * @throws TorqueException Any exceptions caught during procssing
  +     * will be rethrown wrapped into a <code>TorqueException</code>.
        */
       public static DatabaseMap getDatabaseMap(String name)
           throws TorqueException
  @@ -721,18 +721,6 @@
        * Returns the name of the default database.
        */
       public static String getDefaultDB()
  -    {
  -        if (configuration == null)
  -        {
  -            return DEFAULT_NAME;
  -        }
  -        return configuration.getString(DATABASE_DEFAULT, DEFAULT_NAME);
  -    }
  -
  -    /**
  -     * Returns the name of the default database map.
  -     */
  -    public static String getDefaultMap()
       {
           if (configuration == null)
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine-torque/src/java/org/apache/torque Torque.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 10/21/01 9:23 PM, "Daniel Rall" <dl...@finemaltcoding.com> wrote:

> Even in the unreleased development tree?  It's not like this is the
> only API change in 3.x module.  I'm happy to deprecate it (almost did,
> actually).  I'm just not sure how much value there would be in doing
> so in this situation.

I would rather follow the rules.

It can be removed in the release after the first release.

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine-torque/src/java/org/apache/torque Torque.java

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Even in the unreleased development tree?  It's not like this is the
only API change in 3.x module.  I'm happy to deprecate it (almost did,
actually).  I'm just not sure how much value there would be in doing
so in this situation.

Jon Stevens <jo...@latchkey.com> writes:

> -1
>
> You need to deprecate the method.
>
> http://jakarta.apache.org/turbine/common/deprecation.html
>
> -jon
>
> on 10/21/01 2:06 PM, "dlr@apache.org" <dl...@apache.org> wrote:
>
>> dlr         01/10/21 14:06:52
>> 
>> Modified:    src/java/org/apache/torque Torque.java
>> Log:
>> Patch by Peter Donald <do...@apache.org> with some documentation
>> clarifications by myself:
>> 
>> Heres a patch to remove a method getDefaultMap() that returns identical
>> value to getDefaultDB() and is only used in the Torque class.
>> 
>> Revision  Changes    Path
>> 1.18      +6 -18 
>> jakarta-turbine-torque/src/java/org/apache/torque/Torque.java
>> 
>> Index: Torque.java
>> ===================================================================
>> RCS file: 
>> /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/Torque.java,v
>> retrieving revision 1.17
>> retrieving revision 1.18
>> diff -u -u -r1.17 -r1.18
>> --- Torque.java    2001/09/20 04:51:45    1.17
>> +++ Torque.java    2001/10/21 21:06:52    1.18
>> @@ -83,7 +83,7 @@
>>   * @author <a href="mailto:magnus@handtolvur.is">Magnús Þór Torfason</a>
>>   * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
>>   * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
>> - * @version $Id: Torque.java,v 1.17 2001/09/20 04:51:45 dlr Exp $
>> + * @version $Id: Torque.java,v 1.18 2001/10/21 21:06:52 dlr Exp $
>>   */
>>  public class Torque
>>  {
>> @@ -263,18 +263,18 @@
>>      public static DatabaseMap getDatabaseMap()
>>          throws TorqueException
>>      {
>> -        return getDatabaseMap(getDefaultMap());
>> +        return getDatabaseMap(getDefaultDB());
>>      }
>>  
>>      /**
>>       * Returns the database map information. Name relates to the name
>>       * of the connection pool to associate with the map.
>>       *
>> -     * @param name The name of the <code>DatabaseMap</code> to
>> -     * retrieve.
>> +     * @param name The name of the database corresponding to the
>> +     * <code>DatabaseMap</code> to retrieve.
>>       * @return The named <code>DatabaseMap</code>.
>> -     * @throws TorqueException Any exceptions caught during procssing will be
>> -     *         rethrown wrapped into a TorqueException.
>> +     * @throws TorqueException Any exceptions caught during procssing
>> +     * will be rethrown wrapped into a <code>TorqueException</code>.
>>       */
>>      public static DatabaseMap getDatabaseMap(String name)
>>          throws TorqueException
>> @@ -721,18 +721,6 @@
>>       * Returns the name of the default database.
>>       */
>>      public static String getDefaultDB()
>> -    {
>> -        if (configuration == null)
>> -        {
>> -            return DEFAULT_NAME;
>> -        }
>> -        return configuration.getString(DATABASE_DEFAULT, DEFAULT_NAME);
>> -    }
>> -
>> -    /**
>> -     * Returns the name of the default database map.
>> -     */
>> -    public static String getDefaultMap()
>>      {
>>          if (configuration == null)
>>          {
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine-torque/src/java/org/apache/torque Torque.java

Posted by Jon Stevens <jo...@latchkey.com>.
-1

You need to deprecate the method.

http://jakarta.apache.org/turbine/common/deprecation.html

-jon

on 10/21/01 2:06 PM, "dlr@apache.org" <dl...@apache.org> wrote:

> dlr         01/10/21 14:06:52
> 
> Modified:    src/java/org/apache/torque Torque.java
> Log:
> Patch by Peter Donald <do...@apache.org> with some documentation
> clarifications by myself:
> 
> Heres a patch to remove a method getDefaultMap() that returns identical
> value to getDefaultDB() and is only used in the Torque class.
> 
> Revision  Changes    Path
> 1.18      +6 -18 
> jakarta-turbine-torque/src/java/org/apache/torque/Torque.java
> 
> Index: Torque.java
> ===================================================================
> RCS file: 
> /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/Torque.java,v
> retrieving revision 1.17
> retrieving revision 1.18
> diff -u -u -r1.17 -r1.18
> --- Torque.java    2001/09/20 04:51:45    1.17
> +++ Torque.java    2001/10/21 21:06:52    1.18
> @@ -83,7 +83,7 @@
>   * @author <a href="mailto:magnus@handtolvur.is">Magnús Þór Torfason</a>
>   * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
>   * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
> - * @version $Id: Torque.java,v 1.17 2001/09/20 04:51:45 dlr Exp $
> + * @version $Id: Torque.java,v 1.18 2001/10/21 21:06:52 dlr Exp $
>   */
>  public class Torque
>  {
> @@ -263,18 +263,18 @@
>      public static DatabaseMap getDatabaseMap()
>          throws TorqueException
>      {
> -        return getDatabaseMap(getDefaultMap());
> +        return getDatabaseMap(getDefaultDB());
>      }
>  
>      /**
>       * Returns the database map information. Name relates to the name
>       * of the connection pool to associate with the map.
>       *
> -     * @param name The name of the <code>DatabaseMap</code> to
> -     * retrieve.
> +     * @param name The name of the database corresponding to the
> +     * <code>DatabaseMap</code> to retrieve.
>       * @return The named <code>DatabaseMap</code>.
> -     * @throws TorqueException Any exceptions caught during procssing will be
> -     *         rethrown wrapped into a TorqueException.
> +     * @throws TorqueException Any exceptions caught during procssing
> +     * will be rethrown wrapped into a <code>TorqueException</code>.
>       */
>      public static DatabaseMap getDatabaseMap(String name)
>          throws TorqueException
> @@ -721,18 +721,6 @@
>       * Returns the name of the default database.
>       */
>      public static String getDefaultDB()
> -    {
> -        if (configuration == null)
> -        {
> -            return DEFAULT_NAME;
> -        }
> -        return configuration.getString(DATABASE_DEFAULT, DEFAULT_NAME);
> -    }
> -
> -    /**
> -     * Returns the name of the default database map.
> -     */
> -    public static String getDefaultMap()
>      {
>          if (configuration == null)
>          {


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org