org.compass.gps.device.jdbc.mapping
Class AbstractColumnMapping

java.lang.Object
  extended by org.compass.gps.device.jdbc.mapping.AbstractColumnMapping
All Implemented Interfaces:
ColumnMapping
Direct Known Subclasses:
AbstractColumnToPropertyMapping, VersionColumnMapping

public class AbstractColumnMapping
extends Object
implements ColumnMapping

A helper base class for columns base mappings.

Author:
kimchy

Constructor Summary
AbstractColumnMapping()
           
AbstractColumnMapping(int columnIndex)
           
AbstractColumnMapping(String columnName)
           
 
Method Summary
 int getColumnIndex()
          Returns the column index.
 String getColumnName()
          Returns the column name.
 boolean isUsingColumnIndex()
          Returns true if using the column index to map the column, false if using the column name.
 void setColumnIndex(int columnIndex)
           
 void setColumnName(String column)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractColumnMapping

public AbstractColumnMapping()

AbstractColumnMapping

public AbstractColumnMapping(String columnName)

AbstractColumnMapping

public AbstractColumnMapping(int columnIndex)
Method Detail

getColumnName

public String getColumnName()
Description copied from interface: ColumnMapping
Returns the column name.

Specified by:
getColumnName in interface ColumnMapping
Returns:
The column name.

setColumnName

public void setColumnName(String column)

getColumnIndex

public int getColumnIndex()
Description copied from interface: ColumnMapping
Returns the column index.

Specified by:
getColumnIndex in interface ColumnMapping
Returns:
The column index.

setColumnIndex

public void setColumnIndex(int columnIndex)

isUsingColumnIndex

public boolean isUsingColumnIndex()
Description copied from interface: ColumnMapping
Returns true if using the column index to map the column, false if using the column name.

Specified by:
isUsingColumnIndex in interface ColumnMapping
Returns:
If using colum index (otherwise using column name).

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2004-2008 The Compass Project.