query-by method for field updatedBy
@param updatedBy the specified attribute
@return an Iterable of DContacts for the specified updatedBy
194226
public Iterable<DContact> queryByUpdatedBy(Object parent, java.lang.String updatedBy) {
    return queryByField(parent, DContactMapper.Field.UPDATEDBY.getFieldName(), updatedBy);
  }
440098
public Iterable<DOAuth2User> queryByUpdatedBy(java.lang.String updatedBy) {
    return queryByField(null, DOAuth2UserMapper.Field.UPDATEDBY.getFieldName(), updatedBy);
  }
337477
public T update(T entity) throws RowNotFoundException, OptimisticLockException {

        if (!hasPrimaryKey(entity)) {
            throw new RuntimeException(String.format("Tried to update entity of type %s without a primary key", entity
                    .getClass().getSimpleName()));
        }

        UpdateCreator update = new UpdateCreator(table);

        update.whereEquals(idColumn.getColumnName(), getPrimaryKey(entity));

        if (versionColumn != null) {
            update.set(versionColumn.getColumnName() + " = " + versionColumn.getColumnName() + " + 1");
            update.whereEquals(versionColumn.getColumnName(), getVersion(entity));
        }

        for (Column column : columns) {
            if (!column.isReadOnly()) {
                update.setValue(column.getColumnName(), getFieldValueAsColumn(entity, column));
            }
        }

        int rows = new JdbcTemplate(ormConfig.getDataSource()).update(update);

        if (rows == 1) {

            if (versionColumn != null) {
                ReflectionUtils.setFieldValue(entity, versionColumn.getFieldName(), getVersion(entity) + 1);
            }

            return entity;

        } else if (rows > 1) {

            throw new RuntimeException(
                    String.format("Updating table %s with id %s updated %d rows. There must be a mapping problem. Is column %s really the primary key?",
                            table, getPrimaryKey(entity), rows, idColumn));

        } else {

            //
            // Updated zero rows. This could be because our ID is wrong, or
            // because our object is out-of date. Let's try querying just by ID.
            //

            SelectCreator selectById = new SelectCreator()
            .column("count(*)")
            .from(table)
            .whereEquals(idColumn.getColumnName(), getPrimaryKey(entity));

            rows = new JdbcTemplate(ormConfig.getDataSource()).query(selectById, new ResultSetExtractor<Integer>() {
                @Override
                public Integer extractData(ResultSet rs) throws SQLException, DataAccessException {
                    rs.next();
                    return rs.getInt(1);
                }
            });

            if (rows == 0) {
                throw new RowNotFoundException(table, getPrimaryKey(entity));
            } else {
                throw new OptimisticLockException(table, getPrimaryKey(entity));
            }
        }
    }
139483
public Iterable<DUser> queryByUpdatedBy(java.lang.String updatedBy) {
    return queryByField(null, DUserMapper.Field.UPDATEDBY.getFieldName(), updatedBy);
  }
384488
@Override
    public DBObject getUpdateClause() {
        if (clear) {
            // If clear() was called, updates will either be an empty Map or added items with prefix-less keys
            return new BasicDBObject($set.name(), new BasicDBObject(getNameFromPrefix(), updates));
        } else if (operation == null) {
            return new BasicDBObject();     // If there are no updates, return an empty DBObject
        } else {
            return new BasicDBObject(operation.name(), updates);
        }
    }
111281
public Iterable<DFactory> queryByCreatedDate(java.util.Date createdDate) {
    return queryByField(null, DFactoryMapper.Field.CREATEDDATE.getFieldName(), createdDate);
  }
1371556
@Override
    protected String appendAttributeToQuery(final String queryBuilder, final String dataAttribute, final List<Object> queryValues) {
        if (queryBuilder != null) {
            return queryBuilder;
        }

        final String keyAttributeName;
        if (this.queryAttributeName != null) {
            keyAttributeName = this.queryAttributeName;
        } else {
            final IUsernameAttributeProvider usernameAttributeProvider = this.getUsernameAttributeProvider();
            keyAttributeName = usernameAttributeProvider.getUsernameAttribute();
        }

        if (keyAttributeName.equals(dataAttribute)) {
            return String.valueOf(queryValues.get(0));
        }

        return null;
    }
937942
public void updateDatabaseArtifacts() throws Exception {
        List<ModifiableConfigElement> mofiableElementList = new ArrayList<ModifiableConfigElement>();
        findModifiableConfigElements(this, mofiableElementList);

        for (ModifiableConfigElement element : mofiableElementList) {
            element.modify(this);
        }
    }
669423
def update(self, _attributes=None, **attributes):
        
        if _attributes is not None:
            attributes.update(_attributes)

        if self._related.uses_timestamps():
            attributes[self.get_related_updated_at()] = self._related.fresh_timestamp()

        return self._query.update(attributes)
322625
public void updateDataOnly(Transaction tran, ObjectStore store) throws PersistenceException, ObjectManagerException, SevereMessageStoreException
    {
        updateDataOnly(tran, store, this);
    }
344932
public int handleUpdateFunctions(BasicDBObject query, BasicDBObject update, String collName)
    {
        DBCollection collection = mongoDb.getCollection(collName);
        KunderaCoreUtils.printQuery("Update collection:" + query, showQuery);
        WriteResult result = null;
        try
        {
            result = collection.update(query, update);
        }
        catch (MongoException ex)
        {
            return -1;
        }
        if (result.getN() <= 0)
            return -1;
        return result.getN();
    }
708327
@Override
  @SuppressWarnings("unchecked")
  public void setModifiedBy(USER modifiedBy) {
    this.modifiedBy = assertNotNull(modifiedBy, () -> "Modified by is required");
    this.lastModifiedBy = defaultIfNull(this.lastModifiedBy, this.modifiedBy);
  }
646819
@Override
    public DBObject getUpdateClause() {
        if (clear) {
            // If new items were added, they'll be placed on the updateList.  Either way We use $set to ensure old
            // values are removed from the underlying store.
            BasicDBList updateList = new BasicDBList();
            updateList.addAll(updates);

            return new BasicDBObject($set.name(), new BasicDBObject(getNameFromPrefix(),  updateList));
        } else {
            if (updates.isEmpty()) {
                return new BasicDBObject();     // If there are no updates, return an empty DBObject
            } else {
                BasicDBList updateList = new BasicDBList();
                updateList.addAll(updates);
                
                if (operation.equals($addToSet)) {
                    return new BasicDBObject($addToSet.name(), new BasicDBObject(getNameFromPrefix(), new BasicDBObject(EACH, updateList)));
                } else {
                    return new BasicDBObject(operation.name(), new BasicDBObject(getNameFromPrefix(), updateList));
                }
            }
        }
    }
932483
public Iterable<DContact> queryByLinkedIn(Object parent, java.lang.String linkedIn) {
    return queryByField(parent, DContactMapper.Field.LINKEDIN.getFieldName(), linkedIn);
  }
1177739
public Iterable<DConnection> queryByProviderId(java.lang.String providerId) {
    return queryByField(null, DConnectionMapper.Field.PROVIDERID.getFieldName(), providerId);
  }
337911
public static Update forEach(String field,
                                 UpdateQuery q,
                                 ForEachUpdate u) {
        Update x = new Update(false);
        ObjectNode fe = JsonNodeFactory.instance.objectNode();
        fe.set(field, q.toJson());
        fe.set("$update", u.toJson());
        ((ObjectNode) x.node).set("$foreach", fe);
        return x;
    }
117102
public DocumentT findOneAndUpdate(final Bson filter, final Bson update) {
    return operations.findOneAndModify(
            "findOneAndUpdate",
            filter,
            update,
            new RemoteFindOneAndModifyOptions(),
            documentClass).execute(service);
  }