public synchronized void setRoot(Object root) {
		if (!opened) {
			throw new StorageError(StorageError.STORAGE_NOT_OPENED);
		}

		if (root == null) {
			header.root[1 - currIndex].rootObject = 0;
		}
		else {
			if (!isPersistent(root)) {
				storeObject0(root, false);
			}

			header.root[1 - currIndex].rootObject = getOid(root);
		}

		modified = true;
	}