public class NoteService extends java.lang.Object implements INote
Constructor and Description |
---|
NoteService(javax.sql.DataSource pool,
org.elasticsearch.client.Client esearchClient,
Container container,
BmContext bmContext) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ItemValue<VNote>> |
all()
List all Notes of a container
|
java.util.List<java.lang.String> |
allUids()
Retrieve all
VNote UIDs of this user |
ContainerChangeset<java.lang.String> |
changeset(java.lang.Long since) |
ContainerChangeset<java.lang.Long> |
changesetById(java.lang.Long since) |
ContainerChangelog |
containerChangelog(java.lang.Long since) |
Count |
count(ItemFlagFilter filter)
Count items matching an
ItemFlagFilter |
void |
create(java.lang.String uid,
VNote note)
Creates a new
VNote entry. |
Ack |
createById(long id,
VNote value)
Create a
VNote |
void |
delete(java.lang.String uid)
Delete a
VNote |
void |
deleteById(long id)
Delete a
VNote |
ContainerChangeset<ItemVersion> |
filteredChangesetById(java.lang.Long since,
ItemFlagFilter filter) |
VNote |
get(java.lang.String uid) |
ItemValue<VNote> |
getComplete(java.lang.String uid)
Fetch a
VNote by its unique UID |
ItemValue<VNote> |
getCompleteById(long id)
|
long |
getVersion() |
ItemChangelog |
itemChangelog(java.lang.String itemUid,
java.lang.Long since) |
void |
multipleDeleteById(java.util.List<java.lang.Long> ids) |
java.util.List<ItemValue<VNote>> |
multipleGet(java.util.List<java.lang.String> uids)
Fetch multiple
VNote s by their unique UIDs |
java.util.List<ItemValue<VNote>> |
multipleGetById(java.util.List<java.lang.Long> ids)
Fetch multiple
VNote s by their unique IDs |
void |
reset()
Delete all
VNote s of this user |
void |
restore(ItemValue<VNote> noteItem,
boolean isCreate) |
ListResult<ItemValue<VNote>> |
search(VNoteQuery query)
Search
VNote 's by VNoteQuery |
java.util.List<java.lang.Long> |
sortedIds(SortDescriptor sorted)
Get a sorted list (IDs according to the sorted list of items) of internal IDs
|
void |
update(java.lang.String uid,
VNote note)
Modifies an existing
VNote . |
Ack |
updateById(long id,
VNote value)
Update a
VNote |
ContainerUpdatesResult |
updates(VNoteChanges changes)
Updates multiple
VNote s. |
void |
xfer(java.lang.String serverUid) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allIds
public java.util.List<ItemValue<VNote>> all() throws ServerFault
INote
all
in interface INote
VNote
of the containerServerFault
- common error objectpublic void create(java.lang.String uid, VNote note) throws ServerFault
INote
VNote
entry.create
in interface INote
uid
- Unique entry UIDnote
- VNote
valuesServerFault
- common error objectpublic void update(java.lang.String uid, VNote note) throws ServerFault
INote
VNote
.update
in interface INote
uid
- Unique entry UIDnote
- VNote
valuesServerFault
- common error objectpublic ItemValue<VNote> getComplete(java.lang.String uid) throws ServerFault
INote
VNote
by its unique UIDgetComplete
in interface INote
uid
- Unique entry UIDItemValue
containing a
VNote
ServerFault
- common error objectpublic java.util.List<ItemValue<VNote>> multipleGet(java.util.List<java.lang.String> uids) throws ServerFault
INote
VNote
s by their unique UIDsmultipleGet
in interface INote
uids
- list of unique UIDsItemValue
s
containing VNote
sServerFault
- common error objectpublic java.util.List<ItemValue<VNote>> multipleGetById(java.util.List<java.lang.Long> ids) throws ServerFault
INote
VNote
s by their unique IDsmultipleGetById
in interface IReadByIdSupport<VNote>
multipleGetById
in interface INote
ids
- list of unique IDsItemValue
s
containing VNote
sServerFault
- common error objectpublic void delete(java.lang.String uid) throws ServerFault
INote
VNote
delete
in interface IRestoreCrudSupport<VNote>
delete
in interface INote
uid
- unique UIDServerFault
- 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 void reset() throws ServerFault
INote
VNote
s of this userreset
in interface INote
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<VNote> getCompleteById(long id)
INote
getCompleteById
in interface IReadByIdSupport<VNote>
getCompleteById
in interface INote
id
- internal idItemValue
containing a VNote
public Ack updateById(long id, VNote value)
INote
VNote
updateById
in interface ICrudByIdSupport<VNote>
updateById
in interface INote
id
- internal idvalue
- VNote
Ack
containing the new
version numberpublic Ack createById(long id, VNote value)
INote
VNote
createById
in interface ICrudByIdSupport<VNote>
createById
in interface INote
id
- internal idvalue
- VNote
Ack
containing the new
version numberpublic void deleteById(long id)
INote
VNote
deleteById
in interface ICrudByIdSupport<VNote>
deleteById
in interface INote
id
- internal idpublic java.util.List<java.lang.String> allUids() throws ServerFault
INote
VNote
UIDs of this userallUids
in interface INote
ServerFault
- common error objectpublic java.util.List<java.lang.Long> sortedIds(SortDescriptor sorted) throws ServerFault
INote
sortedIds
in interface ISortingSupport
sortedIds
in interface INote
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<VNote>
ServerFault
public ListResult<ItemValue<VNote>> search(VNoteQuery query) throws ServerFault
INote
VNote
's by VNoteQuery
search
in interface INote
query
- VNoteQuery
ListResult
of the matching
ItemValue
s containing a
VNote
ServerFault
- common error objectpublic ContainerUpdatesResult updates(VNoteChanges changes) throws ServerFault
INote
VNote
s.updates
in interface INote
changes
- VNoteChanges
containing the requested updatesContainerUpdatesResult
ServerFault
- common error objectpublic VNote get(java.lang.String uid)
get
in interface IRestoreSupport<VNote>
public void restore(ItemValue<VNote> noteItem, boolean isCreate)
restore
in interface IRestoreSupport<VNote>
Copyright © 2023. All Rights Reserved.