public interface NetworkEntityService<T> extends MachineTagService, TagService, CommentService, IdentifierService, EndpointService, ContactService
Modifier and Type | Method and Description |
---|---|
UUID |
create(T entity)
Creates a new entity.
|
void |
delete(@NotNull UUID key)
Deletes an entity by the provided key.
|
T |
get(@NotNull UUID key)
Gets an entity by the provided key.
|
Map<UUID,String> |
getTitles(@NotNull Collection<UUID> keys)
Retrieves all titles for the requested entity keys in one go
|
PagingResponse<T> |
list(Pageable page)
Deprecated.
|
PagingResponse<T> |
listByIdentifier(IdentifierType type,
String identifier,
Pageable page)
Deprecated.
|
PagingResponse<T> |
listByIdentifier(String identifier,
Pageable page)
Deprecated.
|
PagingResponse<T> |
listByMachineTag(String namespace,
String name,
String value,
Pageable page)
Deprecated.
|
PagingResponse<T> |
search(String query,
Pageable page)
Deprecated.
|
void |
update(T entity)
Updates an existing entity.
|
addMachineTag, addMachineTag, addMachineTag, deleteMachineTag, deleteMachineTags, deleteMachineTags, deleteMachineTags, deleteMachineTags, listMachineTags
addTag, addTag, deleteTag, listTags
addComment, deleteComment, listComments
addIdentifier, deleteIdentifier, listIdentifiers
addEndpoint, deleteEndpoint, listEndpoints
addContact, deleteContact, listContacts, updateContact
UUID create(@NotNull @Valid T entity)
entity
- to createvoid update(@NotNull @Valid T entity)
entity
- to update.void delete(@NotNull @NotNull UUID key)
key
- of the entity to delete.T get(@NotNull @NotNull UUID key)
key
- of the entity to getMap<UUID,String> getTitles(@NotNull @NotNull Collection<UUID> keys)
keys
- entity keys to get titles@Deprecated PagingResponse<T> list(@Nullable Pageable page)
To iterate over all entities you can use code like this: PagingRequest req =
new PagingRequest(); PagingResponse<T> response; do { response = service.list(req); for (T obj
: response.getResults()) { doStuff(); } req.nextPage(); } while (!response.isEndOfRecords());
Deprecated: use the list with parameters service.
@Deprecated PagingResponse<T> search(String query, @Nullable Pageable page)
Deprecated: use the list with parameters service.
@Deprecated PagingResponse<T> listByIdentifier(IdentifierType type, String identifier, @Nullable Pageable page)
Deprecated: use the list with parameters service.
@Deprecated PagingResponse<T> listByIdentifier(String identifier, @Nullable Pageable page)
Deprecated: use the list with parameters service.
@Deprecated PagingResponse<T> listByMachineTag(String namespace, @Nullable String name, @Nullable String value, @Nullable Pageable page)
Deprecated: use the list with parameters service.
Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.