Populate the UPDATE clause with the properties of the given bean using the given Mapper.

@param obj object to use for population
@param mapper mapper to use
@return the current object
494186
@SuppressWarnings({ "rawtypes", "unchecked" })
    @WithBridgeMethods(value = SQLUpdateClause.class, castRequired = true)
    public <T> C populate(T obj, Mapper<T> mapper) {
        Collection<? extends Path<?>> primaryKeyColumns = entity.getPrimaryKey() != null
                ? entity.getPrimaryKey().getLocalColumns()
                : Collections.<Path<?>>emptyList();
        Map<Path<?>, Object> values = mapper.createMap(entity, obj);
        for (Map.Entry<Path<?>, Object> entry : values.entrySet()) {
            if (!primaryKeyColumns.contains(entry.getKey())) {
                set((Path) entry.getKey(), entry.getValue());
            }
        }
        return (C) this;
    }
1311807
public Iterable<DConnection> queryByUpdatedBy(java.lang.String updatedBy) {
    return queryByField(null, DConnectionMapper.Field.UPDATEDBY.getFieldName(), updatedBy);
  }
1341511
public BeanMappingObject getBeanMappingObject(Class src, Class target) {
        return mappings.get(mapperObjectName(src, target));
    }
497430
protected void configureObjectMapper(ObjectMapper mapper) {
		mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
		mapper.configure(MapperFeature.USE_STD_BEAN_NAMING, true);
		mapper.setSerializationInclusion(Include.NON_NULL);
		applyConfigurationPropertiesFilter(mapper);
		applySerializationModifier(mapper);
	}
702104
private function useMapper(IMapper $mapper)
    {
        if ($this->mapper === null) {
            $newProperties = $this->getReflection($mapper)->getEntityProperties();
            foreach ($this->getCurrentReflection()->getEntityProperties() as $oldProperty) {
                $oldColumn = $oldProperty->getColumn();
                if ($oldColumn !== null) {
                    $name = $oldProperty->getName();
                    if (!isset($newProperties[$name]) or $newProperties[$name]->getColumn() === null) {
                        throw new InvalidStateException('Inconsistent sets of properties detected in entity ' . get_called_class() . '.');
                    }
                    if ($this->row->hasColumn($oldColumn)) {
                        $newColumn = $newProperties[$name]->getColumn();
                        $value = $this->row->$oldColumn;
                        unset($this->row->$oldColumn);
                        $this->row->$newColumn = $value;
                    }
                }
            }
            $this->mapper = $mapper;
            $this->row->setMapper($mapper);
            $this->currentReflection = null;
        } elseif ($this->mapper != $mapper) { // intentionally !=, we want to ensure that types and states are same
            throw new InvalidStateException("Given mapper isn't same as mapper already present in entity " . get_called_class() . '.');
        }
    }
304499
public static SimpleModule getModule(final ObjectMapper mapper) {
        SimpleModule module = new SimpleModule();
        module.setSerializerModifier(new BeanSerializerModifier() {
            @Override
            public JsonSerializer<?> modifySerializer(SerializationConfig config, BeanDescription beanDesc, JsonSerializer<?> serializer) {
                for (Class<?> c : TypeUtil.getAllClasses(beanDesc.getBeanClass())) {
                    if (c.isAssignableFrom(Object.class)) {
                        continue;
                    }
                    Field[] fields = c.getDeclaredFields();
                    for (Field field : fields) {
                        if ("additionalProperties".equalsIgnoreCase(field.getName())) {
                            JsonProperty property = field.getAnnotation(JsonProperty.class);
                            if (property != null && property.value().isEmpty()) {
                                return new AdditionalPropertiesSerializer(beanDesc.getBeanClass(), serializer, mapper);
                            }
                        }
                    }
                }
                return serializer;
            }
        });
        return module;
    }
987600
public static String serialize(final Object obj) throws IOException {
		final ObjectMapper mapper = new ObjectMapper();
        mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
		return mapper.writeValueAsString(obj);
		
	}
881457
public void write(Object object, Object value) {
        if(object == null) {
            String msg = "Can not update the identifier \"" + _identifier + "\" on a null value object.";
            LOGGER.error(msg);
            throw new RuntimeException(msg);
        }

        if(TRACE_ENABLED)
            LOGGER.trace("Update property named \"" + _identifier + "\" on object of type: \"" + object.getClass().getName() + "\"");

        if(object instanceof Map)
            mapUpdate((Map)object, _identifier, value);
        else if(object instanceof List) {
            int i = parseIndex(_identifier);
            listUpdate((List)object, i, value);
        }
        else if(object.getClass().isArray()) {
            int i = parseIndex(_identifier);
            arrayUpdate(object, i, value);
        }
        else beanUpdate(object, _identifier, value);
    }
266478
@Override
    public <T> Flowable<T> get(@Nonnull ResultSetMapper<? extends T> mapper) {
        Preconditions.checkNotNull(mapper, "mapper cannot be null");
        return update.startWithDependency(Update.<T>createReturnGeneratedKeys(update.connections,
                update.parameterGroupsToFlowable(), update.sql, mapper, true));

    }
991217
public static <E> JsonMapper<E> mapperFor(Class<E> cls) throws NoSuchMapperException {
        JsonMapper<E> mapper = getMapper(cls);

        if (mapper == null) {
            throw new NoSuchMapperException(cls);
        } else {
            return mapper;
        }
    }
539766
def update(self, obj, matches=None, mt=None, lt=None, eq=None):
        '''
        
        '''
        updated = False
        objects = list()
        for _obj in self.get(obj.__class__):
            if self.__criteria(_obj, matches=matches, mt=mt, lt=lt, eq=eq):
                objects.append(obj)
                updated = True
            else:
                objects.append(_obj)
        self.flush(obj._TABLE)
        self.create_table_from_object(obj)
        for obj in objects:
            self.store(obj)

        return updated
1172028
public void toDBObject(final Object containingObject, final MappedField mf, final DBObject dbObj, final MapperOptions opts) {
        final Object fieldValue = mf.getFieldValue(containingObject);
        final TypeConverter enc = getEncoder(fieldValue, mf);

        final Object encoded = enc.encode(fieldValue, mf);
        if (encoded != null || opts.isStoreNulls()) {
            dbObj.put(mf.getNameToStore(), encoded);
        }
    }
11324
public Message setObject(Object obj) {
        if(obj == null) return this;
        if(obj instanceof byte[])
            return setBuffer((byte[])obj);
        if(obj instanceof Buffer)
            return setBuffer((Buffer)obj);
        try {
            return setBuffer(Util.objectToByteBuffer(obj));
        }
        catch(Exception ex) {
            throw new IllegalArgumentException(ex);
        }
    }
783699
public static Map<String, Object> getPropertyMap(Object obj) {
        Assert.notNull(obj, "Argument cannot be null");

        try {
            BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass());
            PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
            Map<String, Object> propertyMap = new HashMap<String, Object>(propertyDescriptors.length);
            for (PropertyDescriptor pd : propertyDescriptors) {
                Method getter = pd.getReadMethod();
                if (getter != null) {
                    propertyMap.put(pd.getName(), getter.invoke(obj));
                }
            }
            return propertyMap;
        }
        catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
166586
@Override
  public void update(Object obj) {
    lock.writeLock().lock();
    try {
      populated = true;
      this.queueActionLocked(DeltaType.Updated, obj);
    } finally {
      lock.writeLock().unlock();
    }
  }
862674
public void set(Object obj, Object val, Object... args)
			throws SQLException, IllegalArgumentException,
			IllegalAccessException, InvocationTargetException,
			BeanPropertyException, NoSuchMethodException {
		boolean noValue[] = new boolean[1];
		val = convert(val, getTypeCode(), noValue);

		if (noValue[0])
			return;

		if (m_f != null) {
			m_f.set(obj, val);
			return;
		}

		if (m_mSet != null) {
			if (args == null || args.length == 0)
				m_mSet.invoke(obj, val);
			else {
				Object[] all = new Object[args.length + 1];
				for (int i = 0; i < args.length; i++)
					all[i] = args[i];
				all[all.length - 1] = val;
				m_mSet.invoke(obj, all);
			}
			return;
		}

		throw new BeanPropertyException("Try to write read-only property.");
	}
1000131
@GwtIncompatible("incompatible method")
    public ToStringBuilder append(final Object obj) {
        style.append(buffer, null, obj, null);
        return this;
    }