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 Tasks of a Todolist container
|
java.util.List<java.lang.String> |
allUids()
Retrieve all
VTodo UIDs of this Todolist |
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
VTodo s to another Todolist |
Count |
count(ItemFlagFilter filter)
Count items matching an
ItemFlagFilter |
void |
create(java.lang.String uid,
VTodo todo)
Creates a new
VTodo entry. |
Ack |
createById(long id,
VTodo value)
Create a
VTodo |
void |
delete(java.lang.String uid)
Delete a
VTodo |
void |
deleteById(long id)
Delete a
VTodo |
ContainerChangeset<ItemVersion> |
filteredChangesetById(java.lang.Long since,
ItemFlagFilter filter) |
ItemValue<VTodo> |
getComplete(java.lang.String uid)
Fetch a
VTodo by its unique UID |
ItemValue<VTodo> |
getCompleteById(long id)
|
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
VTodo s to another Todolist |
void |
multipleDeleteById(java.util.List<java.lang.Long> ids) |
java.util.List<ItemValue<VTodo>> |
multipleGet(java.util.List<java.lang.String> uids)
Fetch multiple
VTodo s by their unique UIDs |
java.util.List<ItemValue<VTodo>> |
multipleGetById(java.util.List<java.lang.Long> ids)
Fetch multiple
VTodo s by their unique IDs |
void |
reset()
Delete all
VTodo s of this Todolist |
ListResult<ItemValue<VTodo>> |
search(VTodoQuery query)
Search
VTodo 's by VTodoQuery |
java.util.List<java.lang.Long> |
sortedIds(SortDescriptor sorted)
Get a sorted list (IDs according to the sorted list of items) of internal IDs
|
ContainerChangeset<java.lang.String> |
sync(java.lang.Long since,
VTodoChanges changes)
Client/Server synchronization of
VTodo s. |
void |
update(java.lang.String uid,
VTodo todo)
Modifies an existing
VTodo . |
Ack |
updateById(long id,
VTodo value)
Update a
VTodo |
ContainerUpdatesResult |
updates(VTodoChanges changes)
Updates multiple
VTodo s. |
void |
xfer(java.lang.String serverUid) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allIds
public java.util.List<ItemValue<VTodo>> all() throws ServerFault
ITodoList
all
in interface ITodoList
VTodo
of the containerServerFault
- common error objectpublic void create(java.lang.String uid, VTodo todo) throws ServerFault
ITodoList
VTodo
entry.create
in interface ITodoList
uid
- Unique entry UIDtodo
- VTodo
valuesServerFault
- common error objectpublic void update(java.lang.String uid, VTodo todo) throws ServerFault
ITodoList
VTodo
.update
in interface ITodoList
uid
- Unique entry UIDtodo
- VTodo
valuesServerFault
- common error objectpublic ItemValue<VTodo> getComplete(java.lang.String uid) throws ServerFault
ITodoList
VTodo
by its unique UIDgetComplete
in interface ITodoList
uid
- Unique entry UIDItemValue
containing a
VTodo
ServerFault
- common error objectpublic java.util.List<ItemValue<VTodo>> multipleGet(java.util.List<java.lang.String> uids) throws ServerFault
ITodoList
VTodo
s by their unique UIDsmultipleGet
in interface ITodoList
uids
- list of unique UIDsItemValue
s
containing VTodo
sServerFault
- common error objectpublic java.util.List<ItemValue<VTodo>> multipleGetById(java.util.List<java.lang.Long> ids) throws ServerFault
ITodoList
VTodo
s by their unique IDsmultipleGetById
in interface ITodoList
ids
- list of unique IDsItemValue
s
containing VTodo
sServerFault
- common error objectpublic void delete(java.lang.String uid) throws ServerFault
ITodoList
VTodo
delete
in interface ITodoList
uid
- unique UIDServerFault
- common error objectpublic ListResult<ItemValue<VTodo>> search(VTodoQuery query) throws ServerFault
ITodoList
VTodo
's by VTodoQuery
search
in interface ITodoList
query
- VTodoQuery
ListResult
of the matching
ItemValue
s containing a
VTodo
ServerFault
- common error objectpublic 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 ContainerChangeset<ItemVersion> filteredChangesetById(java.lang.Long since, ItemFlagFilter filter) throws ServerFault
filteredChangesetById
in interface IChangelogSupport
filter
- to exclude some items (eg. deleted items)ContainerChangeset
with internal
numeric ids matching the given filterServerFault
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
VTodo
s.updates
in interface ITodoList
changes
- VTodoChanges
containing the requested updatesContainerUpdatesResult
ServerFault
- common error objectpublic ContainerChangeset<java.lang.String> sync(java.lang.Long since, VTodoChanges changes) throws ServerFault
ITodoList
VTodo
s. Applies client changes and
returns server updates happened since since
parameter.sync
in interface ITodoList
since
- timestamp of the requested server updateschanges
- client updatesContainerChangeset
containing the server updatesServerFault
- common error objectpublic void copy(java.util.List<java.lang.String> uids, java.lang.String descContainerUid) throws ServerFault
ITodoList
VTodo
s to another Todolistcopy
in interface ITodoList
uids
- list of unique UIDsdescContainerUid
- the destination Todolist container UIDServerFault
- common error objectpublic void move(java.util.List<java.lang.String> uids, java.lang.String descContainerUid) throws ServerFault
ITodoList
VTodo
s to another Todolistmove
in interface ITodoList
uids
- list of unique UIDsdescContainerUid
- the destination Todolist container UIDServerFault
- common error objectpublic void reset() throws ServerFault
ITodoList
VTodo
s of this Todolistreset
in interface ITodoList
ServerFault
- common error objectpublic long getVersion() throws ServerFault
getVersion
in interface IChangelogSupport
ServerFault
public Count count(ItemFlagFilter filter) throws ServerFault
ICountingSupport
ItemFlagFilter
count
in interface ICountingSupport
ServerFault
public ItemValue<VTodo> getCompleteById(long id)
ITodoList
getCompleteById
in interface ICrudByIdSupport<VTodo>
getCompleteById
in interface ITodoList
id
- internal idItemValue
containing a VTodo
public Ack updateById(long id, VTodo value)
ITodoList
VTodo
updateById
in interface ICrudByIdSupport<VTodo>
updateById
in interface ITodoList
id
- internal idvalue
- VTodo
Ack
containing the new
version numberpublic Ack createById(long id, VTodo value)
ITodoList
VTodo
createById
in interface ICrudByIdSupport<VTodo>
createById
in interface ITodoList
id
- internal idvalue
- VTodo
Ack
containing the new
version numberpublic void deleteById(long id)
ITodoList
VTodo
deleteById
in interface ICrudByIdSupport<VTodo>
deleteById
in interface ITodoList
id
- internal idpublic java.util.List<java.lang.String> allUids() throws ServerFault
ITodoList
VTodo
UIDs of this TodolistallUids
in interface ITodoList
ServerFault
- common error objectpublic java.util.List<java.lang.Long> sortedIds(SortDescriptor sorted) throws ServerFault
ITodoList
sortedIds
in interface ISortingSupport
sortedIds
in interface ITodoList
sorted
- sorting criteriaServerFault
- common error objectpublic void xfer(java.lang.String serverUid) throws ServerFault
xfer
in interface IDataShardSupport
ServerFault
public void multipleDeleteById(java.util.List<java.lang.Long> ids) throws ServerFault
multipleDeleteById
in interface ICrudByIdSupport<VTodo>
ServerFault
Copyright © 2021. All Rights Reserved.