uk.org.ogsadai.converters.webrowset.resultset.types
Class DateStrategy

java.lang.Object
  extended byuk.org.ogsadai.converters.webrowset.resultset.types.TypeStrategy
      extended byuk.org.ogsadai.converters.webrowset.resultset.types.DateStrategy

public class DateStrategy
extends TypeStrategy

Converts an element of column type date.

Author:
The OGSA-DAI Team.

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
 
Constructor Summary
DateStrategy()
           
 
Method Summary
 java.sql.Date getDate(java.lang.String data)
          Returns the input string as a Date object.
 java.lang.Object getObject(java.lang.String data)
          Returns the input string as an object.
 java.lang.String getString(java.lang.String data)
          Returns the input string.
 java.sql.Timestamp getTimestamp(java.lang.String data)
          Returns the input string as a Timestamp object.
 
Methods inherited from class uk.org.ogsadai.converters.webrowset.resultset.types.TypeStrategy
getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getDate, getDouble, getFloat, getInt, getLong, getRef, getShort, getTime, getTime, getTimestamp, getUnicodeStream, getURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
See Also:
Constant Field Values
Constructor Detail

DateStrategy

public DateStrategy()
Method Detail

getString

public java.lang.String getString(java.lang.String data)
                           throws java.sql.SQLException
Description copied from class: TypeStrategy
Returns the input string.

Overrides:
getString in class TypeStrategy
Parameters:
data - Input data.
Returns:
converted input.
Throws:
java.sql.SQLException - if there was a problem with the conversion.

getDate

public java.sql.Date getDate(java.lang.String data)
                      throws java.sql.SQLException
Description copied from class: TypeStrategy
Returns the input string as a Date object.

Overrides:
getDate in class TypeStrategy
Parameters:
data - Input data.
Returns:
converted input.
Throws:
java.sql.SQLException - if there was a problem with the conversion.

getTimestamp

public java.sql.Timestamp getTimestamp(java.lang.String data)
                                throws java.sql.SQLException
Description copied from class: TypeStrategy
Returns the input string as a Timestamp object.

Overrides:
getTimestamp in class TypeStrategy
Parameters:
data - Input data.
Returns:
converted input.
Throws:
java.sql.SQLException - if there was a problem with the conversion.

getObject

public java.lang.Object getObject(java.lang.String data)
                           throws java.sql.SQLException
Description copied from class: TypeStrategy
Returns the input string as an object.

Overrides:
getObject in class TypeStrategy
Parameters:
data - Input data.
Returns:
converted input.
Throws:
java.sql.SQLException - if there was a problem with the conversion.