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

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

Constructor Summary
`RowDescriptorBuilder()`

Method Summary
`RowDescriptor` | `getDescriptor(ExtendedTypeMap typeMap)` Returns a RowDescriptor built based on the builder internal state.
`boolean` | `isOverriden(String columnName)`
`protected ColumnDescriptor[]` | `mergeResultSetAndPresetColumns()`
`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`

### mergeResultSetAndPresetColumns

    protected ColumnDescriptor[] mergeResultSetAndPresetColumns()
                                                         throws SQLException

  Returns:
    array of columns for ResultSet with overriding ColumnDescriptors from 'columns' Note: column will be overlooked, if column name is empty
  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-2010 Apache Cayenne. All Rights Reserved.