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 java.lang.Object

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

Since:
  3.0

Field Summary
`protected org.apache.commons.collections.Transformer` | `caseTransformer`
`protected ColumnDescriptor[]` | `columns`
`protected java.sql.ResultSetMetaData` | `resultSetMetadata`
`protected java.util.Map<java.lang.String,java.lang.String>` | `typeOverrides`

Constructor Summary
`RowDescriptorBuilder()`

Method Summary
`RowDescriptor` | `getDescriptor(ExtendedTypeMap typeMap)` Returns a RowDescriptor built based on the builder internal state.
`boolean` | `isOverriden(java.lang.String columnName)`
`protected ColumnDescriptor[]` | `mergeResultSetAndPresetColumns()`
`RowDescriptorBuilder` | `overrideColumnType(java.lang.String columnName, java.lang.String type)`
`RowDescriptorBuilder` | `setColumns(ColumnDescriptor[] columns)` Sets an explicit set of columns.
`RowDescriptorBuilder` | `setResultSet(java.sql.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 java.sql.ResultSetMetaData resultSetMetadata

### caseTransformer

    protected org.apache.commons.collections.Transformer caseTransformer

### typeOverrides

    protected java.util.Map<java.lang.String,java.lang.String> typeOverrides

Constructor Detail

### RowDescriptorBuilder

    public RowDescriptorBuilder()

Method Detail

### getDescriptor

    public RowDescriptor getDescriptor(ExtendedTypeMap typeMap)
                                throws java.sql.SQLException,
                                       java.lang.IllegalStateException

  Returns a RowDescriptor built based on the builder internal state.

  Throws:
    `java.sql.SQLException`
    `java.lang.IllegalStateException`

### mergeResultSetAndPresetColumns

    protected ColumnDescriptor[] mergeResultSetAndPresetColumns()
                                                         throws java.sql.SQLException

  Returns:
    array of columns for ResultSet with overriding ColumnDescriptors from 'columns' Note: column will be overlooked, if column name is empty
  Throws:
    `java.sql.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(java.sql.ResultSet resultSet)
                                      throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### useLowercaseColumnNames

    public RowDescriptorBuilder useLowercaseColumnNames()

### useUppercaseColumnNames

    public RowDescriptorBuilder useUppercaseColumnNames()

### overrideColumnType

    public RowDescriptorBuilder overrideColumnType(java.lang.String columnName,
                                                   java.lang.String type)

### isOverriden

    public boolean isOverriden(java.lang.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-2012 Apache Cayenne. All Rights Reserved.