OmeroBlitz API
Home Previous Up Next Index

omero::api::IUpdate

Overview

[ "ami", "amd" ] interface IUpdate extends ServiceInterface

Provides methods for directly updating object graphs. IUpdate is the lowest level (level-1) interface which may make changes (INSERT, UPDATE, DELETE) to the database. All other methods of changing the database may leave it in an inconsistent state.

All the save* methods act recursively on the entire object graph, replacing placeholders and details where necessary, and then merging the final graph. This means that the objects that are passed into IUpdate.save* methods are copied over to new instances which are then returned. The original objects should be discarded.

{@code saveAndReturnIds} behaves slightly differently in that it does not handle object modifications. The graph of objects passed in can consist ONLY if either newly created objects without ids or of unloaded objects with ids. Note: The ids of the saved values may not be in order. This is caused by persistence-by-transitivity. Hibernate may detect an item later in the array if they are interconnected and therefore choose to save it first.

All methods throw ValidationException if the input objects do not pass validation, and OptimisticLockException if the version of a given has already been incremented.

Operation Index

saveObject
saveCollection
saveAndReturnObject
saveArray
saveAndReturnArray
saveAndReturnIds
deleteObject

Deprecated.

indexObject
Initiates full-text indexing for the given object.

Operations

void saveObject(model::IObject obj) throws ServerError

void saveCollection(IObjectList objs) throws ServerError

model::IObject saveAndReturnObject(model::IObject obj) throws ServerError

void saveArray(IObjectList graph) throws ServerError

IObjectList saveAndReturnArray(IObjectList graph) throws ServerError

sys::LongList saveAndReturnIds(IObjectList graph) throws ServerError

void deleteObject(model::IObject row) throws ServerError

use omero::cmd::Delete2 instead

void indexObject(model::IObject row) throws ServerError

Initiates full-text indexing for the given object. This may have to wait for the current {@code FullTextThread} to finish. Can only be executed by an admin. Other users must wait for the background Thread to complete.

Parameters

row
a persistent model::IObject to be deleted

Exceptions

ValidationException
if the object does not exist or is nul

Home Previous Up Next Index