org.apache.turbine.util.parser
Interface ValueParser

All Known Subinterfaces:
CookieParser, ParameterParser
All Known Implementing Classes:
BaseValueParser, DefaultCookieParser, DefaultParameterParser

public interface ValueParser

ValueParser is a base interface for classes that need to parse name/value Parameters, for example GET/POST data or Cookies (ParameterParser and CookieParser)

NOTE: The name= portion of a name=value pair may be converted to lowercase or uppercase when the object is initialized and when new data is added. This behaviour is determined by the url.case.folding property in TurbineResources.properties. Adding a name/value pair may overwrite existing name=value pairs if the names match:

Version:
$Id: ValueParser.java 534527 2007-05-02 16:10:59Z tv $
Author:
Ilkka Priha, Jon S. Stevens, Sean Legassick, Jason van Zyl, Henning P. Schmiedehausen, Quinton McCombs

Field Summary
static java.lang.String URL_CASE_FOLDING
          Deprecated. Use ParserUtils.URL_CASE_FOLDING_KEY
static java.lang.String URL_CASE_FOLDING_LOWER
          Deprecated. Use ParserUtils.URL_CASE_FOLDING_LOWER_VALUE
static java.lang.String URL_CASE_FOLDING_NONE
          Deprecated. Use ParserUtils.URL_CASE_FOLDING_NONE_VALUE
static java.lang.String URL_CASE_FOLDING_UPPER
          Deprecated. Use ParserUtils.URL_CASE_FOLDING_UPPER_VALUE
 
Method Summary
 void add(java.lang.String name, double value)
          Add a name/value pair into this object.
 void add(java.lang.String name, int value)
          Add a name/value pair into this object.
 void add(java.lang.String name, java.lang.Integer value)
          Add a name/value pair into this object.
 void add(java.lang.String name, long value)
          Add a name/value pair into this object.
 void add(java.lang.String name, java.lang.String value)
          Add a name/value pair into this object.
 void add(java.lang.String name, java.lang.String[] value)
          Add an array of Strings for a key.
 void append(java.lang.String name, java.lang.String value)
          Deprecated. Use add(name, value) instead.
 void clear()
          Clear all name/value pairs out of this object.
 boolean containsDateSelectorKeys(java.lang.String key)
          Check for existence of key_day, key_month and key_year parameters (as returned by DateSelector generated HTML).
 boolean containsKey(java.lang.Object key)
          Determine whether a given key has been inserted.
 java.lang.String convert(java.lang.String value)
          Trims the string data and applies the conversion specified in the property given by URL_CASE_FOLDING.
 java.lang.String get(java.lang.String name)
          Return a String for the given name.
 java.math.BigDecimal getBigDecimal(java.lang.String name)
          Return a BigDecimal for the given name.
 java.math.BigDecimal getBigDecimal(java.lang.String name, java.math.BigDecimal defaultValue)
          Return a BigDecimal for the given name.
 java.math.BigDecimal[] getBigDecimals(java.lang.String name)
          Return an array of BigDecimals for the given name.
 java.lang.Boolean getBool(java.lang.String name)
          Deprecated. use getBooleanObject(java.lang.String) instead
 java.lang.Boolean getBool(java.lang.String name, boolean defaultValue)
          Deprecated. use getBooleanObject(java.lang.String) instead
 boolean getBoolean(java.lang.String name)
          Return a boolean for the given name.
 boolean getBoolean(java.lang.String name, boolean defaultValue)
          Return a boolean for the given name.
 java.lang.Boolean getBooleanObject(java.lang.String name)
          Returns a Boolean object for the given name.
 java.lang.Boolean getBooleanObject(java.lang.String name, java.lang.Boolean defaultValue)
          Returns a Boolean object for the given name.
 byte getByte(java.lang.String name)
          Return a byte for the given name.
 byte getByte(java.lang.String name, byte defaultValue)
          Return a byte for the given name.
 java.lang.Byte getByteObject(java.lang.String name)
          Return a byte for the given name.
 java.lang.Byte getByteObject(java.lang.String name, java.lang.Byte defaultValue)
          Return a byte for the given name.
 byte[] getBytes(java.lang.String name)
          Return an array of bytes for the given name.
 java.lang.String getCharacterEncoding()
          Get the character encoding that will be used by this ValueParser.
 java.util.Date getDate(java.lang.String name)
          Returns a java.util.Date object.
 java.util.Date getDate(java.lang.String name, java.text.DateFormat df)
          Returns a java.util.Date object.
 java.util.Date getDate(java.lang.String name, java.text.DateFormat df, java.util.Date defaultValue)
          Returns a java.util.Date object.
 double getDouble(java.lang.String name)
          Return a double for the given name.
 double getDouble(java.lang.String name, double defaultValue)
          Return a double for the given name.
 java.lang.Double getDoubleObject(java.lang.String name)
          Return a Double for the given name.
 java.lang.Double getDoubleObject(java.lang.String name, java.lang.Double defaultValue)
          Return a Double for the given name.
 java.lang.Double[] getDoubleObjects(java.lang.String name)
          Return an array of doubles for the given name.
 double[] getDoubles(java.lang.String name)
          Return an array of doubles for the given name.
 float getFloat(java.lang.String name)
          Return a float for the given name.
 float getFloat(java.lang.String name, float defaultValue)
          Return a float for the given name.
 java.lang.Float getFloatObject(java.lang.String name)
          Return a float for the given name.
 java.lang.Float getFloatObject(java.lang.String name, java.lang.Float defaultValue)
          Return a Float for the given name.
 java.lang.Float[] getFloatObjects(java.lang.String name)
          Return an array of floats for the given name.
 float[] getFloats(java.lang.String name)
          Return an array of floats for the given name.
 int getInt(java.lang.String name)
          Return an int for the given name.
 int getInt(java.lang.String name, int defaultValue)
          Return an int for the given name.
 java.lang.Integer getInteger(java.lang.String name)
          Deprecated. use getIntObject(java.lang.String, java.lang.Integer) instead
 java.lang.Integer getInteger(java.lang.String name, int defaultValue)
          Deprecated. use getIntObject(java.lang.String, java.lang.Integer) instead
 java.lang.Integer getInteger(java.lang.String name, java.lang.Integer defaultValue)
          Deprecated. use getIntObject(java.lang.String, java.lang.Integer) instead
 java.lang.Integer[] getIntegers(java.lang.String name)
          Deprecated. use getIntObjects(java.lang.String) instead
 java.lang.Integer getIntObject(java.lang.String name)
          Return an Integer for the given name.
 java.lang.Integer getIntObject(java.lang.String name, java.lang.Integer defaultValue)
          Return an Integer for the given name.
 java.lang.Integer[] getIntObjects(java.lang.String name)
          Return an array of Integers for the given name.
 int[] getInts(java.lang.String name)
          Return an array of ints for the given name.
 java.lang.Object[] getKeys()
          Returns all the available parameter names.
 long getLong(java.lang.String name)
          Return a long for the given name.
 long getLong(java.lang.String name, long defaultValue)
          Return a long for the given name.
 java.lang.Long getLongObject(java.lang.String name)
          Return a Long for the given name.
 java.lang.Long getLongObject(java.lang.String name, java.lang.Long defaultValue)
          Return a Long for the given name.
 java.lang.Long[] getLongObjects(java.lang.String name)
          Return an array of Longs for the given name.
 long[] getLongs(java.lang.String name)
          Return an array of longs for the given name.
 org.apache.torque.om.NumberKey getNumberKey(java.lang.String name)
          Deprecated. no replacement
 java.lang.Object getObject(java.lang.String name)
          Return an Object for the given name.
 java.lang.Object[] getObjects(java.lang.String name)
          Return an array of Objects for the given name.
 java.lang.String getString(java.lang.String name)
          Return a String for the given name.
 java.lang.String getString(java.lang.String name, java.lang.String defaultValue)
          Return a String for the given name.
 org.apache.torque.om.StringKey getStringKey(java.lang.String name)
          Deprecated. no replacement
 java.lang.String[] getStrings(java.lang.String name)
          Return an array of Strings for the given name.
 java.lang.String[] getStrings(java.lang.String name, java.lang.String[] defaultValue)
          Return an array of Strings for the given name.
 java.util.Enumeration keys()
          Deprecated. use keySet() instead.
 java.util.Set keySet()
          Gets the keys.
 java.lang.Object remove(java.lang.String name)
          Removes the named parameter from the contained hashtable.
 void setCharacterEncoding(java.lang.String s)
          Set the character encoding that will be used by this ValueParser.
 void setProperties(java.lang.Object bean)
          Uses bean introspection to set writable properties of bean from the parameters, where a (case-insensitive) name match between the bean property and the parameter is looked for.
 void setString(java.lang.String name, java.lang.String value)
          Set a parameter to a specific value.
 void setStrings(java.lang.String name, java.lang.String[] values)
          Set a parameter to a specific value.
 java.lang.String toString()
          Simple method that attempts to get a toString() representation of this object.
 

Field Detail

URL_CASE_FOLDING

static final java.lang.String URL_CASE_FOLDING
Deprecated. Use ParserUtils.URL_CASE_FOLDING_KEY
The Key for the Case folding.

See Also:
Constant Field Values

URL_CASE_FOLDING_NONE

static final java.lang.String URL_CASE_FOLDING_NONE
Deprecated. Use ParserUtils.URL_CASE_FOLDING_NONE_VALUE
No Case folding.

See Also:
Constant Field Values

URL_CASE_FOLDING_LOWER

static final java.lang.String URL_CASE_FOLDING_LOWER
Deprecated. Use ParserUtils.URL_CASE_FOLDING_LOWER_VALUE
Fold Keys to lower case.

See Also:
Constant Field Values

URL_CASE_FOLDING_UPPER

static final java.lang.String URL_CASE_FOLDING_UPPER
Deprecated. Use ParserUtils.URL_CASE_FOLDING_UPPER_VALUE
Fold Keys to upper case.

See Also:
Constant Field Values
Method Detail

clear

void clear()
Clear all name/value pairs out of this object.


setCharacterEncoding

void setCharacterEncoding(java.lang.String s)
Set the character encoding that will be used by this ValueParser.


getCharacterEncoding

java.lang.String getCharacterEncoding()
Get the character encoding that will be used by this ValueParser.


convert

java.lang.String convert(java.lang.String value)
Trims the string data and applies the conversion specified in the property given by URL_CASE_FOLDING. It returns a new string so that it does not destroy the value data.

Parameters:
value - A String to be processed.
Returns:
A new String converted to lowercase and trimmed.

add

void add(java.lang.String name,
         double value)
Add a name/value pair into this object.

Parameters:
name - A String with the name.
value - A double with the value.

add

void add(java.lang.String name,
         int value)
Add a name/value pair into this object.

Parameters:
name - A String with the name.
value - An int with the value.

add

void add(java.lang.String name,
         java.lang.Integer value)
Add a name/value pair into this object.

Parameters:
name - A String with the name.
value - An Integer with the value.

add

void add(java.lang.String name,
         long value)
Add a name/value pair into this object.

Parameters:
name - A String with the name.
value - A long with the value.

add

void add(java.lang.String name,
         java.lang.String value)
Add a name/value pair into this object.

Parameters:
name - A String with the name.
value - A long with the value.

append

void append(java.lang.String name,
            java.lang.String value)
Deprecated. Use add(name, value) instead.

Add a String parameter. If there are any Strings already associated with the name, append to the array. This is used for handling parameters from mulitipart POST requests.

Parameters:
name - A String with the name.
value - A String with the value.

add

void add(java.lang.String name,
         java.lang.String[] value)
Add an array of Strings for a key. This is simply adding all the elements in the array one by one.

Parameters:
name - A String with the name.
value - A String Array.

remove

java.lang.Object remove(java.lang.String name)
Removes the named parameter from the contained hashtable. Wraps to the contained Hashtable.remove().

Returns:
The value that was mapped to the key (a String[]) or null if the key was not mapped.

containsKey

boolean containsKey(java.lang.Object key)
Determine whether a given key has been inserted. All keys are stored in lowercase strings, so override method to account for this.

Parameters:
key - An Object with the key to search for.
Returns:
True if the object is found.

containsDateSelectorKeys

boolean containsDateSelectorKeys(java.lang.String key)
Check for existence of key_day, key_month and key_year parameters (as returned by DateSelector generated HTML).

Parameters:
key - A String with the selector name.
Returns:
True if keys are found.

keys

java.util.Enumeration keys()
Deprecated. use keySet() instead.

Get an enumerator for the parameter keys.

Returns:
An enumerator of the keys.

keySet

java.util.Set keySet()
Gets the keys.

Returns:
A Set of the keys.

getKeys

java.lang.Object[] getKeys()
Returns all the available parameter names.

Returns:
A object array with the keys.

getBoolean

boolean getBoolean(java.lang.String name,
                   boolean defaultValue)
Return a boolean for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A boolean.

getBoolean

boolean getBoolean(java.lang.String name)
Return a boolean for the given name. If the name does not exist, return false.

Parameters:
name - A String with the name.
Returns:
A boolean.

getBool

java.lang.Boolean getBool(java.lang.String name,
                          boolean defaultValue)
Deprecated. use getBooleanObject(java.lang.String) instead

Return a Boolean for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A Boolean.

getBool

java.lang.Boolean getBool(java.lang.String name)
Deprecated. use getBooleanObject(java.lang.String) instead

Return a Boolean for the given name. If the name does not exist, return false.

Parameters:
name - A String with the name.
Returns:
A Boolean.

getBooleanObject

java.lang.Boolean getBooleanObject(java.lang.String name)
Returns a Boolean object for the given name. If the parameter does not exist or can not be parsed as a boolean, null is returned.

Valid values for true: true, on, 1, yes
Valid values for false: false, off, 0, no

The string is compared without reguard to case.

Parameters:
name - A String with the name.
Returns:
A Boolean.

getBooleanObject

java.lang.Boolean getBooleanObject(java.lang.String name,
                                   java.lang.Boolean defaultValue)
Returns a Boolean object for the given name. If the parameter does not exist or can not be parsed as a boolean, the defaultValue is returned.

Valid values for true: true, on, 1, yes
Valid values for false: false, off, 0, no

The string is compared without reguard to case.

Parameters:
name - A String with the name.
Returns:
A Boolean.

getDouble

double getDouble(java.lang.String name,
                 double defaultValue)
Return a double for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A double.

getDouble

double getDouble(java.lang.String name)
Return a double for the given name. If the name does not exist, return 0.0.

Parameters:
name - A String with the name.
Returns:
A double.

getDoubles

double[] getDoubles(java.lang.String name)
Return an array of doubles for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A double[].

getDoubleObject

java.lang.Double getDoubleObject(java.lang.String name,
                                 java.lang.Double defaultValue)
Return a Double for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A double.

getDoubleObject

java.lang.Double getDoubleObject(java.lang.String name)
Return a Double for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A double.

getDoubleObjects

java.lang.Double[] getDoubleObjects(java.lang.String name)
Return an array of doubles for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A double[].

getFloat

float getFloat(java.lang.String name,
               float defaultValue)
Return a float for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A float.

getFloat

float getFloat(java.lang.String name)
Return a float for the given name. If the name does not exist, return 0.0.

Parameters:
name - A String with the name.
Returns:
A float.

getFloats

float[] getFloats(java.lang.String name)
Return an array of floats for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A float[].

getFloatObject

java.lang.Float getFloatObject(java.lang.String name,
                               java.lang.Float defaultValue)
Return a Float for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A Float.

getFloatObject

java.lang.Float getFloatObject(java.lang.String name)
Return a float for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A Float.

getFloatObjects

java.lang.Float[] getFloatObjects(java.lang.String name)
Return an array of floats for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A float[].

getBigDecimal

java.math.BigDecimal getBigDecimal(java.lang.String name,
                                   java.math.BigDecimal defaultValue)
Return a BigDecimal for the given name. If the name does not exist, return 0.0.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A BigDecimal.

getBigDecimal

java.math.BigDecimal getBigDecimal(java.lang.String name)
Return a BigDecimal for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A BigDecimal.

getBigDecimals

java.math.BigDecimal[] getBigDecimals(java.lang.String name)
Return an array of BigDecimals for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A BigDecimal[].

getInt

int getInt(java.lang.String name,
           int defaultValue)
Return an int for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
An int.

getInt

int getInt(java.lang.String name)
Return an int for the given name. If the name does not exist, return 0.

Parameters:
name - A String with the name.
Returns:
An int.

getIntObject

java.lang.Integer getIntObject(java.lang.String name,
                               java.lang.Integer defaultValue)
Return an Integer for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
An Integer.

getIntObject

java.lang.Integer getIntObject(java.lang.String name)
Return an Integer for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An Integer.

getInteger

java.lang.Integer getInteger(java.lang.String name,
                             int defaultValue)
Deprecated. use getIntObject(java.lang.String, java.lang.Integer) instead

Return an Integer for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
An Integer.

getInteger

java.lang.Integer getInteger(java.lang.String name,
                             java.lang.Integer defaultValue)
Deprecated. use getIntObject(java.lang.String, java.lang.Integer) instead

Return an Integer for the given name. If the name does not exist, return defaultValue. You cannot pass in a null here for the default value.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
An Integer.

getInteger

java.lang.Integer getInteger(java.lang.String name)
Deprecated. use getIntObject(java.lang.String, java.lang.Integer) instead

Return an Integer for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An Integer.

getInts

int[] getInts(java.lang.String name)
Return an array of ints for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An int[].

getIntegers

java.lang.Integer[] getIntegers(java.lang.String name)
Deprecated. use getIntObjects(java.lang.String) instead

Return an array of Integers for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An Integer[].

getIntObjects

java.lang.Integer[] getIntObjects(java.lang.String name)
Return an array of Integers for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An Integer[].

getLong

long getLong(java.lang.String name,
             long defaultValue)
Return a long for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A long.

getLong

long getLong(java.lang.String name)
Return a long for the given name. If the name does not exist, return 0.

Parameters:
name - A String with the name.
Returns:
A long.

getLongObject

java.lang.Long getLongObject(java.lang.String name,
                             java.lang.Long defaultValue)
Return a Long for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A Long.

getLongObject

java.lang.Long getLongObject(java.lang.String name)
Return a Long for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A Long.

getLongs

long[] getLongs(java.lang.String name)
Return an array of longs for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A long[].

getLongObjects

java.lang.Long[] getLongObjects(java.lang.String name)
Return an array of Longs for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A Long[].

getByte

byte getByte(java.lang.String name,
             byte defaultValue)
Return a byte for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A byte.

getByte

byte getByte(java.lang.String name)
Return a byte for the given name. If the name does not exist, return 0.

Parameters:
name - A String with the name.
Returns:
A byte.

getBytes

byte[] getBytes(java.lang.String name)
                throws java.io.UnsupportedEncodingException
Return an array of bytes for the given name. If the name does not exist, return null. The array is returned according to the HttpRequest's character encoding.

Parameters:
name - A String with the name.
Returns:
A byte[].
Throws:
java.io.UnsupportedEncodingException

getByteObject

java.lang.Byte getByteObject(java.lang.String name,
                             java.lang.Byte defaultValue)
Return a byte for the given name. If the name does not exist, return defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A byte.

getByteObject

java.lang.Byte getByteObject(java.lang.String name)
Return a byte for the given name. If the name does not exist, return 0.

Parameters:
name - A String with the name.
Returns:
A byte.

getString

java.lang.String getString(java.lang.String name)
Return a String for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A String.

get

java.lang.String get(java.lang.String name)
Return a String for the given name. If the name does not exist, return null. It is the same as the getString() method however has been added for simplicity when working with template tools such as Velocity which allow you to do something like this: $data.Parameters.form_variable_name

Parameters:
name - A String with the name.
Returns:
A String.

getString

java.lang.String getString(java.lang.String name,
                           java.lang.String defaultValue)
Return a String for the given name. If the name does not exist, return the defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A String.

setString

void setString(java.lang.String name,
               java.lang.String value)
Set a parameter to a specific value. This is useful if you want your action to override the values of the parameters for the screen to use.

Parameters:
name - The name of the parameter.
value - The value to set.

getStrings

java.lang.String[] getStrings(java.lang.String name)
Return an array of Strings for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A String[].

getStrings

java.lang.String[] getStrings(java.lang.String name,
                              java.lang.String[] defaultValue)
Return an array of Strings for the given name. If the name does not exist, return the defaultValue.

Parameters:
name - A String with the name.
defaultValue - The default value.
Returns:
A String[].

setStrings

void setStrings(java.lang.String name,
                java.lang.String[] values)
Set a parameter to a specific value. This is useful if you want your action to override the values of the parameters for the screen to use.

Parameters:
name - The name of the parameter.
values - The value to set.

getObject

java.lang.Object getObject(java.lang.String name)
Return an Object for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An Object.

getObjects

java.lang.Object[] getObjects(java.lang.String name)
Return an array of Objects for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An Object[].

getDate

java.util.Date getDate(java.lang.String name,
                       java.text.DateFormat df,
                       java.util.Date defaultValue)
Returns a java.util.Date object. String is parsed by supplied DateFormat. If the name does not exist, return the defaultValue.

Parameters:
name - A String with the name.
df - A DateFormat.
defaultValue - The default value.
Returns:
A Date.

getDate

java.util.Date getDate(java.lang.String name)
Returns a java.util.Date object. If there are DateSelector style parameters then these are used. If not and there is a parameter 'name' then this is parsed by DateFormat. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
A Date.

getDate

java.util.Date getDate(java.lang.String name,
                       java.text.DateFormat df)
Returns a java.util.Date object. String is parsed by supplied DateFormat. If the name does not exist, return null.

Parameters:
name - A String with the name.
df - A DateFormat.
Returns:
A Date.

getNumberKey

org.apache.torque.om.NumberKey getNumberKey(java.lang.String name)
Deprecated. no replacement

Return an NumberKey for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An NumberKey.

getStringKey

org.apache.torque.om.StringKey getStringKey(java.lang.String name)
Deprecated. no replacement

Return an NumberKey for the given name. If the name does not exist, return null.

Parameters:
name - A String with the name.
Returns:
An StringKey.

setProperties

void setProperties(java.lang.Object bean)
                   throws java.lang.Exception
Uses bean introspection to set writable properties of bean from the parameters, where a (case-insensitive) name match between the bean property and the parameter is looked for.

Parameters:
bean - An Object.
Throws:
java.lang.Exception - a generic exception.

toString

java.lang.String toString()
Simple method that attempts to get a toString() representation of this object. It doesn't do well with String[]'s though.

Overrides:
toString in class java.lang.Object
Returns:
A String.


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.