Package org.apache.torque

# Klasse ColumnImpl

java.lang.Object
org.apache.torque.ColumnImpl

Alle implementierten Schnittstellen:
  `Serializable`, `Column`

public class ColumnImpl extends Object implements Column, Serializable
An implementation of the column interface. This class is immutable, i.e cannot be changed once constructed.

Version:
  $Id: ColumnImpl.java 1917245 2024-04-21 14:06:23Z tv $
Siehe auch:
  - Serialisierte Form

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `ColumnImpl(String sqlExpression)`
  Constructor which tries to guess schema, table and column names from an SQL expression.
  `ColumnImpl(String tableName, String columnName)`
  Constructor.
  `ColumnImpl(String schemaName, String tableName, String columnName)`
  Constructor.
  `ColumnImpl(String schemaName, String tableName, String columnName, String sqlExpression)`
  Constructor.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `boolean`
  `equals(Object obj)`
  `String`
  `getColumnName()`
  Returns the column name.
  `String`
  `getFullTableName()`
  Returns the table name prefixed with the schema name if it exists.
  `String`
  `getSchemaName()`
  Returns the name of any fixed schema prefix for the column's table (if any).
  `String`
  `getSqlExpression()`
  Returns the SQL expression for the column, qualified by the table name but not by the schema name.
  `String`
  `getTableName()`
  Returns the table name.
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Konstruktordetails

  - ### ColumnImpl

    public ColumnImpl(String tableName, String columnName)
    Constructor.
    Parameter:
      `tableName` - the table name, not null or blank.
      `columnName` - the column name, not null or blank.
    Löst aus:
      `NullPointerException` - if columnName or tableName are null.
      `IllegalArgumentException` - if columnName or tableName are blank.

  - ### ColumnImpl

    public ColumnImpl(String schemaName, String tableName, String columnName)
    Constructor.
    Parameter:
      `schemaName` - the schema name, may be null but not blank.
      `tableName` - the table name, may be null but not blank. If it contains a dot, then only the portion after the dot will be taken as table name. If it contains a dot and schemaName is null, then the schema name will be set as the portion before the dot.
      `columnName` - the column name, not null or blank.
    Löst aus:
      `NullPointerException` - if columnName or tableName are null.
      `IllegalArgumentException` - if columnName or tableName are blank.

  - ### ColumnImpl

    public ColumnImpl(String schemaName, String tableName, String columnName, String sqlExpression)
    Constructor.
    Parameter:
      `schemaName` - the schema name, may be null but not blank.
      `tableName` - the table name, may be null but not blank. If it contains a dot, then only the portion after the dot will be taken as table name. If it contains a dot and schemaName is null, then the schema name will be set as the portion before the dot.
      `columnName` - the column name, may be null but not blank.
      `sqlExpression` - the SQL expression for the column, not null or blank.
    Löst aus:
      `NullPointerException` - if tableName or sqlExpression are null.
      `IllegalArgumentException` - if tableName or sqlExpression are blank.

  - ### ColumnImpl

    public ColumnImpl(String sqlExpression)
    Constructor which tries to guess schema, table and column names from an SQL expression. If a schema name can be identified in the SQL expression, it is removed from the SQL expression in the column.
    Parameter:
      `sqlExpression` - the SQL expression, not null, not blank.
    Löst aus:
      `NullPointerException` - if sqlExpression is null.
      `IllegalArgumentException` - if table or column name cannot be guessed from sqlExpression.

- ## Methodendetails

  - ### getColumnName

    public String getColumnName()
    Returns the column name.
    Angegeben von:
      `getColumnName` in Schnittstelle `Column`
    Gibt zurück:
      the column name, may be null.

  - ### getTableName

    public String getTableName()
    Returns the table name.
    Angegeben von:
      `getTableName` in Schnittstelle `Column`
    Gibt zurück:
      the table name, may be null.

  - ### getFullTableName

    public String getFullTableName()
    Returns the table name prefixed with the schema name if it exists. I.e. if a schema name exists, the result will be schemaName.tableName, and otherwise it will just be tableName.
    Angegeben von:
      `getFullTableName` in Schnittstelle `Column`
    Gibt zurück:
      the fully qualified table name of the column, may be null but not blank.

  - ### getSchemaName

    public String getSchemaName()
    Returns the name of any fixed schema prefix for the column's table (if any).
    Angegeben von:
      `getSchemaName` in Schnittstelle `Column`
    Gibt zurück:
      the schema name, or null if the schema is not known.

  - ### getSqlExpression

    public String getSqlExpression()
    Returns the SQL expression for the column, qualified by the table name but not by the schema name. This can also be a pseudocolumn (e.g. count(*)).
    Angegeben von:
      `getSqlExpression` in Schnittstelle `Column`
    Gibt zurück:
      the SQL expression for the column, not null.

  - ### hashCode

    public int hashCode()
    Setzt außer Kraft:
      `hashCode` in Klasse `Object`

  - ### equals

    public boolean equals(Object obj)
    Setzt außer Kraft:
      `equals` in Klasse `Object`

  - ### toString

    public String toString()
    Setzt außer Kraft:
      `toString` in Klasse `Object`