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

## toolkit.db.api
Class ColumnInfo

    java.lang.Object
      toolkit.db.api.ColumnInfo

    public class ColumnInfo

extends java.lang.Object

Class ColumnInfo wraps all info of related columns.

Field Summary
`static int` | `NON_REF_SELECT_COLUMN` Indicates that this column is a select column, but is not referenced in runtime PSQL query.
`static int` | `NON_SELECT_COLUMN` Indicates that this column is not a select column.

Method Summary
`boolean` | `equals(java.lang.Object obj)` Compares this ColumnInfo to the specified object.
`int` | `getColumnIndex()` Get the index of where this column should appear in Select clause when creating a sql string.
`java.lang.String` | `getColumnName()` Get real database name of this column.
`java.lang.String` | `getExpression()` Get expression of this column.
`java.lang.String` | `getMappingName()` Get mapping name of the column.
`TableInfo` | `getTable()` Get TableInfo of the table that this column belongs to.
`boolean` | `isCompCol()` Get whether this is a computed column.
`java.lang.String` | `toString()` Returns a string representing this ColumnInfo's values.

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

Field Detail

### NON_SELECT_COLUMN

    public static final int NON_SELECT_COLUMN

  Indicates that this column is not a select column. It's just a PSQL column of a PSQL table, it should not appear in Select clause either at design time nor at runtime.

  See Also:
    Constant Field Values

### NON_REF_SELECT_COLUMN

    public static final int NON_REF_SELECT_COLUMN

  Indicates that this column is a select column, but is not referenced in runtime PSQL query. That is to say, it should appear in Select clause of the raw SQL statement at design time, but should not appear at runtime.

  See Also:
    Constant Field Values

Method Detail

### getMappingName

    public java.lang.String getMappingName()

  Get mapping name of the column.

  Returns:
    the mapping name of the column.

### getColumnName

    public java.lang.String getColumnName()

  Get real database name of this column.

  Returns:
    the real name of the column.

### getExpression

    public java.lang.String getExpression()

  Get expression of this column.

  Returns:
    the expression of the column.

### isCompCol

    public boolean isCompCol()

  Get whether this is a computed column.

  Returns:
    true if this is a computed column, false otherwise.

### getTable

    public TableInfo getTable()

  Get TableInfo of the table that this column belongs to.

  Returns:
    TableInfo of the table that this column belongs to.

### getColumnIndex

    public int getColumnIndex()

  Get the index of where this column should appear in Select clause when creating a sql string. 0 means the first one, and 1 means the second one, etc. Other values means it should not appear in the Select clause.

  Returns:
    the index of where this column should appear in Select clause.
  See Also:
    `NON_SELECT_COLUMN`, `NON_REF_SELECT_COLUMN`

### equals

    public boolean equals(java.lang.Object obj)

  Compares this ColumnInfo to the specified object.

  Overrides:
    `equals` in class `java.lang.Object`
  Returns:
    true if the ColumnInfo is same; false otherwise.

### toString

    public java.lang.String toString()

  Returns a string representing this ColumnInfo's values. The format is as follows:

  >       className@hashCode[ mappingName | columnName | correlationName | expression |
  >                           tableMappingName | isCompCol ]

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representing this ColumnInfo.

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