Class ColumnInfo
java.lang.Object
org.castor.cpa.persistence.sql.engine.info.ColumnInfo
- All Implemented Interfaces:
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
ConstructorsModifierConstructorDescriptionprotected
ColumnInfo
(String name) 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 TypeMethodDescriptionint
getIndex()
Method returning the field index of this column.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 Object
Method to translate java data types to sql data types.
-
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
Constructor creating new column with only name set.- Parameters:
name
- Name to be set.
-
-
Method Details
-
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
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.
-