Java Timestamp Create getTimestampOrNull(Object dbResult)

Here you can find the source of getTimestampOrNull(Object dbResult)

Description

Convenience method to format dbResult

License

Apache License

Parameter

Parameter Description
dbResult a parameter

Declaration

public static Timestamp getTimestampOrNull(Object dbResult) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.sql.Timestamp;

public class Main {
    /**// ww w. j  a v a 2s. co  m
    * Convenience method to format dbResult
    * @param dbResult
    * @return 
    */
    public static Timestamp getTimestampOrNull(Object dbResult) {

        if (dbResult == null) {
            return null;
        }
        return (Timestamp) dbResult;
    }
}

Related

  1. getTimeStampFromString(String timeStamp)
  2. getTimestampInEnglish(java.sql.Timestamp t)
  3. getTimestampLexical(boolean showSeconds, Locale locale)
  4. getTimestampMinusDays(Integer days)
  5. getTimestampNullSafe(final Date ts)
  6. getTimeStampString()
  7. getTimestampString(long timeInMillis)
  8. getTimeStampStringFormat(Timestamp ts, String fmt)
  9. getTimestampToOracle()