You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ha...@apache.org on 2001/12/29 15:48:44 UTC

cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl DayOfMonthIntegerFunction.java HourOfDayIntegerFunction.java MinuteIntegerFunction.java MonthIntegerFunction.java SecondIntegerFunction.java YearIntegerFunction.java

hammant     01/12/29 06:48:44

  Modified:    apps/db/src/java/org/apache/avalon/db/functions/impl
                        DayOfMonthIntegerFunction.java
                        HourOfDayIntegerFunction.java
                        MinuteIntegerFunction.java
                        MonthIntegerFunction.java
                        SecondIntegerFunction.java YearIntegerFunction.java
  Log:
  Make JDK 1.2 safe again
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/DayOfMonthIntegerFunction.java
  
  Index: DayOfMonthIntegerFunction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/DayOfMonthIntegerFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DayOfMonthIntegerFunction.java	29 Dec 2001 00:33:09 -0000	1.1
  +++ DayOfMonthIntegerFunction.java	29 Dec 2001 14:48:43 -0000	1.2
  @@ -17,7 +17,7 @@
    * Class DayOfMonthIntegerFunction
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class DayOfMonthIntegerFunction extends AbstractTemporalIntegerFunction {
   
  @@ -28,7 +28,7 @@
       protected Integer getIntegerValue(Row row) {
           TemporalColumn tc = (TemporalColumn) mColumns[0];
           Date date = (Date) tc.getValue(row);
  -        mGregorianCalendar.setTimeInMillis(date.getTime());
  +        mGregorianCalendar.setTime(date);
           return new Integer(mGregorianCalendar.get(Calendar.DAY_OF_MONTH));
       }
   }
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/HourOfDayIntegerFunction.java
  
  Index: HourOfDayIntegerFunction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/HourOfDayIntegerFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HourOfDayIntegerFunction.java	29 Dec 2001 00:33:09 -0000	1.1
  +++ HourOfDayIntegerFunction.java	29 Dec 2001 14:48:43 -0000	1.2
  @@ -17,7 +17,7 @@
    * Class HourOfDayIntegerFunction
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class HourOfDayIntegerFunction extends AbstractTemporalIntegerFunction {
   
  @@ -28,7 +28,7 @@
       protected Integer getIntegerValue(Row row) {
           TemporalColumn tc = (TemporalColumn) mColumns[0];
           Date date = (Date) tc.getValue(row);
  -        mGregorianCalendar.setTimeInMillis(date.getTime());
  +        mGregorianCalendar.setTime(date);
           return new Integer(mGregorianCalendar.get(Calendar.HOUR_OF_DAY));
       }
   }
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/MinuteIntegerFunction.java
  
  Index: MinuteIntegerFunction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/MinuteIntegerFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MinuteIntegerFunction.java	29 Dec 2001 00:33:09 -0000	1.1
  +++ MinuteIntegerFunction.java	29 Dec 2001 14:48:43 -0000	1.2
  @@ -17,7 +17,7 @@
    * Class MinuteIntegerFunction
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class MinuteIntegerFunction extends AbstractTemporalIntegerFunction {
   
  @@ -28,7 +28,7 @@
       protected Integer getIntegerValue(Row row) {
           TemporalColumn tc = (TemporalColumn) mColumns[0];
           Date date = (Date) tc.getValue(row);
  -        mGregorianCalendar.setTimeInMillis(date.getTime());
  +        mGregorianCalendar.setTime(date);
           return new Integer(mGregorianCalendar.get(Calendar.MINUTE));
       }
   }
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/MonthIntegerFunction.java
  
  Index: MonthIntegerFunction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/MonthIntegerFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MonthIntegerFunction.java	29 Dec 2001 00:33:09 -0000	1.1
  +++ MonthIntegerFunction.java	29 Dec 2001 14:48:43 -0000	1.2
  @@ -17,7 +17,7 @@
    * Class MonthIntegerFunction
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class MonthIntegerFunction extends AbstractTemporalIntegerFunction {
   
  @@ -28,7 +28,7 @@
       protected Integer getIntegerValue(Row row) {
           TemporalColumn tc = (TemporalColumn) mColumns[0];
           Date date = (Date) tc.getValue(row);
  -        mGregorianCalendar.setTimeInMillis(date.getTime());
  +        mGregorianCalendar.setTime(date);
           return new Integer(mGregorianCalendar.get(Calendar.MONTH) +1 );
       }
   }
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/SecondIntegerFunction.java
  
  Index: SecondIntegerFunction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/SecondIntegerFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SecondIntegerFunction.java	29 Dec 2001 00:33:09 -0000	1.1
  +++ SecondIntegerFunction.java	29 Dec 2001 14:48:43 -0000	1.2
  @@ -18,7 +18,7 @@
    * Class SecondIntegerFunction
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class SecondIntegerFunction extends AbstractTemporalIntegerFunction {
   
  @@ -29,7 +29,7 @@
       protected Integer getIntegerValue(Row row) {
           TemporalColumn tc = (TemporalColumn) mColumns[0];
           Date date = (Date) tc.getValue(row);
  -        mGregorianCalendar.setTimeInMillis(date.getTime());
  +        mGregorianCalendar.setTime(date);
           return new Integer(mGregorianCalendar.get(Calendar.SECOND));
       }
   }
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/YearIntegerFunction.java
  
  Index: YearIntegerFunction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/functions/impl/YearIntegerFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- YearIntegerFunction.java	29 Dec 2001 00:33:09 -0000	1.1
  +++ YearIntegerFunction.java	29 Dec 2001 14:48:43 -0000	1.2
  @@ -18,7 +18,7 @@
    * Class SecondIntegerFunction
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class YearIntegerFunction extends AbstractTemporalIntegerFunction {
   
  @@ -29,7 +29,7 @@
       protected Integer getIntegerValue(Row row) {
           TemporalColumn tc = (TemporalColumn) mColumns[0];
           Date date = (Date) tc.getValue(row);
  -        mGregorianCalendar.setTimeInMillis(date.getTime());
  +        mGregorianCalendar.setTime(date);
           return new Integer(mGregorianCalendar.get(Calendar.SECOND));
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>