Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo.format
Class DefaultDateFormatter

java.lang.Object
  extended by oracle.adfnmc.util.Formatter
      extended by oracle.jbo.format.Formatter
          extended by oracle.jbo.format.DefaultDateFormatter

public class DefaultDateFormatter
extends Formatter

Formatter class used to format date values.

Version:
SDK

Field Summary
static java.lang.Class CLASS_INSTANCE
           
 
Fields inherited from class oracle.adfnmc.util.Formatter
INVALID_NUMBER
 
Constructor Summary
DefaultDateFormatter()
          Constructor
 
Method Summary
 java.lang.String format(java.lang.String formatString, java.lang.Object rawData)
          format raw data according to the format specified.
 java.lang.String getDefaultFormatString()
          *
 LocaleContext getLocale()
           
 java.lang.Object parse(java.lang.String formatString, java.lang.String parseThisString)
          parse this string according to the format specified and return an object
 void setLocale(LocaleContext thisLocale)
          define locale to be used.
 
Methods inherited from class oracle.adfnmc.util.Formatter
formatCurrency, formatCurrency, formatCurrency, formatCurrency, formatCurrency, formatCurrency, formatDate, formatDate, formatDate, formatDate, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatNumber, formatPercent, formatPercent, formatPercent, formatPercent, formatPercent, formatPercent, formatTime, formatTime, getDateFormat, getDateFormat, getDateTimeFormat, getTimeFormat, isPercent, makeNumChars, removeCurrencySymbols, removeDecimalSymbol, removeNumberSymbols, removePatternSymbols, removePercentSymbols
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE
Constructor Detail

DefaultDateFormatter

public DefaultDateFormatter()
Constructor

Method Detail

format

public java.lang.String format(java.lang.String formatString,
                               java.lang.Object rawData)
format raw data according to the format specified.

Data is formatted per the 'format string' passed as an argument to this function.

Specified by:
format in class Formatter
Parameters:
formatString - code to define how the raw data should be formatted.
rawData - data which needs to be formatted.
Returns:
formatted string
Throws:
FormatErrorException - if unable to format the data according to the format specified.

parse

public java.lang.Object parse(java.lang.String formatString,
                              java.lang.String parseThisString)
parse this string according to the format specified and return an object

Specified by:
parse in class Formatter
Parameters:
formatString - code to define how the raw data should be parsed.
parseThisString - data which needs to be parsed.
Returns:
object which represents the string parsed.
Throws:
java.text.ParseException - when unable to parse data according to the format specified.

setLocale

public void setLocale(LocaleContext thisLocale)
define locale to be used. Formatter will need to make locale specific formatting if applicable

Specified by:
setLocale in class Formatter
Parameters:
thisLocale - locale to be used
Throws:
UnknownLocaleException - if the formatter does'nt support the specified Locale.

getLocale

public LocaleContext getLocale()
Returns:
Locale currently in use

getDefaultFormatString

public java.lang.String getDefaultFormatString()
Description copied from class: Formatter
*

Overrides:
getDefaultFormatString in class Formatter
Returns:
the default format string to use for format/parse requests * processed by this formatter type.

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.