com.metamatrix.jdbc
Class DeferredMetadataProvider

java.lang.Object
  extended by com.metamatrix.jdbc.AbstractMetadataProvider
      extended by com.metamatrix.jdbc.DeferredMetadataProvider
All Implemented Interfaces:
ResultsMetadataProvider

public class DeferredMetadataProvider
extends AbstractMetadataProvider

This metadata provider starts with just column names and types (provided in the response) but must lazily load the rest of the metadata when necessary.


Method Summary
static DeferredMetadataProvider createWithInitialData(java.lang.String[] columnNames, java.lang.String[] columnTypes, MMStatement statement, long requestID)
           
 int getColumnCount()
          Get number of columns in the result set metadata
 int getParameterCount()
          Get parameter count from original command
 java.lang.Object getValue(int columnIndex, java.lang.Integer metadataPropertyKey)
          Get metadata value for the column at columnIndex for a given metadata property.
 
Methods inherited from class com.metamatrix.jdbc.AbstractMetadataProvider
getBooleanValue, getIntValue, getStringValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createWithInitialData

public static DeferredMetadataProvider createWithInitialData(java.lang.String[] columnNames,
                                                             java.lang.String[] columnTypes,
                                                             MMStatement statement,
                                                             long requestID)

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
Description copied from interface: ResultsMetadataProvider
Get number of columns in the result set metadata

Returns:
Column count
Throws:
java.sql.SQLException

getValue

public java.lang.Object getValue(int columnIndex,
                                 java.lang.Integer metadataPropertyKey)
                          throws java.sql.SQLException
Description copied from interface: ResultsMetadataProvider
Get metadata value for the column at columnIndex for a given metadata property.

Parameters:
columnIndex - The column index
metadataPropertyKey - The metadata property
Returns:
The value to return
Throws:
java.sql.SQLException

getParameterCount

public int getParameterCount()
                      throws java.sql.SQLException
Description copied from interface: ResultsMetadataProvider
Get parameter count from original command

Returns:
count
Throws:
java.sql.SQLException


Copyright © 2009. All Rights Reserved.