Class ColumnInfo
- java.lang.Object
-
- org.castor.cpa.persistence.sql.engine.info.ColumnInfo
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class ColumnInfo extends java.lang.Object implements java.lang.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
ColumnInfo(java.lang.String name)
Constructor creating new column with only name set.protected
ColumnInfo(java.lang.String name, int index, int type, TypeConvertor convertFrom, boolean store, boolean dirty)
Constructor with all given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIndex()
Method returning the field index of this column.java.lang.String
getName()
Method returning name of this column.int
getType()
Method returning SQL type currently set.boolean
isDirty()
Method returning dirty flag.boolean
isStore()
Method returning store flag.protected java.lang.Object
toSQL(java.lang.Object object)
Method to translate java data types to sql data types.
-
-
-
Constructor Detail
-
ColumnInfo
protected ColumnInfo(java.lang.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(java.lang.String name)
Constructor creating new column with only name set.- Parameters:
name
- Name to be set.
-
-
Method Detail
-
getName
public java.lang.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 java.lang.Object toSQL(java.lang.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.
-
-