Get the values of the fields for an obj
Autoincrement values are automatically set.
@param fields
@param obj
@throws PersistenceBrokerException
186548
public ValueContainer[] getValuesForObject(FieldDescriptor[] fields, Object obj, boolean convertToSql, boolean assignAutoincrement) throws PersistenceBrokerException
    {
        ValueContainer[] result = new ValueContainer[fields.length];

        for(int i = 0; i < fields.length; i++)
        {
            FieldDescriptor fd = fields[i];
            Object cv = fd.getPersistentField().get(obj);

            /*
            handle autoincrement attributes if
            - is a autoincrement field
            - field represents a 'null' value, is nullified
            and generate a new value
            */
            if(assignAutoincrement && fd.isAutoIncrement() && representsNull(fd, cv))
            {
                /*
                setAutoIncrementValue returns a value that is
                properly typed for the java-world.  This value
                needs to be converted to it's corresponding
                sql type so that the entire result array contains
                objects that are properly typed for sql.
                */
                cv = setAutoIncrementValue(fd, obj);
            }
            if(convertToSql)
            {
                // apply type and value conversion
                cv = fd.getFieldConversion().javaToSql(cv);
            }
            // create ValueContainer
            result[i] = new ValueContainer(cv, fd.getJdbcType());
        }
        return result;
    }
382762
function(field, value) {
        if (field in this) {
            if (this.get(field) !== value && !([
                null,
                undefined
            ].indexOf(this.get(field)) > -1 && [
                null,
                undefined
            ].indexOf(value) > -1)) {
                if (CRUD.EntityManager.entities[this.getType()].autoSerialize.indexOf(field) > -1) {
                    if (JSON.stringify(this.get(field)) != JSON.stringify(value)) {
                        this.__dirtyValues__[field] = value;
                    }
                } else {
                    this.__dirtyValues__[field] = value;
                }
            }
        } else {
            CRUD.log('Could not find field \'' + field + '\' in \'' + this.getType() + '\' (for set)');
        }
    }
238511
public static void setField(final Object obj, Field field, final Object value) {
		try {
			field.set(obj, value);
		} catch (Exception e) {
			throw convertReflectionExceptionToUnchecked(e);
		}
	}
1207301
public ValueContainer[] getCurrentLockingValues(Object o) throws PersistenceBrokerException
    {
        FieldDescriptor[] fields = getLockingFields();
        ValueContainer[] result = new ValueContainer[fields.length];
        for (int i = 0; i < result.length; i++)
        {
            result[i] = new ValueContainer(fields[i].getPersistentField().get(o), fields[i].getJdbcType());
        }
        return result;
    }
1005178
private static String joinSetAndGetValue(List<Field> fields,
			List<Object> values, Object obj, boolean withNull) {
		StringBuilder sb = new StringBuilder();
		int fieldSize = fields.size();
		for(int i = 0; i < fieldSize; i++) {
			Column column = fields.get(i).getAnnotation(Column.class);
			Object value = DOInfoReader.getValue(fields.get(i), obj);
			if(column.casVersion()) {
				if(value == null) {
					throw new CasVersionNotMatchException("casVersion column value is null");
				}
				Long _v = null;
				if(value instanceof Long) {
					_v = (Long) value;
				} else if (value instanceof Integer) {
					_v = ((Integer) value).longValue();
				} else {
					throw new CasVersionNotMatchException("casVersion column type must be Integer or Long");
				}
				sb.append(getColumnName(column)).append("=").append(_v + 1).append(",");
			} else {
				if(value != null && column.isJSON()) {
					value = JSON.toJson(value);
				}
				if(withNull || value != null) {
					sb.append(getColumnName(column)).append("=?,");
					values.add(value);
				}
			}
		}
		return sb.length() == 0 ? "" : sb.substring(0, sb.length() - 1);
	}
739964
public void addFields(GenericField[] fields)
	{
		for (int i=0; i < fields.length;i++)
		{
			this.fieldMap.put(fields[i].getFieldName(), fields[i]);
		}
	}
592828
public void setValue(Object obj, Object value) {
    if (setters.length > 0) {
      for (Method method : setters) {
        if (value == null || method.getParameterTypes()[0].isAssignableFrom(value.getClass())) {
          try {
            method.invoke(obj, value);
            return;
          } catch (IllegalAccessException | InvocationTargetException e) {
            // try to set field directly
          }
        }
      }
    }
    setFieldValue(field, obj, value);
  }
129310
private static Object getFieldValue(final Object classInstance, final Field classField) {
    try {
      return classField.get(classInstance);
    } catch (IllegalArgumentException ex) {
      throw new JBBPMapperException("Can't set get value from a mapping field", null, classInstance.getClass(), classField, ex);
    } catch (IllegalAccessException ex) {
      throw new JBBPMapperException("Can't get access to a mapping field", null, classInstance.getClass(), classField, ex);
    }
  }
1109018
@Override
    public void visitField(Field obj) {
        String fieldSig = obj.getSignature();
        if ("Ljavax/swing/JLabel;".equals(fieldSig)) {
            FieldAnnotation fa = FieldAnnotation.fromVisitedField(this);

            fieldLabels.add(XFactory.createXField(fa));
        }
    }
363814
public void setEntityValues(java.util.Collection<String> entityValues) {
        if (entityValues == null) {
            this.entityValues = null;
            return;
        }

        this.entityValues = new java.util.ArrayList<String>(entityValues);
    }
49680
private void setField(Row row, Table schemaTable, Object embeddedObject, Attribute embeddedAttrib)
    {
        Field field = (Field) embeddedAttrib.getJavaMember();
        FieldDef fieldDef = schemaTable.getField(((AbstractAttribute) embeddedAttrib).getJPAColumnName());

        Object valueObj = PropertyAccessorHelper.getObject(embeddedObject, field);

        if (valueObj != null)
            NoSqlDBUtils.add(fieldDef, row, valueObj, ((AbstractAttribute) embeddedAttrib).getJPAColumnName());

    }
82025
public static <T> T getFieldValue(final Object obj, final String fieldName) {
		Field field = getField(obj.getClass(), fieldName);
		if (field == null) {
			throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + obj + ']');
		}
		return getFieldValue(obj, field);
	}
694913
public static void setPrivateField(final Object obj, final String name, final Object value) {
        try {
            final Field field = obj.getClass().getDeclaredField(name);
            field.setAccessible(true);
            field.set(obj, value);
        } catch (final Exception ex) {
            throw new RuntimeException("Couldn't set field '" + name + "' in class '" + obj.getClass() + "'", ex);
        }
    }
474009
protected void setValueToField(Field field, Object bean, Object value) {
        try {
            field.setAccessible(true);
            field.set(bean, value);
        } catch (Exception e) {
            throw new PropertyLoaderException(
                    String.format("Can not set bean <%s> field <%s> value", bean, field), e
            );
        }
    }
913801
private static void setFieldValue(Object entity, Field member, Object retVal)
    {
        if (member != null && retVal != null && entity != null)
        {
            PropertyAccessorHelper.set(entity, member, retVal);
        }
    }
414691
@Override
    public void visitField(Field obj) {
        if (obj.isPrivate()) {
            String signature = obj.getSignature();
            if (signature.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX)) {
                try {
                    JavaClass cls = Repository.lookupClass(SignatureUtils.stripSignature(signature));
                    if (cls.implementationOf(collectionClass) || cls.implementationOf(mapClass)) {
                        FieldAnnotation fa = FieldAnnotation.fromVisitedField(this);
                        collectionFields.put(fa.getFieldName(), new FieldInfo(fa));
                    }
                } catch (ClassNotFoundException cnfe) {
                    bugReporter.reportMissingClass(cnfe);
                }
            }
        }
    }
363902
private static Object readFieldValue(final Object obj, final Field field) {
    try {
      return field.get(obj);
    } catch (Exception ex) {
      throw new JBBPException("Can't get value from field [" + field + ']', ex);
    }
  }