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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
columns
protected ColumnDescriptor[] columns
resultSetMetadata
protected ResultSetMetaData resultSetMetadata
caseTransformer
protected org.apache.commons.collections.Transformer caseTransformer
typeOverrides
protected Map<String,String> typeOverrides
RowDescriptorBuilder
public RowDescriptorBuilder()
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)
Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.