Skip navigation links


com.fatwire.cs.core.db
Class Util

java.lang.Object
  extended by com.fatwire.cs.core.db.Util


public final class Util
extends java.lang.Object

Handy utility class for working with databases.

Since:
12-Jan-2007 9:57:05 PM

Field Summary
static boolean USEMILLISECONDS
           

 

Method Summary
static java.lang.String formatJdbcDate(java.util.Date date)
          Given a Date, return a string in the standard jdbc form: yyyy-MM-dd HH:mm:ss.SSS This method should only be used by write operations.
static java.util.Date parseJdbcDate(java.lang.String string)
          Given an input string in JDBC form, parse it and return a date object.

 

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

 

Field Detail

USEMILLISECONDS

public static final boolean USEMILLISECONDS

Method Detail

formatJdbcDate

public static java.lang.String formatJdbcDate(java.util.Date date)
Given a Date, return a string in the standard jdbc form: yyyy-MM-dd HH:mm:ss.SSS This method should only be used by write operations.
Parameters:
date - input date
Returns:
jdbc-formatted string

parseJdbcDate

public static java.util.Date parseJdbcDate(java.lang.String string)
Given an input string in JDBC form, parse it and return a date object. This method will be used for read operations
Parameters:
string - jdbc date string in the form yyyy-MM-dd HH:mm:ss
Returns:
Date
Throws:
java.lang.IllegalArgumentException - on failure

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.