Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle WebCenter Content Remote Intradoc Client (RIDC)
11g Release 1 (11.1)

E17274-04


oracle.stellent.ridc.model.impl
Class DataObjectEncodingUtils

java.lang.Object
  extended by oracle.stellent.ridc.model.impl.DataObjectEncodingUtils


public abstract class DataObjectEncodingUtils
extends Object

Data encoding utilities


Field Summary
static String DATE_FORMAT
           
static String DATE_STRING
           
static String ODBC_POSTFIX
           
static String ODBC_PREFIX
           

 

Constructor Summary
DataObjectEncodingUtils()
           

 

Method Summary
static void addLocaleInfo(DataBinder dataBinder)
          Add the localization information into the databinder
static Calendar decodeDate(String dateString)
          Parse the date from the encoded string.
static String encodeDate(Date date)
          Encode the date in the standard iso8601 date format
static boolean getBoolean(DataObject dataObject, String name, boolean defaultValue)
          Retrieve the result as a boolean
static Calendar getCalendar(DataObject dataObject, String name)
          Retrieve the getCalendar.
static int getInteger(DataObject dataObject, String name, int defaultValue)
          Retrieve an integer from the DataObject
static long getLong(DataObject dataObject, String name, long defaultValue)
          Retrieve an long from the DataObject
static void setBoolean(DataObject dataObject, String name, boolean value)
          Set a value as a boolean
static void setDate(DataObject dataObject, String name, Date date)
          Set a date value.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ODBC_PREFIX

public static final String ODBC_PREFIX
See Also:
Constant Field Values

ODBC_POSTFIX

public static final String ODBC_POSTFIX
See Also:
Constant Field Values

DATE_FORMAT

public static final String DATE_FORMAT
See Also:
Constant Field Values

DATE_STRING

public static final String DATE_STRING
See Also:
Constant Field Values

Constructor Detail

DataObjectEncodingUtils

public DataObjectEncodingUtils()

Method Detail

addLocaleInfo

public static void addLocaleInfo(DataBinder dataBinder)
Add the localization information into the databinder
Parameters:
dataBinder - the databinder

getBoolean

public static boolean getBoolean(DataObject dataObject,
                                 String name,
                                 boolean defaultValue)
Retrieve the result as a boolean
Parameters:
dataObject - the data object
name - the property name
defaultValue - the default value if not found
Returns:
the boolean value

setBoolean

public static void setBoolean(DataObject dataObject,
                              String name,
                              boolean value)
Set a value as a boolean
Parameters:
dataObject - the data object
name - the property name
value - the property value

getInteger

public static int getInteger(DataObject dataObject,
                             String name,
                             int defaultValue)
Retrieve an integer from the DataObject
Parameters:
dataObject - the data object
name - the property name
defaultValue - the default value if not found
Returns:
the integer value or default

getLong

public static long getLong(DataObject dataObject,
                           String name,
                           long defaultValue)
Retrieve an long from the DataObject
Parameters:
dataObject - the data object
name - the property name
defaultValue - the default value if not found
Returns:
the integer value or default

setDate

public static void setDate(DataObject dataObject,
                           String name,
                           Date date)
Set a date value.
Parameters:
dataObject - the data object
name - the property name
date - the date in GMT time

getCalendar

public static Calendar getCalendar(DataObject dataObject,
                                   String name)
Retrieve the getCalendar.
Parameters:
dataObject - the data object
name - the property name
Returns:
the date value in GMT or null if not found

encodeDate

public static String encodeDate(Date date)
Encode the date in the standard iso8601 date format
Parameters:
date - the date
Returns:
the encoded date format

decodeDate

public static Calendar decodeDate(String dateString)
                           throws ParseException
Parse the date from the encoded string. The string is assumed to be in GMT (UTC Time) unless the string specifies a timezone directly.
Parameters:
dateString - the encoded date
Returns:
the date object (in GMT time)
Throws:
ParseException

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle WebCenter Content Remote Intradoc Client (RIDC)
11g Release 1 (11.1)

E17274-04


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