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 RowDescriptorBuilder

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

    public class RowDescriptorBuilder

extends Object

A builder class that helps to assemble `RowDescriptor` instances from various types of inputs.

Since:
  3.0
Author:
  Andrus Adamchik

Field Summary
`protected Transformer` | `caseTransformer`
`protected ColumnDescriptor[]` | `columns`
`protected ResultSetMetaData` | `resultSetMetadata`
`protected Map<String,String>` | `typeOverrides`

Constructor Summary
`RowDescriptorBuilder()`

Method Summary
`protected ColumnDescriptor[]` | `columnsFromPresetColumns()`
`protected ColumnDescriptor[]` | `columnsFromResultSet()`
`RowDescriptor` | `getDescriptor(ExtendedTypeMap typeMap)` Returns a RowDescriptor built based on the builder internal state.
`boolean` | `isOverriden(String columnName)`
`RowDescriptorBuilder` | `overrideColumnType(String columnName, String type)`
`RowDescriptorBuilder` | `setColumns(ColumnDescriptor[] columns)` Sets an explicit set of columns.
`RowDescriptorBuilder` | `setResultSet(ResultSet resultSet)`
`RowDescriptorBuilder` | `useLowercaseColumnNames()`
`RowDescriptorBuilder` | `useUppercaseColumnNames()`

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

Field Detail

### columns

    protected ColumnDescriptor[] columns

### resultSetMetadata

    protected ResultSetMetaData resultSetMetadata

### caseTransformer

    protected Transformer caseTransformer

### typeOverrides

    protected Map<String,String> typeOverrides

Constructor Detail

### RowDescriptorBuilder

    public RowDescriptorBuilder()

Method Detail

### getDescriptor

    public RowDescriptor getDescriptor(ExtendedTypeMap typeMap)
                                throws SQLException,
                                       IllegalStateException

  Returns a RowDescriptor built based on the builder internal state.

  Throws:
    `SQLException`
    `IllegalStateException`

### columnsFromPresetColumns

    protected ColumnDescriptor[] columnsFromPresetColumns()

### columnsFromResultSet

    protected ColumnDescriptor[] columnsFromResultSet()
                                               throws SQLException

  Throws:
    `SQLException`

### setColumns

    public RowDescriptorBuilder setColumns(ColumnDescriptor[] columns)

  Sets an explicit set of columns. Note that the array passed as an argument can later be modified by the build to enforce column capitalization policy and columns Java types overrides.

### setResultSet

    public RowDescriptorBuilder setResultSet(ResultSet resultSet)
                                      throws SQLException

  Throws:
    `SQLException`

### useLowercaseColumnNames

    public RowDescriptorBuilder useLowercaseColumnNames()

### useUppercaseColumnNames

    public RowDescriptorBuilder useUppercaseColumnNames()

### overrideColumnType

    public RowDescriptorBuilder overrideColumnType(String columnName,
                                                   String type)

### isOverriden

    public boolean isOverriden(String columnName)

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-2008 Apache Cayenne. All Rights Reserved.