Primavera Integration API 7.0

com.primavera.integration.util
Class XSDHelper

java.lang.Object
  extended by com.primavera.integration.util.XSDHelper

public final class XSDHelper
extends java.lang.Object

Helper class for converting XSD dateTime format strings to Java dates, and vice-versa.


Method Summary
static java.sql.Date getDateFromString(java.lang.String sDateTime)
          Gets a Date representation of a String that conforms to the xsd:dateTime format defined in XML Schema.
static java.lang.String getStringFromDate(java.util.Date date)
          Gets a String representation of a Date, conforming to the xsd:dateTime format defined in XML Schema.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDateFromString

public static java.sql.Date getDateFromString(java.lang.String sDateTime)
                                       throws InvalidValueException
Gets a Date representation of a String that conforms to the xsd:dateTime format defined in XML Schema.

Parameters:
sDateTime - the string to convert
Returns:
Date the date representation of the value
Throws:
InvalidValueException - if the given string was not of the proper xsd:dateTime format

getStringFromDate

public static java.lang.String getStringFromDate(java.util.Date date)
Gets a String representation of a Date, conforming to the xsd:dateTime format defined in XML Schema.

Parameters:
date - the date to convert
Returns:
String a string representation of the value

Primavera Integration API 7.0

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