Saves the given valid entity, returning a possibly new entity representing the saved state. Note that certain implementations may not be able to detect whether a save or update should be performed and may always perform an insert. The CrudRepository.update(Object) method can be used in this case to explicitly request an update.