Package java.sql

Examples of java.sql.Time


      case Types.LONGVARCHAR:
        return Any.create(stmt.getString(field));

      case Types.TIME:
        {
          Time time = stmt.getTime(field);
          if (time != null) {
            Context context = Context.getInstance();
            Calendar cal = Calendar.getInstance(context.getTimeZone(), context.getLocale());
            cal.setTime(time);
            return new AnyCalendar(cal);
View Full Code Here


      throw new NullPointerException();
    }
    try
    {
      final java.util.Date date = dateFormat.parse(s);
      return new Time(date.getTime());
    }
    catch (ParseException e)
    {
      throw new BeanException("Not a parsable SQL-Time");
    }
View Full Code Here

        return temp;
    }

    public final static void displayCurrentTime() {
        long temp = System.currentTimeMillis();
        Time tempTime = new Time(temp);
        System.out.println("Current Time: " + tempTime.toString());
    }
View Full Code Here

                   SqlInfo obj = sqlInfoParser.parse(content);
                   content = obj.toXml("");
                }
                System.out.println("Date (old):  " + new Date(nextTime));
                System.out.println("Date (new):  " + new Date(calculateNewTime(nextTime)));
                System.out.println("Date (old):  " + new Time(nextTime));
                System.out.println("Date (new):  " + new Time(calculateNewTime(nextTime)));
                System.out.println(content);
             }
          }
       }
       catch(IOException ex) {
View Full Code Here

         // String dateTxt = format.format(date);
         String dateTxt = ts.toString();
         return new ClientProperty(name, null, null, dateTxt);
      }
      if (val instanceof Time) {
         Time time = (Time)val;
         return new ClientProperty(name, null, null, "" + time.getTime());
      }
      else {
        
         if (val.getClass().getName().equals("oracle.sql.TIMESTAMP")) {
            Method meth = val.getClass().getMethod("timestampValue", null);
View Full Code Here

     * @param Id of domain for restricting meeting search
     */ 
  public WeekPlan(int iIdDomain, Date dtFirstDate) {
    oMeetings = null;
    nMeetings = 0;
    oMddyTime = new Time(14,0,0);
    oDomainId = new Integer (iIdDomain);
    sWorkAreaGuid = null;
    dtFrom = dtFirstDate;
  }
View Full Code Here

     * @param GUID of WorkArea for restricting meeting search
     */ 
  public WeekPlan(int iIdDomain, String sGuWorkArea, Date dtFirstDate) {
    oMeetings = null;
    nMeetings = 0;
    oMddyTime = new Time(14,0,0);
    oDomainId = new Integer (iIdDomain);
    sWorkAreaGuid = sGuWorkArea;
    dtFrom = dtFirstDate;
  }
View Full Code Here

  }

    // ------------------------------------------------------------------------

  public void setMiddayTime(int iHour, int iMinute) {
    oMddyTime = new Time(iHour,iMinute,0);
  }
View Full Code Here

   *
   * @throws  SQLException  SQL error occured.
   */
  public Time getTime(int columnIdx) throws SQLException
  {
    final Time results = _rs.getTime(columnIdx);
    _wasNull = results == null;
    return results;
  }
View Full Code Here

            return obj;
         }
         else {
            // use the DateFormat to parse
            java.util.Date javaDate = dateFormat.parse(value);
            return new Time(javaDate.getTime());
         }
      }
      catch (Exception e) {
         messageBuffer.append(e.toString()+"\n");
         //?? do we need the message also, or is it automatically part of the toString()?
View Full Code Here

TOP

Related Classes of java.sql.Time

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.