Java Code Examples for java.sql.CallableStatement.getTime()

The following are Jave code examples for showing how to use getTime() of the java.sql.CallableStatement class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: tangyuan2   File: TimeOnlyTypeHandler.java   Source Code and License Vote up 5 votes
@Override
public Date getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
	java.sql.Time sqlTime = cs.getTime(columnIndex);
	if (sqlTime != null) {
		return new Date(sqlTime.getTime());
	}
	return null;
}
 
Example 2
Project: uavstack   File: DAOFactory.java   Source Code and License Vote up 5 votes
public Object getResult(CallableStatement cs, int columnIndex) throws SQLException {

            Object sqlTime = cs.getTime(columnIndex);
            if (cs.wasNull()) {
                return null;
            }
            else {
                return sqlTime;
            }
        }
 
Example 3
Project: tangyuan2   File: SqlTimeTypeHandler.java   Source Code and License Vote up 4 votes
@Override
public Time getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
	return cs.getTime(columnIndex);
}