Package org.teiid.jdbc

Examples of org.teiid.jdbc.MetadataProvider


       
        Map[] columnMetadata = new Map[] {
            col1, col2
        };
               
        MetadataProvider provider = new MetadataProvider(columnMetadata);                     
        return provider;       
    }
View Full Code Here


        Map[] columnMetadata = new Map[] {
            processor.getDefaultColumn("table", "c1", String.class), //$NON-NLS-1$ //$NON-NLS-2$
            processor.getDefaultColumn("table", "c2", Integer.class) //$NON-NLS-1$ //$NON-NLS-2$
        };              
       
        return new MetadataProvider(columnMetadata);
    }
View Full Code Here

       
        return new MetadataProvider(columnMetadata);
    }
   
    public void testMetadata() throws Exception {
        MetadataProvider provider = example1();
        assertEquals(2, provider.getColumnCount());
       
        for(int i=0; i<provider.getColumnCount(); i++) {
            assertNotNull(provider.getValue(i, ResultsMetadataConstants.VIRTUAL_DATABASE_NAME));
            assertNotNull(provider.getValue(i, ResultsMetadataConstants.VIRTUAL_DATABASE_VERSION));
            assertNotNull(provider.getValue(i, ResultsMetadataConstants.GROUP_NAME));
            assertNotNull(provider.getValue(i, ResultsMetadataConstants.ELEMENT_NAME));
           
        }
    }
View Full Code Here

        String value = "vdb"; //$NON-NLS-1$
       
        Map columnMetadata = new HashMap();
        columnMetadata.put(property, value);

        MetadataProvider md = new MetadataProvider(new Map[] {columnMetadata});
       
        String actualValue = md.getStringValue(0, property);
        assertEquals(value, actualValue);              
    }
View Full Code Here

        Integer value = new Integer(10);
       
        Map columnMetadata = new HashMap();
        columnMetadata.put(property, value);

        MetadataProvider md = new MetadataProvider(new Map[] {columnMetadata});
       
        int actualValue = md.getIntValue(0, property);
        assertEquals(10, actualValue);              
    }
View Full Code Here

        Boolean value = Boolean.TRUE;
       
        Map columnMetadata = new HashMap();
        columnMetadata.put(property, value);

        MetadataProvider md = new MetadataProvider(new Map[] {columnMetadata});
       
        boolean actualValue = md.getBooleanValue(0, property);
        assertEquals(true, actualValue);              
    }
View Full Code Here

TOP

Related Classes of org.teiid.jdbc.MetadataProvider

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.