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

java.lang.Object
  extended by pl.edu.agh.cast.importer.base.converter.rules.AbstractDateDoubleColumnConversionRule
All Implemented Interfaces:
IConversionRule
Direct Known Subclasses:
DateDoubleColumnConversionRule

public abstract class AbstractDateDoubleColumnConversionRule
extends Object
implements IConversionRule

Date conversion rule for two columns: one date column and one time column.

Author:
AGH CAST Team

Field Summary
protected  int dateColumnIndex
          The index of the column holding the connection date.
protected  int timeColumnIndex
          The index of the column holding the connection time.
 
Constructor Summary
AbstractDateDoubleColumnConversionRule()
          The default constructor.
 
Method Summary
 void clear()
          Clears the conversion rule's configuration.
 void clearDateColumnIndex()
          Clears the date column index.
 void clearTimeColumnIndex()
          Clears the time column index.
protected  void copyFields(AbstractDateDoubleColumnConversionRule copy)
          Copies all required fields of AbstractDateDoubleColumnConversionRule to the given instance of conversion rule.
protected  Date getDate(DataRow row)
          Retrieves the date value for a specified data row.
 int getDateColumnIndex()
           
 String getFormat()
          Retrieves the domain field format.
 int getTimeColumnIndex()
           
 boolean isComplete()
          Checks whether current conversion rule is fully configured - all necessary parameters are present and the the conversion process can be performed.
 void setDateColumnIndex(int dateColumnIndex)
           
 void setFormat(String format)
          Sets the domain field format.
 void setTimeColumnIndex(int timeColumnIndex)
           
 
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

dateColumnIndex

protected int dateColumnIndex
The index of the column holding the connection date.


timeColumnIndex

protected int timeColumnIndex
The index of the column holding the connection time.

Constructor Detail

AbstractDateDoubleColumnConversionRule

public AbstractDateDoubleColumnConversionRule()
The default constructor.

Method Detail

getDate

protected Date getDate(DataRow row)
                throws ConversionRuleException,
                       IllegalArgumentException
Retrieves the date value for a specified data row.

Parameters:
row - the data row, from which to retrieve the date
Returns:
date value
Throws:
ConversionRuleException
IllegalArgumentException

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()

copyFields

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

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

clearDateColumnIndex

public void clearDateColumnIndex()
Clears the date column index.


clearTimeColumnIndex

public void clearTimeColumnIndex()
Clears the time column index.


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()

getDateColumnIndex

public int getDateColumnIndex()

setDateColumnIndex

public void setDateColumnIndex(int dateColumnIndex)

setTimeColumnIndex

public void setTimeColumnIndex(int timeColumnIndex)

getTimeColumnIndex

public int getTimeColumnIndex()


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