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 ColumnDescriptor

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

All Implemented Interfaces:
  Serializable

    public class ColumnDescriptor

extends Object
implements Serializable

A descriptor of a ResultSet column.

Since:
  1.1
See Also:
  Serialized Form

Field Summary
`protected String` | `javaClass`
`protected int` | `jdbcType`
`protected String` | `label`
`protected String` | `name`
`protected String` | `procedureName`
`protected String` | `qualifiedColumnName`
`protected String` | `tableName`

Constructor Summary
`ColumnDescriptor()` Creates a ColumnDescriptor
`ColumnDescriptor(DbAttribute attribute, String columnAlias)` Creates a ColumnDescriptor from Cayenne DbAttribute.
`ColumnDescriptor(ObjAttribute objAttribute, DbAttribute dbAttribute, String columnAlias)`
`ColumnDescriptor(ProcedureParameter parameter)` Creates a ColumnDescriptor from stored procedure parameter.
`ColumnDescriptor(ResultSetMetaData metaData, int position)` Creates a ColumnDescriptor using ResultSetMetaData.
`ColumnDescriptor(String columnName, int jdbcType, String javaClass)` Creates a column descriptor with user-specified parameters.

Method Summary
`boolean` | `equals(Object o)` Returns true if another object is a ColumnDescriptor with the same name, name prefix, table and procedure names.
`String` | `getDefaultJavaClass(int size, int scale)` Returns a default Java class for an internal JDBC type.
`String` | `getJavaClass()`
`int` | `getJdbcType()`
`String` | `getLabel()` Returns "label" used in a DataRow for column value.
`String` | `getName()` Retunrs column name.
`String` | `getProcedureName()` Returns the name of the parent stored procedure.
`String` | `getQualifiedColumnName()` Returns "qualifiedColumnName" property.
`String` | `getTableName()` Returns the name of the parent table.
`int` | `hashCode()`
`void` | `setJavaClass(String string)`
`void` | `setJdbcType(int i)`
`void` | `setLabel(String columnName)`
`void` | `setName(String name)`
`void` | `setProcedureName(String procedureName)`
`void` | `setQualifiedColumnName(String namePrefix)`
`void` | `setTableName(String tableName)`
`String` | `toString()`

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

Field Detail

### tableName

    protected String tableName

### procedureName

    protected String procedureName

### name

    protected String name

### qualifiedColumnName

    protected String qualifiedColumnName

### label

    protected String label

### jdbcType

    protected int jdbcType

### javaClass

    protected String javaClass

Constructor Detail

### ColumnDescriptor

    public ColumnDescriptor()

  Creates a ColumnDescriptor

### ColumnDescriptor

    public ColumnDescriptor(String columnName,
                            int jdbcType,
                            String javaClass)

  Creates a column descriptor with user-specified parameters.

  Since:
    1.2

### ColumnDescriptor

    public ColumnDescriptor(DbAttribute attribute,
                            String columnAlias)

  Creates a ColumnDescriptor from Cayenne DbAttribute.

  Since:
    1.2

### ColumnDescriptor

    public ColumnDescriptor(ObjAttribute objAttribute,
                            DbAttribute dbAttribute,
                            String columnAlias)

Since:
  1.2

### ColumnDescriptor

    public ColumnDescriptor(ProcedureParameter parameter)

  Creates a ColumnDescriptor from stored procedure parameter.

  Since:
    1.2

### ColumnDescriptor

    public ColumnDescriptor(ResultSetMetaData metaData,
                            int position)
                     throws SQLException

  Creates a ColumnDescriptor using ResultSetMetaData.

  Throws:
    `SQLException`
  Since:
    1.2

Method Detail

### equals

    public boolean equals(Object o)

  Returns true if another object is a ColumnDescriptor with the same name, name prefix, table and procedure names. Other fields are ignored in the equality test.

  Overrides:
    `equals` in class `Object`
  Since:
    1.2

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`
  Since:
    1.2

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  Since:
    1.2

### getDefaultJavaClass

    public String getDefaultJavaClass(int size,
                                      int scale)

  Returns a default Java class for an internal JDBC type.

  Since:
    1.2

### getQualifiedColumnName

    public String getQualifiedColumnName()

  Returns "qualifiedColumnName" property.

  Since:
    1.2

### getJdbcType

    public int getJdbcType()

### getName

    public String getName()

  Retunrs column name. Name is an unqualified column name in a query.

### setJdbcType

    public void setJdbcType(int i)

### setName

    public void setName(String name)

### getJavaClass

    public String getJavaClass()

### setJavaClass

    public void setJavaClass(String string)

### getTableName

    public String getTableName()

  Returns the name of the parent table.

  Since:
    1.2

### setTableName

    public void setTableName(String tableName)

  Since:
    1.2

### getProcedureName

    public String getProcedureName()

  Returns the name of the parent stored procedure.

  Since:
    1.2

### setProcedureName

    public void setProcedureName(String procedureName)

  Since:
    1.2

### setQualifiedColumnName

    public void setQualifiedColumnName(String namePrefix)

  Since:
    1.2

### getLabel

    public String getLabel()

  Returns "label" used in a DataRow for column value.

  Since:
    1.2

### setLabel

    public void setLabel(String columnName)

  Since:
    1.2

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.