<p>Put column with Long val.</p>
@param pNm column name
@param pVal column val
508490
public final void put(final String pNm, final Long pVal) {
    if (isId(pNm)) {
      if (this.idLongs == null) {
        this.idLongs = new HashMap<String, Long>();
      }
      this.idLongs.put(pNm, pVal);
    } else {
      if (this.longs == null) {
       this.longs  = new HashMap<String, Long>();
      }
      this.longs.put(pNm, pVal);
    }
  }
555939
public void put(int key, boolean value) {
        int i = ContainerHelpers.binarySearch(mKeys, mSize, key);

        if (i >= 0) {
            mValues[i] = value;
        } else {
            i = ~i;

            if (mSize >= mKeys.length) {
                int n = ArrayUtils.idealIntArraySize(mSize + 1);

                int[] nkeys = new int[n];
                boolean[] nvalues = new boolean[n];

                // Log.e("SparseBooleanArray", "grow " + mKeys.length + " to " + n);
                System.arraycopy(mKeys, 0, nkeys, 0, mKeys.length);
                System.arraycopy(mValues, 0, nvalues, 0, mValues.length);

                mKeys = nkeys;
                mValues = nvalues;
            }

            if (mSize - i != 0) {
                // Log.e("SparseBooleanArray", "move " + (mSize - i));
                System.arraycopy(mKeys, i, mKeys, i + 1, mSize - i);
                System.arraycopy(mValues, i, mValues, i + 1, mSize - i);
            }

            mKeys[i] = key;
            mValues[i] = value;
            mSize++;
        }
    }
744733
function setColumnValue($column_name, $value, $column_type = null) {
		if (null === $column_type) {
			$column_type = static::getColumnType($column_name);
		}

		static $true = array(true, 1, '1', 'on', 'true');
		static $false = array(false, 0, '0', 'off', 'false');

		if ($column_type === self::COLUMN_TYPE_BOOLEAN) {
			if (is_string($value)) {
				$value = strtolower($value);
			}
			if (in_array($value, $true, true)) {
				$value = 1;
			} elseif (in_array($value, $false, true)) {
				$value = 0;
			} elseif ($value === '' || $value === null) {
				$value = null;
			} else {
				throw new InvalidArgumentException($value . ' is not a valid boolean value');
			}
		} else {
			$temporal = static::isTemporalType($column_type);
			$numeric = static::isNumericType($column_type);

			if ($numeric || $temporal) {
				if (is_string($value)) {
					$value = trim($value);
				}
				if ('' === $value) {
					$value = null;
				} elseif (null !== $value) {
					if ($temporal) {
						$value = static::coerceTemporalValue($value, $column_type, static::getConnection());
					} elseif ($numeric) {
						if (is_bool($value)) {
							$value = $value ? 1 : 0;
						} elseif (static::isIntegerType($column_type)) {
							// validate and cast
							if (!is_int($value)) {
								$int_val = intval($value);
								if ((string) $int_val != (string) $value) {
									throw new InvalidArgumentException($value . ' is not a valid integer or it is too large');
								}
								$value = $int_val;
							}
						} else {
							// only validates, doesn't cast...yet
							$float_val = floatval($value);
							if ((string) $float_val != (string) $value) {
								throw new InvalidArgumentException($value . ' is not a valid float or it is too large');
							}
						}
					}
				}
			}
		}

		if ($this->$column_name !== $value) {
			$this->_modifiedColumns[$column_name] = $column_name;
			$this->$column_name = $value;
		}
		return $this;
	}
558702
public void putValue(E row, E col, T value) {
		ensureRowKey(row);
		ensureColKey(col);
		get(rowKeys.get(row)).set(colKeys.get(col), value);
	}
419697
@Override
  public final synchronized void set(final String pBeanName,
    final IConverterIntoByName<?, ColumnsValues> pBean) throws Exception {
    this.convertersMap.put(pBeanName, pBean);
  }
1011299
public boolean setProperty(String pName, String pValue) {
        if(pName == null) return false;
        _properties.setProperty(pName, pValue);
        return true;
    }
1076181
public void put(double[] val, double weight) {
    assert (val.length == elements.length);
    if(weight == 0) {
      return; // Skip zero weights.
    }
    final double nwsum = weight + wsum;
    for(int i = 0; i < elements.length; i++) {
      final double delta = val[i] - elements[i];
      final double rval = delta * weight / nwsum;
      elements[i] += rval;
    }
    wsum = nwsum;
  }
864504
@Override
	// @NotThreadSafe
	public void put(long position, byte value) throws IOException {
		int bufferNum = getBufferNum(position);
		mappedBuffers.get(bufferNum).put(getIndex(position), value);
		if(modifiedBuffers!=null) modifiedBuffers.set(bufferNum, true);
	}
987302
public void putRational(Rational val) throws IOException {
    putInt(val.getNumerator());
    putInt(val.getDenominator());
  }
713406
private void addColumnValue(Object value, VoltType columnType, int col) {
        // schema checking code that is used for some tests
        boolean allowNulls = true;
        int maxColSize = VoltType.MAX_VALUE_LENGTH;
        if (m_extraMetadata != null) {
            allowNulls = m_extraMetadata.originalColumnInfos[col].nullable;
            maxColSize = m_extraMetadata.originalColumnInfos[col].size;
        }

        if (VoltType.isVoltNullValue(value)) {
            // schema checking code that is used for some tests
            // allowNulls should always be true in production
            if (allowNulls == false) {
                throw new IllegalArgumentException(
                        String.format("Column %s at index %d doesn't allow NULL values.",
                        getColumnName(col), col));
            }

            switch (columnType) {
            case TINYINT:
                m_buffer.put(VoltType.NULL_TINYINT);
                break;
            case SMALLINT:
                m_buffer.putShort(VoltType.NULL_SMALLINT);
                break;
            case INTEGER:
                m_buffer.putInt(VoltType.NULL_INTEGER);
                break;
            case TIMESTAMP:
                m_buffer.putLong(VoltType.NULL_BIGINT);
                break;
            case BIGINT:
                m_buffer.putLong(VoltType.NULL_BIGINT);
                break;
            case FLOAT:
                m_buffer.putDouble(VoltType.NULL_FLOAT);
                break;
            case STRING:
            case GEOGRAPHY:
            case VARBINARY:
                m_buffer.putInt(NULL_STRING_INDICATOR);
                break;
            case GEOGRAPHY_POINT:
                GeographyPointValue.serializeNull(m_buffer);
                break;
            case DECIMAL:
                VoltDecimalHelper.serializeNull(m_buffer);
                break;

            default:
                throw new VoltTypeException("Unsupported type: " +
                        columnType);
            }
        }
        else {

            // Allow implicit conversions across all numeric types
            // except BigDecimal and anything else. Require BigDecimal
            // and reject Long128. Convert byte[] to VoltType.STRING.
            // Allow longs to be converted to VoltType.TIMESTAMPS.

            // In all error paths, catch ClassCastException
            // and VoltTypeException to restore
            // the correct table state.
            // XXX consider adding a fast path that checks for
            // equivalent types of input and column

            try {
                switch (columnType) {
                case TINYINT:
                    if (value instanceof BigDecimal) {
                        throw new ClassCastException();
                    }
                    final Number n1 = (Number) value;
                    if (columnType.wouldCastOverflow(n1)) {
                        throw new VoltTypeException("Cast of " +
                                n1.doubleValue() +
                                " to " +
                                columnType.toString() +
                                " would overflow");
                    }
                    m_buffer.put(n1.byteValue());
                    break;
                case SMALLINT:
                    if (value instanceof BigDecimal) {
                        throw new ClassCastException();
                    }
                    final Number n2 = (Number) value;
                    if (columnType.wouldCastOverflow(n2)) {
                        throw new VoltTypeException("Cast to " +
                                columnType.toString() +
                                " would overflow");
                    }
                    m_buffer.putShort(n2.shortValue());
                    break;
                case INTEGER:
                    if (value instanceof BigDecimal) {
                        throw new ClassCastException();
                    }
                    final Number n3 = (Number) value;
                    if (columnType.wouldCastOverflow(n3)) {
                        throw new VoltTypeException("Cast to " +
                                columnType.toString() +
                                " would overflow");
                    }
                    m_buffer.putInt(n3.intValue());
                    break;
                case BIGINT:
                    if (value instanceof BigDecimal) {
                        throw new ClassCastException();
                    }
                    final Number n4 = (Number) value;
                    if (columnType.wouldCastOverflow(n4)) {
                        throw new VoltTypeException("Cast to " +
                                columnType.toString() +
                                " would overflow");
                    }
                    m_buffer.putLong(n4.longValue());
                    break;

                case FLOAT:
                    if (value instanceof BigDecimal) {
                        throw new ClassCastException();
                    }
                    final Number n5 = (Number) value;
                    if (columnType.wouldCastOverflow(n5)) {
                        throw new VoltTypeException("Cast to " +
                                columnType.toString() +
                                " would overflow");
                    }
                    m_buffer.putDouble(n5.doubleValue());
                    break;

                case STRING: {
                    // Accept byte[] and String
                    if (value instanceof byte[]) {
                        if (((byte[]) value).length > maxColSize) {
                            throw new VoltOverflowException(
                                    "Value in VoltTable.addRow(...) larger than allowed max " +
                                            VoltType.humanReadableSize(maxColSize));
                        }

                        // bytes MUST be a UTF-8 encoded string.
                        assert(testForUTF8Encoding((byte[]) value));
                        writeStringOrVarbinaryToBuffer((byte[]) value, m_buffer);
                    }
                    else {
                        if (((String) value).length() > maxColSize) {
                            throw new VoltOverflowException(
                                    "Value in VoltTable.addRow(...) larger than allowed max " +
                                            VoltType.humanReadableSize(maxColSize));
                        }

                        writeStringToBuffer((String) value, ROWDATA_ENCODING, m_buffer);
                    }
                    break;
                }

                case VARBINARY: {
                    // Accept byte[] and String (hex-encoded)
                    if (value instanceof String) {
                        value = Encoder.hexDecode((String) value);
                    }
                    if (value instanceof byte[]) {
                        if (((byte[]) value).length > maxColSize) {
                            throw new VoltOverflowException(
                                    "Value in VoltTable.addRow(...) larger than allowed max " +
                                            VoltType.humanReadableSize(maxColSize));
                        }
                        writeStringOrVarbinaryToBuffer((byte[]) value, m_buffer);
                    }
                    else {
                        throw new ClassCastException();
                    }
                    break;
                }

                case GEOGRAPHY: {
                    GeographyValue gv = (GeographyValue)value;
                    m_buffer.putInt(gv.getLengthInBytes());
                    gv.flattenToBuffer(m_buffer);
                    break;
                }

                case GEOGRAPHY_POINT: {
                    GeographyPointValue pt = (GeographyPointValue)value;
                    pt.flattenToBuffer(m_buffer);
                    break;
                }

                case TIMESTAMP: {
                    if (value instanceof BigDecimal) {
                        throw new ClassCastException();
                    }
                    long micros;
                    // Accept long and TimestampType and any kind of Date
                    if (value instanceof java.util.Date ||
                            value instanceof TimestampType) {
                         micros = ParameterSet.timestampToMicroseconds(value);
                    }
                    else {
                        micros = ((Number) value).longValue();
                    }
                    m_buffer.putLong(micros);
                    break;
                }

                case DECIMAL: {
                    // Only accept BigDecimal; rely on class cast exception for error path
                    VoltDecimalHelper.serializeBigDecimal( (BigDecimal)value, m_buffer);
                    break;
                }

                default:
                    throw new VoltTypeException("Unsupported type: " + columnType);
                }
            }
            catch (ClassCastException cce) {
                throw new VoltTypeException("Value for column " + col + " (" +
                        getColumnName(col) + ") is type " +
                        value.getClass().getSimpleName() + " when type " + columnType +
                        " was expected.");
            }
        }
    }
1360536
public final void putLong(Object parent, long offset, long value) {
		THE_UNSAFE.putLong(parent, offset, value);
	}
243129
final void setPSLong(PreparedStatement ps, int index, long value) throws SQLException {
        if (usingDB2Connect || usingSQLServer || usingDB2zOS) { // LIDB2775.25 zOS
            ps.setBigDecimal(index, BigDecimal.valueOf(value));
        } else {
            ps.setLong(index, value);
        }
    }
713307
public void put(String key, BigDecimal value) {
		if (this.compiledStatement != null) {
			if (value == null) {
				this.compiledStatement.bindNull(compiledStatementBindIndex++);
			} else {
				compiledStatement.bindString(compiledStatementBindIndex++, value.toPlainString());
			}
		} else if (values != null) {
			values.put(key, value.toPlainString());
			return;
		}

		names.add(key);
		// values.put(key, value);
		args.add(value);
		valueType.add(ParamType.INTEGER);
	}
113863
public Options putLong(String key, IModel<Long> value)
	{
		putOption(key, new LongOption(value));
		return this;
	}
135211
public void putLong(String key, long l) {
		checkNotNull(key);
		put(key, Long.toString(l));
	}
1177167
private static void putLong(byte[] array, long l, int pos, int numberOfLongBytes) {
    for (int i = 0; i < numberOfLongBytes; ++i) {
      array[pos + numberOfLongBytes - i - 1] = (byte) (l >>> (i * 8));
    }
  }
218618
@Override
	public void setVal(String fldname, Constant val) {
		UpdateScan us = (UpdateScan) s;
		us.setVal(fldname, val);
	}