Example usage for java.sql ResultSet getShort

List of usage examples for java.sql ResultSet getShort

Introduction

In this page you can find the example usage for java.sql ResultSet getShort.

Prototype

short getShort(String columnLabel) throws SQLException;

Source Link

Document

Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.

Usage

From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternetSybase.CFInternetSybaseISOTimezoneTable.java

protected CFInternetISOTimezoneBuff unpackISOTimezoneResultSetToBuff(ResultSet resultSet) throws SQLException {
    final String S_ProcName = "unpackISOTimezoneResultSetToBuff";
    int idxcol = 1;
    CFInternetISOTimezoneBuff buff = schema.getFactoryISOTimezone().newBuff();
    {/*www. ja va 2  s  .c o m*/
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFInternetSybaseSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFInternetSybaseSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredISOTimezoneId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredIso8601(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredTZName(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredTZHourOffset(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredTZMinOffset(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredDescription(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredVisible(("Y".equals(resultSet.getString(idxcol)) ? true : false));
    idxcol++;
    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternetSybase.CFInternetSybaseSchema.java

public static Short getNullableInt16(ResultSet reader, int colidx) {
    try {//from   www  . j ava2s. c o  m
        short val = reader.getShort(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Short(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFInternetSybaseSchema.class,
                "getNullableInt64", e);
    }
}

From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternetSybase.CFInternetSybaseServiceTable.java

protected CFInternetServiceBuff unpackServiceResultSetToBuff(ResultSet resultSet) throws SQLException {
    final String S_ProcName = "unpackServiceResultSetToBuff";
    int idxcol = 1;
    CFInternetServiceBuff buff = schema.getFactoryService().newBuff();
    {// w  w  w. ja va  2  s .com
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFInternetSybaseSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFInternetSybaseSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredClusterId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredServiceId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredHostNodeId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredServiceTypeId(resultSet.getInt(idxcol));
    idxcol++;
    buff.setRequiredHostPort(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternetSybase.CFInternetSybaseURLProtocolTable.java

protected CFInternetURLProtocolBuff unpackURLProtocolResultSetToBuff(ResultSet resultSet) throws SQLException {
    final String S_ProcName = "unpackURLProtocolResultSetToBuff";
    int idxcol = 1;
    CFInternetURLProtocolBuff buff = schema.getFactoryURLProtocol().newBuff();
    {/*from  www .j  a va 2s .c  o m*/
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFInternetSybaseSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFInternetSybaseSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredURLProtocolId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredName(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredDescription(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredIsSecure(("Y".equals(resultSet.getString(idxcol)) ? true : false));
    idxcol++;
    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecurityDb2LUW.CFSecurityDb2LUWISOCountryCurrencyTable.java

protected CFSecurityISOCountryCurrencyBuff unpackISOCountryCurrencyResultSetToBuff(ResultSet resultSet)
        throws SQLException {
    final String S_ProcName = "unpackISOCountryCurrencyResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOCountryCurrencyBuff buff = schema.getFactoryISOCountryCurrency().newBuff();
    {/*from  ww w.  j a  v  a 2s . com*/
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredISOCountryId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredISOCurrencyId(resultSet.getShort(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecurityDb2LUW.CFSecurityDb2LUWISOCountryLanguageTable.java

protected CFSecurityISOCountryLanguageBuff unpackISOCountryLanguageResultSetToBuff(ResultSet resultSet)
        throws SQLException {
    final String S_ProcName = "unpackISOCountryLanguageResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOCountryLanguageBuff buff = schema.getFactoryISOCountryLanguage().newBuff();
    {// w w  w.  j a v a  2 s . c  o  m
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredISOCountryId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredISOLanguageId(resultSet.getShort(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecurityDb2LUW.CFSecurityDb2LUWISOCountryTable.java

protected CFSecurityISOCountryBuff unpackISOCountryResultSetToBuff(ResultSet resultSet) throws SQLException {
    final String S_ProcName = "unpackISOCountryResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOCountryBuff buff = schema.getFactoryISOCountry().newBuff();
    {/*from   w ww .  jav a 2s. com*/
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredISOCode(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredName(resultSet.getString(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecurityDb2LUW.CFSecurityDb2LUWISOCurrencyTable.java

protected CFSecurityISOCurrencyBuff unpackISOCurrencyResultSetToBuff(ResultSet resultSet) throws SQLException {
    final String S_ProcName = "unpackISOCurrencyResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOCurrencyBuff buff = schema.getFactoryISOCurrency().newBuff();
    {//w  ww  .  j a  v a  2  s.  c o m
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredISOCode(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredName(resultSet.getString(idxcol));
    idxcol++;
    {
        String colVal = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setOptionalUnitSymbol(null);
        } else {
            buff.setOptionalUnitSymbol(colVal);
        }
    }
    idxcol++;
    {
        String colVal = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setOptionalFracSymbol(null);
        } else {
            buff.setOptionalFracSymbol(colVal);
        }
    }
    idxcol++;
    buff.setRequiredPrecis(resultSet.getShort(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecurityDb2LUW.CFSecurityDb2LUWISOLanguageTable.java

protected CFSecurityISOLanguageBuff unpackISOLanguageResultSetToBuff(ResultSet resultSet) throws SQLException {
    final String S_ProcName = "unpackISOLanguageResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOLanguageBuff buff = schema.getFactoryISOLanguage().newBuff();
    {/* www.  j a  v a 2 s . c  o  m*/
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredISOCode(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredBaseLanguageCode(resultSet.getString(idxcol));
    idxcol++;
    {
        short colVal = resultSet.getShort(idxcol);
        if (resultSet.wasNull()) {
            buff.setOptionalISOCountryId(null);
        } else {
            buff.setOptionalISOCountryId(colVal);
        }
    }
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecurityDb2LUW.CFSecurityDb2LUWISOTimezoneTable.java

protected CFSecurityISOTimezoneBuff unpackISOTimezoneResultSetToBuff(ResultSet resultSet) throws SQLException {
    final String S_ProcName = "unpackISOTimezoneResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOTimezoneBuff buff = schema.getFactoryISOTimezone().newBuff();
    {/*from  w w w .j  ava 2s  . c o m*/
        String colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedByUserId(null);
        } else {
            buff.setCreatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setCreatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setCreatedAt(null);
        } else {
            buff.setCreatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedByUserId(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedByUserId(null);
        } else {
            buff.setUpdatedByUserId(UUID.fromString(colString));
        }
        idxcol++;

        colString = resultSet.getString(idxcol);
        if (resultSet.wasNull()) {
            buff.setUpdatedAt(null);
        } else if ((colString == null) || (colString.length() <= 0)) {
            buff.setUpdatedAt(null);
        } else {
            buff.setUpdatedAt(CFSecurityDb2LUWSchema.convertTimestampString(colString));
        }
        idxcol++;
    }
    buff.setRequiredISOTimezoneId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredIso8601(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredTZName(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredTZHourOffset(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredTZMinOffset(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredDescription(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredVisible(("Y".equals(resultSet.getString(idxcol)) ? true : false));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
}