Overview | Package | Class | 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:
  java.io.Serializable

    public class ColumnDescriptor

extends java.lang.Object
implements java.io.Serializable

A descriptor of a ResultSet column.

Since:
  1.1
Author:
  Andrei Adamchik
See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `javaClass`
`protected int` | `jdbcType`
`protected java.lang.String` | `label`
`protected java.lang.String` | `name`
`protected boolean` | `primaryKey` Deprecated. since 1.2
`protected java.lang.String` | `procedureName`
`protected java.lang.String` | `qualifiedColumnName`
`protected java.lang.String` | `tableName`

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

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

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

Field Detail

### tableName

    protected java.lang.String tableName

### procedureName

    protected java.lang.String procedureName

### name

    protected java.lang.String name

### qualifiedColumnName

    protected java.lang.String qualifiedColumnName

### label

    protected java.lang.String label

### primaryKey

    protected boolean primaryKey

  Deprecated. since 1.2

### jdbcType

    protected int jdbcType

### javaClass

    protected java.lang.String javaClass

Constructor Detail

### ColumnDescriptor

    public ColumnDescriptor()

  Creates a ColumnDescriptor

### ColumnDescriptor

    public ColumnDescriptor(java.lang.String columnName,
                            int jdbcType,
                            java.lang.String javaClass)

  Creates a column descriptor with user-specified parameters.

  Since:
    1.2

### ColumnDescriptor

    public ColumnDescriptor(ObjAttribute objAttribute,
                            DbAttribute dbAttribute)

  Deprecated. since 1.2 use constructor with column alias parameter.

  Creates a ColumnDescriptor from Cayenne ObjAttribute and DbAttribute.

### ColumnDescriptor

    public ColumnDescriptor(DbAttribute attribute,
                            java.lang.String columnAlias)

  Creates a ColumnDescriptor from Cayenne DbAttribute.

  Since:
    1.2

### ColumnDescriptor

    public ColumnDescriptor(ObjAttribute objAttribute,
                            DbAttribute dbAttribute,
                            java.lang.String columnAlias)

Since:
  1.2

### ColumnDescriptor

    public ColumnDescriptor(ProcedureParameter parameter)

  Creates a ColumnDescriptor from stored procedure parameter.

  Since:
    1.2

### ColumnDescriptor

    public ColumnDescriptor(java.sql.ResultSetMetaData metaData,
                            int position)
                     throws java.sql.SQLException

  Creates a ColumnDescriptor using ResultSetMetaData.

  Throws:
    `java.sql.SQLException`
  Since:
    1.2

Method Detail

### equals

    public boolean equals(java.lang.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 `java.lang.Object`
  Since:
    1.2

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`
  Since:
    1.2

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`
  Since:
    1.2

### getDefaultJavaClass

    public java.lang.String getDefaultJavaClass(int size,
                                                int scale)

  Returns a default Java class for an internal JDBC type.

  Since:
    1.2

### getQualifiedColumnName

    public java.lang.String getQualifiedColumnName()

  Returns "qualifiedColumnName" property.

  Since:
    1.2

### getJdbcType

    public int getJdbcType()

### getName

    public java.lang.String getName()

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

### setJdbcType

    public void setJdbcType(int i)

### setName

    public void setName(java.lang.String name)

### isPrimaryKey

    public boolean isPrimaryKey()

  Deprecated. since 1.2

### getJavaClass

    public java.lang.String getJavaClass()

### setPrimaryKey

    public void setPrimaryKey(boolean b)

  Deprecated. since 1.2

### setJavaClass

    public void setJavaClass(java.lang.String string)

### getTableName

    public java.lang.String getTableName()

  Returns the name of the parent table.

  Since:
    1.2

### setTableName

    public void setTableName(java.lang.String tableName)

  Since:
    1.2

### getProcedureName

    public java.lang.String getProcedureName()

  Returns the name of the parent stored procedure.

  Since:
    1.2

### setProcedureName

    public void setProcedureName(java.lang.String procedureName)

  Since:
    1.2

### setQualifiedColumnName

    public void setQualifiedColumnName(java.lang.String namePrefix)

  Since:
    1.2

### getLabel

    public java.lang.String getLabel()

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

  Since:
    1.2

### setLabel

    public void setLabel(java.lang.String columnName)

  Since:
    1.2

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.