Reads a Long out of a field in a Cursor and writes it to a Map.

@param cursor The cursor to read from
@param field The INTEGER field to read
@param values The {@link ContentValues} to put the value into, with the field as the key
771253
public static void cursorLongToContentValues(Cursor cursor, String field, ContentValues values)
    {
        cursorLongToContentValues(cursor, field, values, field);
    }
193299
private boolean isPresentIn(String[] values, String field){
		for (String value : values)
			if(value.equalsIgnoreCase(JMapConversion.ALL) || value.equals(field))
				return true;
		
		return false;
	}
345403
public void addFieldValues(String fieldName, Collection<String> values) {
        Utils.require(!Utils.isEmpty(fieldName), "fieldName");
        
        if (values != null && values.size() > 0) {
            if (fieldName.charAt(0) == '_') {
                Utils.require(values.size() == 1, "System fields can have only 1 value: " + fieldName);
                setSystemField(fieldName, values.iterator().next());
            } else {
                List<String> currValues = m_valueMap.get(fieldName);
                if (currValues == null) {
                    currValues = new ArrayList<>();
                    m_valueMap.put(fieldName, currValues);
                }
                currValues.addAll(values);
            }
        }
    }
415651
private List<Object> getValues(PivotField field, Map<Integer, Object> filter) {
//		long start = System.currentTimeMillis();
		List<Object> values = new ArrayList<Object>();
		int fieldIndex = field.getIndex();
		for (int i = 0; i < dataSource.getRowCount(); i++) {
			if (filter.isEmpty()) {
				values.add(dataSource.getValueAt(i, fieldIndex));
			} else {
				if (acceptValue(i, filter)) {
					values.add(dataSource.getValueAt(i, fieldIndex));
				}
			}
		}
//		long stop = System.currentTimeMillis();
//		System.out.println("getValues in " + (stop - start));
		
		return values;
	}
1083457
@SuppressWarnings("unchecked")
	public <T> SqlBuilder in(String field, T... values) {
		sql.append(wrapper.wrap(field)).append(" IN ").append("(").append(ArrayUtil.join(values, StrUtil.COMMA)).append(")");
		return this;
	}
1278074
private void readMultiMapKeys(XMLEventReader reader, MultiValueMap<String> map)
            throws XMLStreamException, JournalException {
        while (true) {
            XMLEvent event2 = reader.nextTag();
            if (isStartTagEvent(event2, QNAME_TAG_MULTI_VALUE_MAP_KEY)) {
                // if we find a key tag, get the name
                String key =
                        getRequiredAttributeValue(event2.asStartElement(),
                                                  QNAME_ATTR_NAME);
                // read as many values as we find.
                String[] values = readMultiMapValuesForKey(reader);
                // store in the map
                storeInMultiMap(map, key, values);
            } else if (isEndTagEvent(event2, QNAME_TAG_MULTI_VALUE_MAP)) {
                break;
            } else {
                throw getNotNextMemberOrEndOfGroupException(QNAME_TAG_MULTI_VALUE_MAP,
                                                            QNAME_TAG_MULTI_VALUE_MAP_KEY,
                                                            event2);
            }
        }
    }
994316
public String getValue(final String field)
    {
        FieldValue fieldValue = Iterables.find
        (
            fieldValues,
            new Predicate<FieldValue>()
            {
                @Override
                public boolean apply(FieldValue fv)
                {
                    return fv.getField().equals(field);
                }
            },
            null
        );
        return (fieldValue != null) ? fieldValue.getValue() : null;
    }
1356048
public <F> void updateProfileField(ProfileField<F, ?> field, F... values) {
		updateProfileField(field, Arrays.asList(values));
	}
460336
public long set(int field, long value)
  {
    switch (field) {
    case YEAR:
      setYear((int) value);
      break;

    case MONTH:
      setMonth((int) value);
      break;

    case DAY_OF_MONTH:
      setDayOfMonth((int) value);
      break;

    case HOUR:
      setHour((int) value);
      break;

    case MINUTE:
      setMinute((int) value);
      break;

    case SECOND:
      setSecond((int) value);
      break;

    case MILLISECOND:
      setMillisecond(value);
      break;

    default:
      throw new RuntimeException();
    }

    return _localTimeOfEpoch;
  }
204584
public int update(SQLiteDatabase db, ContentValues values) {
        assertTable();
        return db.update(mTable, values, getSelection(), getSelectionArgs());
    }
37213
@Override
    public void setValues(String[] values) {
        if (values == null) {
            this.valuesArray = null;
            this.values = null;
            this.nullValues = true;
        } else if (this.values == null) {
            this.values = new ArrayList<>(Arrays.asList(values));
            this.nullValues = false;
            this.valuesArray = values.clone();
        } else {
            this.nullValues = false;
            this.values.clear();
            for (final String value : values) {
                if (value == null) {
                    this.values.add(NULL_MARKER);
                } else {
                    this.values.add(NullSafeStringColumnMapper.NOT_NULL_PREFIX + value);
                }
            }
            this.valuesArray = values.clone();
        }
    }
1234526
public void setFields(java.util.Collection<Field> fields) {
        if (fields == null) {
            this.fields = null;
            return;
        }

        this.fields = new com.amazonaws.internal.SdkInternalList<Field>(fields);
    }
683970
protected void setGhostValue(I_CmsFormField field, String value, boolean ghostMode) {

        I_CmsFormWidget widget = field.getWidget();
        if ((widget instanceof I_CmsHasGhostValue) && (value != null)) {
            ((I_CmsHasGhostValue)widget).setGhostValue(value, ghostMode);
        }
    }
934176
public void setLong(String fieldName, Long value) {
		if (value == null) {
			throw new IllegalArgumentException("参数值[" + fieldName + "]不能为NULL.");
		}
		fieldList.add(fieldName);
		statementParameter.setLong(value);
	}
800716
private void setFieldValueViaCQL(Object entity, Object thriftColumnValue, Attribute attribute)
    {
        if (attribute != null)
        {
            try
            {
                if (attribute.isCollection())
                {
                    setCollectionValue(entity, thriftColumnValue, attribute);
                }
                else if (CassandraDataTranslator.isCassandraDataTypeClass(((AbstractAttribute) attribute)
                        .getBindableJavaType()))
                {
                    PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), CassandraDataTranslator
                            .decompose(((AbstractAttribute) attribute).getBindableJavaType(), thriftColumnValue, true));
                }
                else
                {
                    PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), (byte[]) thriftColumnValue);
                }
            }
            catch (PropertyAccessException pae)
            {
                log.warn("Error while setting field{} value via CQL, Caused by: .", attribute.getName(), pae);
            }
        }
    }
319989
public void writeField(String field) throws IOException {

		if (this.newLine) {
			this.newLine = false;
		} else {
			this.write(',');
		}

		// case 0: empty string, simple :)
		if ((field == null) || (field.length() == 0)) {
			return;
		}

		// case 1: field has quotes in it, if so convert to, quote field and
		// double all quotes
		Matcher matcher = escapePattern.matcher(field);
		if (matcher.find()) {
			this.write('"');
			this.tmpBuffer.setLength(0);
			do {
				matcher.appendReplacement(this.tmpBuffer, "\"\"");
			} while (matcher.find());
			matcher.appendTail(this.tmpBuffer);
			this.write(this.tmpBuffer.toString());
			this.write('"');
			return;
		}

		// case 2: field has a comma, carriage return or new line in it, if so
		// quote field and double all quotes
		matcher = specialCharsPattern.matcher(field);
		if (matcher.find()) {
			this.write('"');
			this.write(field);
			this.write('"');
			return;
		}

		// case 3: safe string to just add
		this.append(field);
	}
668751
@CheckResult protected Observable<Long> insert(final String table, final ContentValues contentValues) {
    return Observable.defer(new Func0<Observable<Long>>() {
      @Override
      public Observable<Long> call() {
        return Observable.just(db.insert(table, contentValues));
      }
    });
  }