Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ddlutils.platform
Class MetaDataColumnDescriptor

    java.lang.Object
      org.apache.ddlutils.platform.MetaDataColumnDescriptor

    public class MetaDataColumnDescriptor

extends Object

Describes a column in a metadata result set.

Version:
  $Revision: $

Constructor Summary
`MetaDataColumnDescriptor(String columnName, int jdbcType)` Creates a new descriptor instance.
`MetaDataColumnDescriptor(String columnName, int jdbcType, Object defaultValue)` Creates a new descriptor instance.

Method Summary
`Object` | `getDefaultValue()` Returns the default value.
`int` | `getJdbcType()` Returns the jdbc type to read from the result set.
`String` | `getName()` Returns the name.
`Object` | `readColumn(ResultSet resultSet)` Reads the column from the result set.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MetaDataColumnDescriptor

    public MetaDataColumnDescriptor(String columnName,
                                    int jdbcType)

  Creates a new descriptor instance.

  Parameters:
    `columnName` - The name of the column
    `jdbcType` - The jdbc type for reading from the result set, one of VARCHAR, INTEGER, TINYINT, BIT

### MetaDataColumnDescriptor

    public MetaDataColumnDescriptor(String columnName,
                                    int jdbcType,
                                    Object defaultValue)

  Creates a new descriptor instance.

  Parameters:
    `columnName` - The name of the column
    `jdbcType` - The jdbc type for reading from the result set, one of VARCHAR, INTEGER, TINYINT, BIT
    `defaultValue` - The default value if the column is not present in the result set

Method Detail

### getName

    public String getName()

  Returns the name.

  Returns:
    The name

### getDefaultValue

    public Object getDefaultValue()

  Returns the default value.

  Returns:
    The default value

### getJdbcType

    public int getJdbcType()

  Returns the jdbc type to read from the result set.

  Returns:
    The jdbc type

### readColumn

    public Object readColumn(ResultSet resultSet)
                      throws SQLException

  Reads the column from the result set.

  Parameters:
    `resultSet` - The result set
  Returns:
    The column value or the default value if the column is not present in the result set
  Throws:
    `SQLException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.