All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.w3c.jpa3.DateTime Maven / Gradle / Ivy

There is a newer version: 2.18.10
Show newest version
package org.w3c.jpa3;


/**
 * DateTime
 */
public class DateTime {

    /**
     * Avoid instantiation 
     */
    protected DateTime() {
    }

    /**
     * Convert a java.util.Date to an SQL TIMESTAMP
     * 
     * @param cciDateTime the java.util.Date to be converted
     * 
     * @return a corresponding SQL TIMESTAMP
     */
    public static final java.sql.Timestamp toJDO (
        java.util.Date cciDateTime
    ){
        return cciDateTime == null ? null : new java.sql.Timestamp(cciDateTime.getTime());
    }

    /**
     * Convert an SQL TIMESTAMP to a java.util.Date
     * 
     * @param jdoDateTime the SQL TIMESTAMPjava.util.Date
     */
    public static final java.util.Date toCCI (
        java.sql.Timestamp jdoDateTime
    ){
        return jdoDateTime == null ? null : new java.util.Date(jdoDateTime.getTime());
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy