<p>Get column with Integer val.</p>
@param pNm column name
@return Integer column val
@throws ExceptionWithCode if field not found
3455
public final Integer getInt(final String pNm) throws ExceptionWithCode {
    if (this.ints != null && this.ints.keySet().contains(pNm)) {
      return this.ints.get(pNm);
    }
    if (this.idInts != null && this.idInts.keySet().contains(pNm)) {
      return this.idInts.get(pNm);
    }
    throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
      "There is no field - " + pNm);
  }
955887
@Override
	public int getInt(String fldName) throws RemoteException {
		try {
			fldName = fldName.toLowerCase(); // to ensure case-insensitivity
			return (Integer) s.getVal(fldName).castTo(INTEGER).asJavaVal();
		} catch (RuntimeException e) {
			rconn.rollback();
			throw e;
		}
	}
1048216
public byte[] getBytes(int columnIndex) {
		Object fieldValue = data[columnIndex];
		if (fieldValue == null) {
			return null;
		}
		if (fieldValue instanceof byte[]) {
			return (byte[]) fieldValue;
		}
		throw new DBFException("Unsupported type for byte[] at column:" + columnIndex + " "
				+ fieldValue.getClass().getCanonicalName());
	}
790007
@Override
	public String getColumnName(int column) {
		try {
			return metadata.getColumnLabel(column + 1);
		} catch (SQLException e) {
			e.printStackTrace(System.err);
			return e.toString();
		}
	}
1316104
public int getInt(int columnIndex) {
		Object fieldValue = data[columnIndex];
		if (fieldValue == null) {
			return 0;
		}
		if (fieldValue instanceof Number) {
			return ((Number) fieldValue).intValue();
		}
		throw new DBFException("Unsupported type for Number at column:" + columnIndex + " "
				+ fieldValue.getClass().getCanonicalName());
	}
415325
ByteBuffer getBytesValue(String jpaFieldName, EntityMetadata m, Object value) {
        Attribute idCol = m.getIdAttribute();
        MetamodelImpl metaModel =
            (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(m.getPersistenceUnit());

        EntityType entity = metaModel.entity(m.getEntityClazz());
        Field f = null;
        boolean isId = false;
        if (((AbstractAttribute) idCol).getJPAColumnName().equals(jpaFieldName)) {
            f = (Field) idCol.getJavaMember();
            isId = true;
        } else {
            if (jpaFieldName != null && jpaFieldName.indexOf(Constants.INDEX_TABLE_ROW_KEY_DELIMITER) > 0) {
                String embeddedFieldName =
                    jpaFieldName.substring(0, jpaFieldName.indexOf(Constants.INDEX_TABLE_ROW_KEY_DELIMITER));
                String columnFieldName = jpaFieldName.substring(
                    jpaFieldName.indexOf(Constants.INDEX_TABLE_ROW_KEY_DELIMITER) + 1, jpaFieldName.length());

                Attribute embeddedAttr = entity.getAttribute(embeddedFieldName);
                try {
                    Class<?> embeddedClass = embeddedAttr.getJavaType();
                    if (Collection.class.isAssignableFrom(embeddedClass)) {
                        Class<?> genericClass =
                            PropertyAccessorHelper.getGenericClass((Field) embeddedAttr.getJavaMember());
                        f = genericClass.getDeclaredField(columnFieldName);
                    } else {
                        f = embeddedClass.getDeclaredField(columnFieldName);
                    }

                } catch (SecurityException e) {
                    log.error("Error while extrating " + jpaFieldName + ", Caused by: ", e);
                    throw new QueryHandlerException("Error while extrating " + jpaFieldName + ".");
                } catch (NoSuchFieldException e) {
                    log.error("Error while extrating " + jpaFieldName + ", Caused by: ", e);
                    throw new QueryHandlerException("Error while extrating " + jpaFieldName + ".");
                }
            } else {
                String discriminatorColumn = ((AbstractManagedType) entity).getDiscriminatorColumn();

                if (!jpaFieldName.equals(discriminatorColumn)) {
                    String fieldName = m.getFieldName(jpaFieldName);

                    Attribute col = entity.getAttribute(fieldName);
                    if (col == null) {
                        throw new QueryHandlerException("column type is null for: " + jpaFieldName);
                    }
                    f = (Field) col.getJavaMember();
                }
            }
        }

        // need to do integer.parseInt..as value will be string in case of
        // create query.
        if (f != null && f.getType() != null) {
            return CassandraUtilities.toBytes(value, f);
        } else {
            // default is String type
            return CassandraUtilities.toBytes(value, String.class);
        }
    }
485143
public BigDecimal getInternalBigDecimal(ColumnInformation columnInfo) throws SQLException {
    if (lastValueWasNull()) {
      return null;
    }

    switch (columnInfo.getColumnType()) {
      case BIT:
        return BigDecimal.valueOf(parseBit());
      case TINYINT:
        return BigDecimal.valueOf((long) getInternalTinyInt(columnInfo));
      case SMALLINT:
      case YEAR:
        return BigDecimal.valueOf((long) getInternalSmallInt(columnInfo));
      case INTEGER:
      case MEDIUMINT:
        return BigDecimal.valueOf(getInternalMediumInt(columnInfo));
      case BIGINT:
        long value = ((buf[pos] & 0xff)
            + ((long) (buf[pos + 1] & 0xff) << 8)
            + ((long) (buf[pos + 2] & 0xff) << 16)
            + ((long) (buf[pos + 3] & 0xff) << 24)
            + ((long) (buf[pos + 4] & 0xff) << 32)
            + ((long) (buf[pos + 5] & 0xff) << 40)
            + ((long) (buf[pos + 6] & 0xff) << 48)
            + ((long) (buf[pos + 7] & 0xff) << 56)
        );
        if (columnInfo.isSigned()) {
          return new BigDecimal(String.valueOf(BigInteger.valueOf(value)))
              .setScale(columnInfo.getDecimals());
        } else {
          return new BigDecimal(String.valueOf(new BigInteger(1, new byte[]{(byte) (value >> 56),
              (byte) (value >> 48), (byte) (value >> 40), (byte) (value >> 32),
              (byte) (value >> 24), (byte) (value >> 16), (byte) (value >> 8),
              (byte) value}))).setScale(columnInfo.getDecimals());
        }
      case FLOAT:
        return BigDecimal.valueOf(getInternalFloat(columnInfo));
      case DOUBLE:
        return BigDecimal.valueOf(getInternalDouble(columnInfo));
      case DECIMAL:
      case VARSTRING:
      case VARCHAR:
      case STRING:
      case OLDDECIMAL:
        return new BigDecimal(new String(buf, pos, length, StandardCharsets.UTF_8));
      default:
        throw new SQLException("getBigDecimal not available for data field type "
            + columnInfo.getColumnType().getJavaTypeName());
    }
  }
1189856
@Override
  public final Integer evalIntegerResult(
    final String pQuery, final String pColumnName) throws Exception {
    Integer result = null;
    IRecordSet<RS> recordSet = null;
    try {
      recordSet = retrieveRecords(pQuery);
      if (recordSet.moveToFirst()) {
        result = recordSet.getInteger(pColumnName);
      }
    } finally {
      if (recordSet != null) {
        recordSet.close();
      }
    }
    return result;
  }
160635
private Object getColumnValue(EntityMetadata m, Object e, Attribute attribute)
    {
        Field field = (Field) ((Attribute) attribute).getJavaMember();
        Object value;
        if (!m.isCounterColumnType())
        {
            value = getThriftColumnValue(e, attribute);
        }
        else
        {
            value = PropertyAccessorHelper.getString(e, field);
        }
        return value;
    }
84408
@Override
    public byte getByte(int columnIndex) throws SQLException {
        checkColumnBounds(columnIndex);
        try {
            Long longValue = getPrivateInteger(columnIndex);
            if (longValue > Byte.MAX_VALUE || longValue < Byte.MIN_VALUE) {
                throw new SQLException("Value out of byte range");
            }
            return longValue.byteValue();
        } catch (Exception x) {
            throw SQLError.get(x);
        }
    }
295068
public int getColumnIndex(final String colName) {
        int idx = -1;
        if (columnIndex != null) {
            final Integer i = columnIndex.get(colName);
            if (i != null) {
                idx = i.intValue();
            }
        }
        return idx;
    }
118145
@Override
  public final IConverterIntoByName<?, ColumnsValues> lazyGet(
    final Map<String, Object> pAddParam,
      final String pBeanName) throws Exception {
    IConverterIntoByName<?, ColumnsValues> convrt =
      this.convertersMap.get(pBeanName);
    if (convrt == null) {
      // locking:
      synchronized (this.convertersMap) {
        // make sure again whether it's null after locking:
        convrt = this.convertersMap.get(pBeanName);
        if (convrt == null) {
          if (pBeanName
            .equals(CnvIbnLongToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnLongToCv();
          } else if (pBeanName
            .equals(CnvIbnFloatToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnFloatToCv();
          } else if (pBeanName
            .equals(CnvIbnDoubleToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnDoubleToCv();
          } else if (pBeanName
            .equals(CnvIbnBigDecimalToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnBigDecimalToCv();
          } else if (pBeanName
            .equals(CnvIbnBooleanToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnBooleanToCv();
          } else if (pBeanName
            .equals(CnvIbnDateToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnDateToCv();
          } else if (pBeanName
            .equals(CnvIbnEnumToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnEnumToCv();
          } else if (pBeanName
            .equals(CnvIbnStringToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnStringToCv();
          } else if (pBeanName
            .equals(CnvIbnEntitiesToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnEntitiesToCv();
          } else if (pBeanName
            .equals(CnvIbnVersionToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnVersionToCv();
          } else if (pBeanName
            .equals(CnvIbnIntegerToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnIntegerToCv();
          }
        }
      }
    }
    if (convrt == null) {
      throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
        "There is no converter with name " + pBeanName);
    }
    return convrt;
  }
1310926
public float getInternalFloat(ColumnInformation columnInfo) throws SQLException {
    if (lastValueWasNull()) {
      return 0;
    }

    switch (columnInfo.getColumnType()) {
      case BIT:
        return parseBit();
      case TINYINT:
      case SMALLINT:
      case YEAR:
      case INTEGER:
      case MEDIUMINT:
      case FLOAT:
      case DOUBLE:
      case DECIMAL:
      case VARSTRING:
      case VARCHAR:
      case STRING:
      case OLDDECIMAL:
      case BIGINT:
        try {
          return Float.valueOf(new String(buf, pos, length, StandardCharsets.UTF_8));
        } catch (NumberFormatException nfe) {
          SQLException sqlException = new SQLException("Incorrect format \""
              + new String(buf, pos, length, StandardCharsets.UTF_8)
              + "\" for getFloat for data field with type " + columnInfo.getColumnType()
              .getJavaTypeName(), "22003", 1264);
          //noinspection UnnecessaryInitCause
          sqlException.initCause(nfe);
          throw sqlException;
        }
      default:
        throw new SQLException(
            "getFloat not available for data field type " + columnInfo.getColumnType()
                .getJavaTypeName());
    }
  }
1188976
public int columnIndex(String columnName) {
        for (int i = 0; i < columnCount(); i++) {
            if (columnNames().get(i).equalsIgnoreCase(columnName)) {
                return i;
            }
        }
        throw new IllegalArgumentException(String.format("Column %s is not present in table %s", columnName, name
                ()));
    }
499526
public TColumn getPkColumn() {
		TColumn column = null;
		if (hasPkColumn()) {
			column = columns.get(pkIndex);
		}
		return column;
	}
756559
public final Object getColumnValue(final String columnName) {
        SQLExpression sqlExpression = values[getColumnIndex(columnName)];
        if (sqlExpression instanceof SQLParameterMarkerExpression) {
            return parameters[getParameterIndex(sqlExpression)];
        } else if (sqlExpression instanceof SQLTextExpression) {
            return ((SQLTextExpression) sqlExpression).getText();
        } else {
            return ((SQLNumberExpression) sqlExpression).getNumber();
        }
    }
845800
@Override
  public final Integer getInteger(final String pColumnName) throws Exception {
    int columnIndex = this.resultSet.getColumnIndex(pColumnName);
    Integer result = null;
    if (!this.resultSet.isNull(columnIndex)) {
      result = this.resultSet.getInt(columnIndex);
    }
    return result;
  }