Java SQL Date Get getDateAsLong(ResultSet rset, Enum field)

Here you can find the source of getDateAsLong(ResultSet rset, Enum field)

Description

get Date As Long

License

Open Source License

Declaration

public static long getDateAsLong(ResultSet rset, Enum field) throws SQLException 

Method Source Code

//package com.java2s;
/**//from  w w w .  j  av a  2s. com
 Copyright (c) 2013, Amit Lieberman
All rights reserved.
    
           GNU LESSER GENERAL PUBLIC LICENSE
               Version 3, 29 June 2007
    
 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
    
    
  This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License
    
 * Created with love
 * User: shpandrak
 * Date: 10/20/12
 * Time: 10:37
 */

import java.sql.ResultSet;
import java.sql.SQLException;

public class Main {
    public static long getDateAsLong(ResultSet rset, Enum field) throws SQLException {
        return getDateAsLong(rset, field.name());
    }

    public static long getDateAsLong(ResultSet rset, String column) throws SQLException {
        return rset.getLong(column);
    }

    public static long getDateAsLong(ResultSet rset, int column) throws SQLException {
        return rset.getLong(column);
    }
}

Related

  1. getDate(Timestamp establishdate)
  2. getDate(Timestamp timestamp)
  3. getDate(Timestamp timestamp)
  4. getDate(Timestamp ts)
  5. getDateAddMonth(java.sql.Date date, int months)
  6. getDateAsLong(Timestamp date)
  7. getDateBefore(Date date, Integer before)
  8. getDateBeforTwelveMonth()
  9. getDateByNum(String dateNum)