public class TodoListService extends java.lang.Object implements ITodoList
Constructor and Description |
---|
TodoListService(javax.sql.DataSource pool,
org.elasticsearch.client.Client esearchClient,
Container container,
BmContext bmContext) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ItemValue<VTodo>> |
all()
List all items from container
|
java.util.List<java.lang.String> |
allUids()
Returns all the items uid from the container
|
ContainerChangeset<java.lang.String> |
changeset(java.lang.Long since) |
ContainerChangeset<java.lang.Long> |
changesetById(java.lang.Long since) |
ContainerChangelog |
containerChangelog(java.lang.Long since) |
void |
copy(java.util.List<java.lang.String> uids,
java.lang.String descContainerUid)
Copy entries from one Todo List to another one
|
void |
create(java.lang.String uid,
VTodo todo)
Creates a new
VTodo entry. |
void |
delete(java.lang.String uid)
Delete
VTodo entry |
ItemValue<VTodo> |
getComplete(java.lang.String uid)
Fetch a
VTodo from its unique uid |
long |
getVersion() |
ItemChangelog |
itemChangelog(java.lang.String itemUid,
java.lang.Long since) |
void |
move(java.util.List<java.lang.String> uids,
java.lang.String descContainerUid)
Move entries from one Todo list to another one
|
java.util.List<ItemValue<VTodo>> |
multipleGet(java.util.List<java.lang.String> uids)
Fetch multiple
VTodo s from theirs uniques uids |
void |
reset() |
ListResult<ItemValue<VTodo>> |
search(VTodoQuery query)
ElasticSearch based
VTodo search |
ContainerChangeset<java.lang.String> |
sync(java.lang.Long since,
VTodoChanges changes)
Apply changes sent by client and return changes that happens on server since
since parameter. |
void |
update(java.lang.String uid,
VTodo todo)
Modifies an existing
VTodo entry. |
ContainerUpdatesResult |
updates(VTodoChanges changes)
Updates multiples entries at once (should be transactional: if one operation
fail, nothing is written)
|
public java.util.List<ItemValue<VTodo>> all() throws ServerFault
ITodoList
all
in interface ITodoList
VTodo
of the containerServerFault
public void create(java.lang.String uid, VTodo todo) throws ServerFault
ITodoList
VTodo
entry.create
in interface ITodoList
uid
- uid of the entrytodo
- value of the entryServerFault
public void update(java.lang.String uid, VTodo todo) throws ServerFault
ITodoList
VTodo
entry.update
in interface ITodoList
uid
- uid of the entrytodo
- value of the entryServerFault
public ItemValue<VTodo> getComplete(java.lang.String uid) throws ServerFault
ITodoList
VTodo
from its unique uidgetComplete
in interface ITodoList
ItemValue
ServerFault
public java.util.List<ItemValue<VTodo>> multipleGet(java.util.List<java.lang.String> uids) throws ServerFault
ITodoList
VTodo
s from theirs uniques uidsmultipleGet
in interface ITodoList
List>
ServerFault
public void delete(java.lang.String uid) throws ServerFault
ITodoList
VTodo
entrydelete
in interface ITodoList
ServerFault
public ListResult<ItemValue<VTodo>> search(VTodoQuery query) throws ServerFault
ITodoList
VTodo
searchsearch
in interface ITodoList
ServerFault
public ContainerChangelog containerChangelog(java.lang.Long since) throws ServerFault
containerChangelog
in interface IChangelogSupport
ContainerChangelog
ServerFault
public ContainerChangeset<java.lang.String> changeset(java.lang.Long since) throws ServerFault
changeset
in interface IChangelogSupport
ContainerChangeset
ServerFault
public ContainerChangeset<java.lang.Long> changesetById(java.lang.Long since) throws ServerFault
changesetById
in interface IChangelogSupport
ContainerChangeset
with internal
numeric idsServerFault
public ItemChangelog itemChangelog(java.lang.String itemUid, java.lang.Long since) throws ServerFault
itemChangelog
in interface IChangelogSupport
ContainerChangelog
ServerFault
public ContainerUpdatesResult updates(VTodoChanges changes) throws ServerFault
ITodoList
updates
in interface ITodoList
ServerFault
public ContainerChangeset<java.lang.String> sync(java.lang.Long since, VTodoChanges changes) throws ServerFault
ITodoList
since
parameter.sync
in interface ITodoList
ServerFault
public void copy(java.util.List<java.lang.String> uids, java.lang.String descContainerUid) throws ServerFault
ITodoList
copy
in interface ITodoList
ServerFault
public void move(java.util.List<java.lang.String> uids, java.lang.String descContainerUid) throws ServerFault
ITodoList
move
in interface ITodoList
ServerFault
public void reset() throws ServerFault
reset
in interface ITodoList
ServerFault
public long getVersion() throws ServerFault
getVersion
in interface IChangelogSupport
ServerFault
public java.util.List<java.lang.String> allUids() throws ServerFault
ITodoList
allUids
in interface ITodoList
ServerFault
Copyright © 2021. All Rights Reserved.