yes, there is certainly a more elegant way. You make one or more changes to your objects, you then commit them via the ObjectContext that was used to get the objects in the first place:
ObjectContext context = ...
List<MyEntity> objects = context.performQuery(...);
MyEntity o = objects.get(0);
o.setXyz("new value"); // I assume you got to this point
...
context.commitChanges();
The last line sends all your changes to the DB.