com.bm.testsuite.dataloader
Enum DateFormats

java.lang.Object
  extended by java.lang.Enum<DateFormats>
      extended by com.bm.testsuite.dataloader.DateFormats
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DateFormats>

public enum DateFormats
extends java.lang.Enum<DateFormats>

Represents date formats for CVS initial data set.

Author:
Daniel Wiese, Peter Doornbosch

Enum Constant Summary
DEFAULT_DATE
           
DEFAULT_DATE_TIME
           
DEFAULT_TIME
           
USER_DATE
           
USER_DATE_TIME
           
USER_TIME
           
 
Method Summary
 java.util.Date parse(java.lang.String toParse)
          Parse the specified instance
 void parseToPreparedStatemnt(java.lang.String toParse, java.sql.PreparedStatement ps, int pos)
           
 DateFormats setUserDefinedFomatter(java.lang.String pattern)
          Allows to set a user defined formatter.
static DateFormats[] systemValues()
           
 java.lang.String toPattern()
          Returns the pattern for formatting.
static DateFormats valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DateFormats[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEFAULT_DATE_TIME

public static final DateFormats DEFAULT_DATE_TIME

DEFAULT_DATE

public static final DateFormats DEFAULT_DATE

DEFAULT_TIME

public static final DateFormats DEFAULT_TIME

USER_DATE_TIME

public static final DateFormats USER_DATE_TIME

USER_DATE

public static final DateFormats USER_DATE

USER_TIME

public static final DateFormats USER_TIME
Method Detail

values

public static final DateFormats[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DateFormats c : DateFormats.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DateFormats valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

setUserDefinedFomatter

public DateFormats setUserDefinedFomatter(java.lang.String pattern)
Allows to set a user defined formatter.

Parameters:
dateFormatter - - the date formatter
Returns:
this intance for inlining

parse

public java.util.Date parse(java.lang.String toParse)
                     throws java.text.ParseException
Parse the specified instance

Parameters:
toParse -
Returns:
Throws:
java.text.ParseException

parseToPreparedStatemnt

public void parseToPreparedStatemnt(java.lang.String toParse,
                                    java.sql.PreparedStatement ps,
                                    int pos)
                             throws java.text.ParseException,
                                    java.sql.SQLException
Throws:
java.text.ParseException
java.sql.SQLException

toPattern

public java.lang.String toPattern()
Returns the pattern for formatting.

Returns:
th epattern

systemValues

public static DateFormats[] systemValues()


Copyright © 2008. All Rights Reserved.