Class ColumnInfo

java.lang.Object
org.castor.cpa.persistence.sql.engine.info.ColumnInfo
All Implemented Interfaces:
Cloneable

public final class ColumnInfo extends Object implements Cloneable
Class representing columns belonging to a table.
Version:
$Revision: 8469 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Dennis Butterstein, Ralf Joachim
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor creating new column with only name set.
    protected
    ColumnInfo(String name, int index, int type, TypeConvertor convertFrom, boolean store, boolean dirty)
    Constructor with all given values.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Method returning the field index of this column.
    Method returning name of this column.
    int
    Method returning SQL type currently set.
    boolean
    Method returning dirty flag.
    boolean
    Method returning store flag.
    protected Object
    toSQL(Object object)
    Method to translate java data types to sql data types.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ColumnInfo

      protected ColumnInfo(String name, int index, int type, TypeConvertor convertFrom, boolean store, boolean dirty)
      Constructor with all given values.
      Parameters:
      name - Name of this column.
      index - Index of the field this column belongs to.
      type - SQL type of this column.
      convertFrom - Converter to convert value of this column.
      store - Flag telling if column is persistent or not.
      dirty - Flag telling if this column was changed or not.
    • ColumnInfo

      protected ColumnInfo(String name)
      Constructor creating new column with only name set.
      Parameters:
      name - Name to be set.
  • Method Details

    • getName

      public String getName()
      Method returning name of this column.
      Returns:
      Name of this column.
    • getIndex

      public int getIndex()
      Method returning the field index of this column.
      Returns:
      Index of the field this column belongs to.
    • getType

      public int getType()
      Method returning SQL type currently set.
      Returns:
      SQL type currently set.
    • isStore

      public boolean isStore()
      Method returning store flag.
      Returns:
      Store flag.
    • isDirty

      public boolean isDirty()
      Method returning dirty flag.
      Returns:
      Dirty flag.
    • toSQL

      protected Object toSQL(Object object)
      Method to translate java data types to sql data types.
      Parameters:
      object - Object to be translated to sql data type.
      Returns:
      Object converted to sql data type.