Example usage for java.sql Time setTime

List of usage examples for java.sql Time setTime

Introduction

In this page you can find the example usage for java.sql Time setTime.

Prototype

public void setTime(long time) 

Source Link

Document

Sets a Time object using a milliseconds time value.

Usage

From source file:org.apache.phoenix.jdbc.PhoenixResultSet.java

@Override
public Time getTime(int columnIndex, Calendar cal) throws SQLException {
    checkCursorState();//from ww  w  .  ja  v  a  2 s .c  om
    Time value = (Time) rowProjector.getColumnProjector(columnIndex - 1).getValue(currentRow, PTime.INSTANCE,
            ptr);
    wasNull = (value == null);
    if (value == null) {
        return null;
    }
    cal.setTime(value);
    value.setTime(cal.getTimeInMillis());
    return value;
}