Arch4J 1.1

org.arch4j.persistence.domainmapper
Class ValueHelper

java.lang.Object
  |
  +--org.arch4j.persistence.domainmapper.ValueHelper

public class ValueHelper
extends Object

Defines constants of default values

Author:
dcolwell

Field Summary
static double DEFAULT_DOUBLE
          Define a default value to initialize and check if an int has been set.
static float DEFAULT_FLOAT
          Define a default value to initialize and check if an int has been set.
static int DEFAULT_INT
          Define a default value to initialize and check if an int has been set.
static Integer DEFAULT_INTEGER
          Define a default value to initialize and check if an Integer has been set.
static String DEFAULT_STRING
          Define a default value to initialize and check if a String has been set.
static String FALSE_YES_NO_STRING
          Define a constant value for representing false as a String.
static String TRUE_YES_NO_STRING
          Define a constant value for representing true as a String.
 
Constructor Summary
ValueHelper()
           
 
Method Summary
 String convertBooleanToYesNo(boolean value)
           
 Date convertTimestampToDate(Timestamp aTimestamp)
           
 boolean convertYesNoToBoolean(String value)
           
 SimpleDateFormat getDateFormat()
          Date formatter specific to the expected DB/2 timestamp format
static ValueHelper getHelper()
          Retrieve a value helper
 SimpleDateFormat getTimestampFormat()
          Date formatter specific to the expected DB/2 timestamp format
 String getUID()
          Provide the caller with unique ID values.
 String massage(String value)
          Massage the String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INT

public static final int DEFAULT_INT
Define a default value to initialize and check if an int has been set.

See Also:
Constant Field Values

DEFAULT_INTEGER

public static final Integer DEFAULT_INTEGER
Define a default value to initialize and check if an Integer has been set.


DEFAULT_FLOAT

public static final float DEFAULT_FLOAT
Define a default value to initialize and check if an int has been set.

See Also:
Constant Field Values

DEFAULT_DOUBLE

public static final double DEFAULT_DOUBLE
Define a default value to initialize and check if an int has been set.

See Also:
Constant Field Values

DEFAULT_STRING

public static final String DEFAULT_STRING
Define a default value to initialize and check if a String has been set.


TRUE_YES_NO_STRING

public static final String TRUE_YES_NO_STRING
Define a constant value for representing true as a String.

See Also:
Constant Field Values

FALSE_YES_NO_STRING

public static final String FALSE_YES_NO_STRING
Define a constant value for representing false as a String.

See Also:
Constant Field Values
Constructor Detail

ValueHelper

public ValueHelper()
Method Detail

getHelper

public static ValueHelper getHelper()
Retrieve a value helper


massage

public String massage(String value)
Massage the String

Returns:
the DEFAULT_STRING if null or zero-length after trimming, otherwise return the trimmed String

getDateFormat

public SimpleDateFormat getDateFormat()
Date formatter specific to the expected DB/2 timestamp format


getTimestampFormat

public SimpleDateFormat getTimestampFormat()
Date formatter specific to the expected DB/2 timestamp format


getUID

public String getUID()
Provide the caller with unique ID values.


convertTimestampToDate

public Date convertTimestampToDate(Timestamp aTimestamp)

convertBooleanToYesNo

public String convertBooleanToYesNo(boolean value)

convertYesNoToBoolean

public boolean convertYesNoToBoolean(String value)

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.