jet.utils
Class JetConverter

java.lang.Object
  extended by jet.utils.JetConverter

public class JetConverter
extends java.lang.Object

Converter

Author:
markus.meisters@web.de

Field Summary
private  JetForm form
          form to get values to convert
 
Constructor Summary
JetConverter(JetForm form)
          Creates a new instance of JetConverter
 
Method Summary
 boolean getBoolean(java.lang.String identifier)
          Method to get boolean
 char getChar(java.lang.String identifier)
          Method to get char
 char[] getChars(java.lang.String identifier)
          Method to get char
 java.util.Date getDate(java.lang.String identifier, java.lang.String simpleDateFormatPattern)
          Method to get Date
 java.util.Date getDate(java.lang.String year, java.lang.String month, java.lang.String day)
          Method to get Date
 double getDouble(java.lang.String identifier)
          Method to get double
 float getFloat(java.lang.String identifier)
          Method to get float
 int getInt(java.lang.String identifier)
          Method to get int
 long getLong(java.lang.String identifier)
          Method to get long
 java.lang.String getString(java.lang.String identifier)
          Method to get String
 java.sql.Time getTime(java.lang.String identifier)
          Method to get Time
 java.util.Date getTimestamp(java.lang.String identifier)
          Method to get Timestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

form

private JetForm form
form to get values to convert

Constructor Detail

JetConverter

public JetConverter(JetForm form)
Creates a new instance of JetConverter

Method Detail

getString

public java.lang.String getString(java.lang.String identifier)
                           throws NotFoundException
Method to get String

Parameters:
identifier - the form field id
Returns:
String the value
Throws:
NotFoundException

getChar

public char getChar(java.lang.String identifier)
             throws NotFoundException
Method to get char

Parameters:
identifier - the form field id
Returns:
char the value
Throws:
NotFoundException

getChars

public char[] getChars(java.lang.String identifier)
                throws NotFoundException
Method to get char

Parameters:
identifier - the form field id
Returns:
char[] the value
Throws:
NotFoundException

getInt

public int getInt(java.lang.String identifier)
           throws NotFoundException
Method to get int

Parameters:
identifier - the form field id
Returns:
int the value
Throws:
NotFoundException

getLong

public long getLong(java.lang.String identifier)
             throws NotFoundException
Method to get long

Parameters:
identifier - the form field id
Returns:
long the value
Throws:
NotFoundException

getDouble

public double getDouble(java.lang.String identifier)
                 throws NotFoundException
Method to get double

Parameters:
identifier - the form field id
Returns:
double the value
Throws:
NotFoundException

getFloat

public float getFloat(java.lang.String identifier)
               throws NotFoundException
Method to get float

Parameters:
identifier - the form field id
Returns:
float the value
Throws:
NotFoundException

getBoolean

public boolean getBoolean(java.lang.String identifier)
                   throws NotFoundException
Method to get boolean

Parameters:
identifier - the form field id
Returns:
boolean the value
Throws:
NotFoundException

getDate

public java.util.Date getDate(java.lang.String year,
                              java.lang.String month,
                              java.lang.String day)
                       throws NotFoundException,
                              java.text.ParseException
Method to get Date

Parameters:
year - the form field id for the year
month - the form field id for the month
day - the form field id for the day
Returns:
Date the value
Throws:
NotFoundException
java.text.ParseException

getDate

public java.util.Date getDate(java.lang.String identifier,
                              java.lang.String simpleDateFormatPattern)
                       throws NotFoundException,
                              java.text.ParseException
Method to get Date

Parameters:
identifier - the form field id
Returns:
Date the value
Throws:
NotFoundException
java.text.ParseException

getTimestamp

public java.util.Date getTimestamp(java.lang.String identifier)
                            throws NotFoundException
Method to get Timestamp

Parameters:
identifier - the form field id
Returns:
Timestamp the value
Throws:
NotFoundException

getTime

public java.sql.Time getTime(java.lang.String identifier)
                      throws NotFoundException
Method to get Time

Parameters:
identifier - the form field id
Returns:
Time the value
Throws:
NotFoundException