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

The following are Jave code examples for showing how to use getLong() 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: uavstack   File: DAOFactory.java   Source Code and License Vote up 5 votes
public Object getResult(CallableStatement cs, int columnIndex) throws SQLException {

            long l = cs.getLong(columnIndex);
            if (cs.wasNull()) {
                return null;
            }
            else {
                return new Long(l);
            }
        }
 
Example 2
Project: tangyuan2   File: LongTypeHandler.java   Source Code and License Vote up 4 votes
@Override
public Long getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
	return cs.getLong(columnIndex);
}
 
Example 3
Project: jaffa-framework   File: TypeDefs.java   Source Code and License Vote up 3 votes
/** Gets a parameter from the CallableStatement.
 * @return the parameter.
 * @param engineType The engine type as defined in init.xml
 * @param cstmt The CallableStatement.
 * @param parameterIndex The index of the parameter.
 * @throws SQLException if a database access error occurs.
 * @throws IOException if any error occurs in reading the data from the database.
 */
public Object getAppObject(CallableStatement cstmt, int parameterIndex, String engineType) throws SQLException, IOException {
    long value = cstmt.getLong(parameterIndex);
    if (cstmt.wasNull())
        return null;
    else
        return new Long(value);
}