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

## org.apache.cayenne.access.jdbc
Class RowDescriptor

    java.lang.Object
      org.apache.cayenne.access.jdbc.RowDescriptor

    public class RowDescriptor

extends Object

A descriptor of a result row obtained from a database.

Since:
  1.2
Author:
  Andrus Adamchik

Field Summary
`protected ColumnDescriptor[]` | `columns`
`protected ExtendedType[]` | `converters`

Constructor Summary
`protected` | `RowDescriptor()` Creates an empty RowDescriptor.
`` | `RowDescriptor(ColumnDescriptor[] columns, ExtendedTypeMap types)` Creates a RowDescriptor for an array of columns.
`` | `RowDescriptor(ResultSet resultSet, ExtendedTypeMap types)` Creates new RowDescriptor using ResultSet metadata to determine the columns.
`` | `RowDescriptor(ResultSet resultSet, ExtendedTypeMap types, Map javaTypeOverrides)` Creates new RowDescriptor using ResultSet metadata to determine the columns.

Method Summary
`void` | `forceLowerCaseColumnNames()` Converts result column labels to lowercase using the default Locale.
`void` | `forceUpperCaseColumnNames()` Converts result column labels to uppercase using the default Locale.
`ColumnDescriptor[]` | `getColumns()` Returns column descriptors.
`ExtendedType[]` | `getConverters()` Returns extended types for columns.
`int` | `getWidth()` Returns a number of columns in a row.
`protected void` | `indexTypes(ExtendedTypeMap types)` Initializes converters for columns.
`protected void` | `initFromResultSet(ResultSet resultSet)` Builds columns list from ResultSet metadata.
`protected void` | `overrideJavaTypes(Map overrides)` Overrides Java types of result columns.

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

Field Detail

### columns

    protected ColumnDescriptor[] columns

### converters

    protected ExtendedType[] converters

Constructor Detail

### RowDescriptor

    protected RowDescriptor()

  Creates an empty RowDescriptor. Intended mainly for testing and use by subclasses.

### RowDescriptor

    public RowDescriptor(ColumnDescriptor[] columns,
                         ExtendedTypeMap types)

  Creates a RowDescriptor for an array of columns.

### RowDescriptor

    public RowDescriptor(ResultSet resultSet,
                         ExtendedTypeMap types)

  Creates new RowDescriptor using ResultSet metadata to determine the columns.

### RowDescriptor

    public RowDescriptor(ResultSet resultSet,
                         ExtendedTypeMap types,
                         Map javaTypeOverrides)

  Creates new RowDescriptor using ResultSet metadata to determine the columns. Note that if javaTypeOverrides array is null, default JDBC to Java types mapping is used.

Method Detail

### forceUpperCaseColumnNames

    public void forceUpperCaseColumnNames()

  Converts result column labels to uppercase using the default Locale.

  Since:
    3.0

### forceLowerCaseColumnNames

    public void forceLowerCaseColumnNames()

  Converts result column labels to lowercase using the default Locale.

  Since:
    3.0

### indexTypes

    protected void indexTypes(ExtendedTypeMap types)

  Initializes converters for columns.

### initFromResultSet

    protected void initFromResultSet(ResultSet resultSet)

  Builds columns list from ResultSet metadata.

### overrideJavaTypes

    protected void overrideJavaTypes(Map overrides)

  Overrides Java types of result columns. Keys in the map must correspond to the names of the columns.

### getWidth

    public int getWidth()

  Returns a number of columns in a row.

### getColumns

    public ColumnDescriptor[] getColumns()

  Returns column descriptors.

### getConverters

    public ExtendedType[] getConverters()

  Returns extended types for columns.

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

Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.