Examples of DecimalColumn


Examples of com.google.code.or.common.glossary.column.DecimalColumn

      Long t1 = (d.getTime()/1000) * 1000; //Bug in OR for DateTIme and Time data-types. MilliSeconds is not available for these columns but is set with currentMillis() wrongly.
      return t1;
    }
    else if (s instanceof DecimalColumn)
    {
      DecimalColumn dc = (DecimalColumn) s;
      _log.info("dc Value is :" + dc.getValue());
      String s1 = dc.getValue().toString(); // Convert to string for preserving precision
      _log.info("Str : " + s1);
      return s1;
    }
    else if (s instanceof DoubleColumn)
    {
      DoubleColumn dc = (DoubleColumn) s;
      Double d = dc.getValue();
      return d;
    }
    else if (s instanceof EnumColumn)
    {
      EnumColumn ec = (EnumColumn) s;
View Full Code Here

Examples of org.apache.jena.jdbc.results.metadata.columns.DecimalColumn

     * @throws SQLException
     */
    @Test
    public void meta_result_set_decimal_01() throws SQLException {
        MetaResultSet results = new MetaResultSet(
                new ColumnInfo[] { new DecimalColumn("Test", ResultSetMetaData.columnNullable) },
                new Object[][] { { new BigDecimal("123.4") } });

        Assert.assertTrue(results.next());
        BigDecimal value = results.getBigDecimal(1);
        Assert.assertEquals(new BigDecimal("123.4"), value);
View Full Code Here

Examples of org.apache.jena.jdbc.results.metadata.columns.DecimalColumn

     * @throws SQLException
     */
    @Test
    public void meta_result_set_decimal_02() throws SQLException {
        MetaResultSet results = new MetaResultSet(
                new ColumnInfo[] { new DecimalColumn("Test", ResultSetMetaData.columnNullable) }, new Object[][] { { null } });

        Assert.assertTrue(results.next());
        BigDecimal value = results.getBigDecimal(1);
        Assert.assertEquals(null, value);
        Assert.assertTrue(results.wasNull());
View Full Code Here

Examples of org.apache.jena.jdbc.results.metadata.columns.DecimalColumn

        } else if (dtUri.equals(XSD.dateTime.toString())) {
            // Date time column
            return new DateTimeColumn(var, nullable);
        } else if (dtUri.equals(XSD.decimal.toString())) {
            // Decimal column
            return new DecimalColumn(var, nullable);
        } else if (dtUri.equals(XSD.duration.toString())) {
            // JDBC has no notion of durations so return as a string
            return new StringColumn(var, nullable);
        } else if (dtUri.equals(XSD.integer.toString()) || dtUri.equals(XSD.xint.toString())
                || dtUri.equals(XSD.xlong.toString())) {
View Full Code Here

Examples of org.apache.jena.jdbc.results.metadata.columns.DecimalColumn

        if (dtUri.equals(XSD.date.toString()) || dtUri.equals(XSD.dateTime.toString())) {
            // Date column
            return new DateColumn(var, nullable);
        } else if (dtUri.equals(XSD.decimal.toString())) {
            // Decimal column
            return new DecimalColumn(var, nullable);
        } else if (dtUri.equals(XSD.duration.toString())) {
            // JDBC has no notion of durations so return as a string
            return new StringColumn(var, nullable);
        } else if (dtUri.equals(XSD.integer.toString()) || dtUri.equals(XSD.xint.toString())
                || dtUri.equals(XSD.xlong.toString())) {
View Full Code Here

Examples of org.openswing.swing.table.columns.client.DecimalColumn

    });

    // define sheets grid additional columns..
    TextColumn tCol = null;
    DateColumn dCol = null;
    DecimalColumn nCol = null;
    for(int i=0;i<10;i++) {
      tCol = new TextColumn();
      tCol.setColumnName("sProp"+i+"ITM25");
      tCol.setColumnVisible(false);
      tCol.setColumnRequired(false);
      tCol.setPreferredWidth(80);
      additionalCols.add(tCol);
      gridSheets.getColumnContainer().add(tCol,null);

      dCol = new DateColumn();
      dCol.setColumnName("dProp"+i+"ITM25");
      dCol.setColumnVisible(false);
      dCol.setColumnRequired(false);
      dCol.setPreferredWidth(80);
      additionalCols.add(dCol);
      gridSheets.getColumnContainer().add(dCol,null);

      nCol = new DecimalColumn();
      nCol.setColumnName("nProp"+i+"ITM25");
      nCol.setColumnVisible(false);
      nCol.setColumnRequired(false);
      nCol.setPreferredWidth(60);
      additionalCols.add(nCol);
      gridSheets.getColumnContainer().add(nCol,null);
    }

    // retrieve levels info...
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.