Package com.sun.star.util

Examples of com.sun.star.util.Date


        int idx = findParamOfType(Date.class) ;
        if (idx < 0) log.println("Type not found in relation: not tested");
        else {
            try {
                oObj.setDate(
                    idx, new Date ((short)19, (short)01, (short)1979)) ;
            } catch (SQLException e) {
                log.println("Unexpected SQL exception:") ;
                log.println(e) ;
                result = false ;
            }
View Full Code Here


        boolean result = true ;
        int col = findColumnOfType(Date.class) ;
        if (col < 0) log.println("Type not found in relation: not tested");
        else {
            try {
                Date getVal = oObj.getDate(col) ;
            } catch (SQLException e) {
                log.println("Unexpected SQL exception:") ;
                log.println(e) ;
                result = false ;
            }
View Full Code Here

            tRes.tested("updateDate()", Status.skipped(true)) ;
            return ;
        }

        try {
            Date newVal = row.getDate(idx) ;
            newVal.Year ++ ;
            oObj.updateDate(idx, newVal) ;
            Date getVal = row.getDate(idx) ;
            result = ValueComparer.equalValue(newVal, getVal) ;
        } catch (SQLException e) {
            e.printStackTrace(log) ;
            result = false ;
        }
View Full Code Here

        params.add(new Integer(12345)) ;
        params.add(new Long(23456)) ;
        params.add(new Float(1.234)) ;
        params.add(new Double(2.345)) ;
        params.add(new byte[] {1, 2, 3}) ;
        Date d = new Date();
        d.Day = 26; d.Month = 1; d.Year = 2001;
        params.add(d) ;
        Time t = new Time();
        t.Hours = 1; t.HundredthSeconds = 12; t.Minutes = 25; t.Seconds = 14;
        params.add(t) ;
View Full Code Here

            worked = addProperty(xPropContainer, "booleanValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE, Boolean.TRUE);
            assertTrue("Couldn't set an boolean property", worked);
            System.out.println("...done");

            System.out.println("Trying to add a date property");
            worked = addProperty(xPropContainer, "dateValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE, new Date());
            assertTrue("Couldn't set an date property", worked);
            System.out.println("...done");

            System.out.println("trying to remove a read only Property");
            try
View Full Code Here

            double d = 3.1415;
            // note that Time is only supported for backward compatibilty!
            Time t = new Time();
            t.Hours = 1;
            t.Minutes = 16;
            Date date = new Date();
            date.Year = 2071;
            date.Month = 2;
            date.Day = 3;
            dt.Year = 2065;
            Duration dur = new Duration();
View Full Code Here

    updateRs.moveToInsertRow();
    updateRow.updateInt(1, 4);
    updateRow.updateInt(2, 102);
    updateRow.updateInt(3, 5);
    updateRow.updateString(4, "FTOP Darjeeling tea");
    updateRow.updateDate(5, new Date((short)1,(short)2,(short)2002));
    updateRow.updateFloat(6, 150);
    updateRs.insertRow();
  }
View Full Code Here

        params.add(new Integer(12345)) ;
        params.add(new Long(23456)) ;
        params.add(new Float(1.234)) ;
        params.add(new Double(2.345)) ;
        params.add(new byte[] {1, 2, 3}) ;
        Date d = new Date();
        d.Day = 26; d.Month = 1; d.Year = 2001;
        params.add(d) ;
        Time t = new Time();
        t.Hours = 1; t.HundredthSeconds = 12; t.Minutes = 25; t.Seconds = 14;
        params.add(t) ;
View Full Code Here

        log.println("...done");

        log.println("Trying to add a date property");
        worked =
            addProperty(xPropContainer, "dateValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE,
                new Date());
        assure("Couldn't set an date property", worked);
        log.println("...done");
       
        log.println("trying to remove a read only Property");
        try {
View Full Code Here

    XResultSet rs  = stmt.executeQuery("SELECT FIRSTNAME, LASTNAME, BIRTHDATE FROM SALESMAN");
    XRow row = (XRow)UnoRuntime.queryInterface(XRow.class,rs);
    while ( rs != null && rs.next() ) {
      String fn = row.getString( 1 );
      String ln = row.getString( 2 );
      Date   dt = row.getDate( 3 );
      System.out.println(fn + "    " + ln + "    " + dt.Month + "/" + dt.Day + "/" + dt.Year);
    }
  }
View Full Code Here

TOP

Related Classes of com.sun.star.util.Date

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.