pl.edu.agh.cast.importer.base.converter.rules
Class AbstractSingleColumnConversionRule

java.lang.Object
  extended by pl.edu.agh.cast.importer.base.converter.rules.AbstractSingleColumnConversionRule
All Implemented Interfaces:
IConversionRule
Direct Known Subclasses:
AbstractDateSingleColumnConversionRule, AbstractIntegerSingleColumnConversionRule, AbstractStringSingleColumnConversionRule

public abstract class AbstractSingleColumnConversionRule
extends Object
implements IConversionRule

Abstract class for all single column conversion rules.

Author:
AGH CAST Team

Field Summary
protected  int columnIndex
          Index of the column, whose value is to be retrieved and returned as an appropriate type.
 
Constructor Summary
AbstractSingleColumnConversionRule()
          The default constructor.
 
Method Summary
 void clear()
          Clears the conversion rule's configuration.
protected  void copyFields(AbstractSingleColumnConversionRule copy)
          Copies all required fields of AbstractSingleColumnConversionRule to the given instance of conversion rule.
 int getColumnIndex()
           
 String getFormat()
          Retrieves the domain field format.
 boolean isComplete()
          Checks whether current conversion rule is fully configured - all necessary parameters are present and the the conversion process can be performed.
 void setColumnIndex(int columnIdx)
           
 void setFormat(String format)
          Sets the domain field format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pl.edu.agh.cast.importer.base.converter.rules.IConversionRule
createCopy
 

Field Detail

columnIndex

protected int columnIndex
Index of the column, whose value is to be retrieved and returned as an appropriate type.

Constructor Detail

AbstractSingleColumnConversionRule

public AbstractSingleColumnConversionRule()
The default constructor.

Method Detail

clear

public void clear()
Clears the conversion rule's configuration.

Specified by:
clear in interface IConversionRule
See Also:
IConversionRule.clear()

isComplete

public boolean isComplete()
Checks whether current conversion rule is fully configured - all necessary parameters are present and the the conversion process can be performed.

Specified by:
isComplete in interface IConversionRule
Returns:
flag indicating the rule's completion state
See Also:
IConversionRule.isComplete()

setFormat

public void setFormat(String format)
Sets the domain field format.

Specified by:
setFormat in interface IConversionRule
Parameters:
format - the field format
See Also:
IConversionRule.setFormat(java.lang.String)

getFormat

public String getFormat()
Retrieves the domain field format.

Specified by:
getFormat in interface IConversionRule
Returns:
the field format
See Also:
pl.edu.agh.cast.importer.base.converter.rules.IConversionRule#getFormats()

setColumnIndex

public void setColumnIndex(int columnIdx)

getColumnIndex

public int getColumnIndex()

copyFields

protected void copyFields(AbstractSingleColumnConversionRule copy)
Copies all required fields of AbstractSingleColumnConversionRule to the given instance of conversion rule.

Parameters:
copy - a conversion rule instance which is to be copy of this rule


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.