R
- Operation result typeREFRESH
- Refresh result typeBI
- Bulk insert operation typeBU
- Bulk update operation typeBD
- Bulk delete operation typeQ
- Query builder typepublic interface DatastoreOperations<R,REFRESH,BI extends BulkInsertOperation<R,BI>,BU extends BulkUpdateOperation<R,BU>,BD extends BulkDeleteOperation<R,BD>,Q extends QueryBuilder<Q>>
To preserve abstraction and independence from the underlying persistence context, query and persistence methods rely
on the Property
abstraction to represent data attributes and on the PropertyBox
data container type
to transport data values in both directions.
Modifier and Type | Interface and Description |
---|---|
static interface |
DatastoreOperations.Builder<D extends DatastoreOperations,B extends DatastoreOperations.Builder<D,B>>
Base
DatastoreOperations instance builder. |
static interface |
DatastoreOperations.WriteOption
Represents a write operation option.
|
Modifier and Type | Method and Description |
---|---|
BD |
bulkDelete(DataTarget<?> target,
DatastoreOperations.WriteOption... options)
Create a
BulkDeleteOperation actuator, which can be used to configure and execute a bulk
DELETE operation. |
BI |
bulkInsert(DataTarget<?> target,
PropertySet<?> propertySet,
DatastoreOperations.WriteOption... options)
Create a
BulkInsertOperation actuator, which can be used to configure and execute a bulk
INSERT operation. |
BU |
bulkUpdate(DataTarget<?> target,
DatastoreOperations.WriteOption... options)
Create a
BulkUpdateOperation actuator, which can be used to configure and execute a bulk
UPDATE operation. |
R |
delete(DataTarget<?> target,
PropertyBox propertyBox,
DatastoreOperations.WriteOption... options)
Remove a
PropertyBox from the data store, using given target to denote the data store
persistent entity from which the data has to be deleted. |
R |
insert(DataTarget<?> target,
PropertyBox propertyBox,
DatastoreOperations.WriteOption... options)
Insert a
PropertyBox in the data store, using given target to denote the data store
persistent entity into which the data has to be inserted. |
Q |
query()
Create a
QueryBuilder actuator, which can be used to configure and execute a query on the data managed by
this Datastore. |
REFRESH |
refresh(DataTarget<?> target,
PropertyBox propertyBox)
Refresh a
PropertyBox , updating all its model properties to current value in data store and using given
target to denote the data store persistent entity to use. |
R |
save(DataTarget<?> target,
PropertyBox propertyBox,
DatastoreOperations.WriteOption... options)
Save a
PropertyBox in the data store, using given target to denote the data store persistent
entity into which the data has to be saved. |
R |
update(DataTarget<?> target,
PropertyBox propertyBox,
DatastoreOperations.WriteOption... options)
Update a
PropertyBox in the data store, using given target to denote the data store
persistent entity into which the data has to be updated. |
REFRESH refresh(DataTarget<?> target, PropertyBox propertyBox)
PropertyBox
, updating all its model properties to current value in data store and using given
target
to denote the data store persistent entity to use.target
- DataTarget
to declare the data store persistent entity from which data has to be refreshedpropertyBox
- The data to refresh, represented using a PropertyBox
(not null)DataAccessException
- If an error occurred during operation executionR insert(DataTarget<?> target, PropertyBox propertyBox, DatastoreOperations.WriteOption... options)
PropertyBox
in the data store, using given target
to denote the data store
persistent entity into which the data has to be inserted.target
- DataTarget
to declare the data store persistent entity into which the data has to be
inserted (not null)propertyBox
- The data to insert, represented using a PropertyBox
(not null)options
- Optional write options. The write options are specific for each concrete
DatastoreOperations
implementation.DataAccessException
- If an error occurred during operation executionR update(DataTarget<?> target, PropertyBox propertyBox, DatastoreOperations.WriteOption... options)
PropertyBox
in the data store, using given target
to denote the data store
persistent entity into which the data has to be updated.target
- DataTarget
to declare the data store persistent entity into which the data has to be
updated (not null)propertyBox
- The data to update, represented using a PropertyBox
(not null)options
- Optional write options. The write options are specific for each concrete
DatastoreOperations
implementation.DataAccessException
- If an error occurred during operation executionR save(DataTarget<?> target, PropertyBox propertyBox, DatastoreOperations.WriteOption... options)
PropertyBox
in the data store, using given target
to denote the data store persistent
entity into which the data has to be saved. The save operation semantics is: insert data if not exists,
update it otherwise.target
- DataTarget
to declare the data store persistent entity into which the data has to be saved
(not null)propertyBox
- The data to save, represented using a PropertyBox
(not null)options
- Optional write options. The write options are specific for each concrete
DatastoreOperations
implementation.DataAccessException
- If an error occurred during operation executionR delete(DataTarget<?> target, PropertyBox propertyBox, DatastoreOperations.WriteOption... options)
PropertyBox
from the data store, using given target
to denote the data store
persistent entity from which the data has to be deleted.target
- DataTarget
to declare the data store persistent entity from which the data has to be
deleted (not null)propertyBox
- The data to delete, represented using a PropertyBox
(not null)options
- Optional write options. The write options are specific for each concrete
DatastoreOperations
implementation.DataAccessException
- If an error occurred during operation executionBI bulkInsert(DataTarget<?> target, PropertySet<?> propertySet, DatastoreOperations.WriteOption... options)
BulkInsertOperation
actuator, which can be used to configure and execute a bulk
INSERT
operation.target
- DataTarget
to identify data entity to insert (not null)propertySet
- The property set to use to perform insert operations. Only the properties contained in given
property set will be taken into account to insert the PropertyBox
valuesoptions
- Optional write options. The write options are specific for each concrete
DatastoreOperations
implementation.INSERT
operationBU bulkUpdate(DataTarget<?> target, DatastoreOperations.WriteOption... options)
BulkUpdateOperation
actuator, which can be used to configure and execute a bulk
UPDATE
operation.target
- DataTarget
to identify data entity to update (not null)options
- Optional write options. The write options are specific for each concrete
DatastoreOperations
implementation.UPDATE
operationBD bulkDelete(DataTarget<?> target, DatastoreOperations.WriteOption... options)
BulkDeleteOperation
actuator, which can be used to configure and execute a bulk
DELETE
operation.target
- DataTarget
to identify data entity to delete (not null)options
- Optional write options. The write options are specific for each concrete
DatastoreOperations
implementation.DELETE
operationQ query()
QueryBuilder
actuator, which can be used to configure and execute a query on the data managed by
this Datastore.Copyright © 2019 The Holon Platform. All rights reserved.