Package org.apache.jena.jdbc.results.metadata.columns

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


     * @throws SQLException
     */
    @SuppressWarnings("deprecation")
    @Test
    public void meta_result_set_date_01() throws SQLException {
        MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new DateColumn("Test", ResultSetMetaData.columnNullable) },
                new Object[][] { { new Date(2013, 4, 24) } });

        Assert.assertTrue(results.next());
        Date value = results.getDate(1);
        Assert.assertEquals(new Date(2013, 4, 24), value);
View Full Code Here


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

        Assert.assertTrue(results.next());
        Date value = results.getDate(1);
        Assert.assertEquals(null, value);
View Full Code Here

     * @throws SQLException
     */
    private static ColumnInfo selectColumnType(String var, String dtUri, int nullable) throws SQLException {
        if (dtUri.equals(XSD.date.toString())) {
            // Date column
            return new DateColumn(var, nullable);
        } else if (dtUri.equals(XSD.dateTime.toString())) {
            // Date time column
            return new DateTimeColumn(var, nullable);
        } else if (dtUri.equals(XSD.decimal.toString())) {
            // Decimal column
View Full Code Here

     * @throws SQLException
     */
    private static ColumnInfo selectColumnType(String var, String dtUri, int nullable) throws SQLException {
        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
View Full Code Here

TOP

Related Classes of org.apache.jena.jdbc.results.metadata.columns.DateColumn

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.