In Realm Javascript, it's possible to create an object by primary key and, if it already exists, update the existing object: https://realm.io/docs/javascript/latest/#creating-and-updating-objects-with-primary-keys
How can I achieve the same in Realm Java? Didn't find this function in the docs.