gr.forth.ics.rssdb.storage.util
Class DBMSValues

java.lang.Object
  |
  +--gr.forth.ics.rssdb.storage.util.DBMSValues

public class DBMSValues
extends java.lang.Object

Contains methods used for producing valid db values.

Version:
2.0 (23 July 2003)
Author:
Sofia Alexaki

Constructor Summary
DBMSValues()
           
 
Method Summary
static java.lang.String getDBDateFormat(java.lang.String value, int dt)
          Takes as input an XML date/gyearMonth/gyear value and returns the respective date database value.
static java.lang.String getDBDatetime(java.lang.String dt, DBStorage storage)
          Takes as input a XML dateTime value and returns the respective datetime database value.
static java.lang.String getDBDurationFormat(java.lang.String value)
          Takes as input an XML duration value and returns the respective datetime database value.
static java.lang.String getDBString(java.lang.String str)
          Returns a string in which characters ' and \ have been substituted with strings "''" and "\\" respectively.
static void hasValidLength(java.lang.String str, int id)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBMSValues

public DBMSValues()
Method Detail

getDBString

public static java.lang.String getDBString(java.lang.String str)
Returns a string in which characters ' and \ have been substituted with strings "''" and "\\" respectively.

hasValidLength

public static void hasValidLength(java.lang.String str,
                                  int id)

getDBDurationFormat

public static java.lang.String getDBDurationFormat(java.lang.String value)
Takes as input an XML duration value and returns the respective datetime database value.

getDBDateFormat

public static java.lang.String getDBDateFormat(java.lang.String value,
                                               int dt)
Takes as input an XML date/gyearMonth/gyear value and returns the respective date database value.
Parameters:
dt - 0 if the value is of datatype date, 1 if the value is of datatype gyearMonth, 2 if the value is of datatype gyear

getDBDatetime

public static java.lang.String getDBDatetime(java.lang.String dt,
                                             DBStorage storage)
Takes as input a XML dateTime value and returns the respective datetime database value.