public interface IUpdate extends ServiceInterface
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.
saveAndReturnIds(IObject[])
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.
Validation
,
Details
Modifier and Type | Method and Description |
---|---|
void |
deleteObject(IObject row)
Deletes a single entity.
|
void |
indexObject(IObject row)
Initiates full-text indexing for the given object.
|
IObject[] |
saveAndReturnArray(IObject[] graph) |
List<Long> |
saveAndReturnIds(IObject[] objects)
Logic differs from other methods.
|
<T extends IObject> |
saveAndReturnObject(T graph) |
void |
saveArray(IObject[] graph) |
void |
saveCollection(Collection<IObject> graph) |
void |
saveObject(IObject graph) |
List<Long> saveAndReturnIds(IObject[] objects)
IUpdate
void saveCollection(Collection<IObject> graph)
IUpdate
void deleteObject(IObject row) throws ValidationException
IDelete
which provide support for deleting entire
graphs of objects in the correct order.row
- a persistent IObject
to be deleted.ValidationException
- if the row is locked, has foreign key constraints, or is
otherwise marked un-deletable.void indexObject(IObject row) throws ValidationException
ome.services.fulltext.FullTextThread
to finish.
Can only be executed by an admin. Other users must wait for the
background Thread
to complete.row
- a persistent IObject
to be deletedValidationException
- if the object does not exist or is nul
Version: 5.2.0-ice35-b12
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.