public interface BeanDatastore extends BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>, DatastoreCommodityHandler, ExpressionResolver.ExpressionResolverSupport, DataContextBound
Datastore adapter which uses Java Beans as persistent data representation.
The operations data target (i.e. the persistence entity identifier) is obtained by default using the bean class
simple name. The DataPath annotation can be used on bean class to declare a specific data target name.
The bean property names are used as data model attribute names. The DataPath annotation can be used on bean
property fields or getter methods to specify a different data model attribute name.
The of(Datastore) builder method can be used to obtain a BeanDatastore from a concrete
Datastore instance.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
BeanDatastore.BeanOperationResult<T>
Represents the result of a
BeanDatastore operation, providing informatons about the operation outcome. |
| Modifier and Type | Method and Description |
|---|---|
<T> BeanBulkDelete<T> |
bulkDelete(Class<T> beanClass,
DatastoreOperations.WriteOption... options)
Create a
BulkDeleteOperation actuator, which can be used to configure and execute a bulk
DELETE operation. |
<T> BeanBulkInsert<T> |
bulkInsert(Class<T> beanClass,
DatastoreOperations.WriteOption... options)
Create a
BulkInsertOperation actuator, which can be used to configure and execute a bulk
INSERT operation. |
<T> BeanBulkUpdate<T> |
bulkUpdate(Class<T> beanClass,
DatastoreOperations.WriteOption... options)
Create a
BulkUpdateOperation actuator, which can be used to configure and execute a bulk
UPDATE operation. |
<T> BeanDatastore.BeanOperationResult<T> |
delete(T bean,
DatastoreOperations.WriteOption... options)
Remove a bean instance from the data store.
|
<T> BeanDatastore.BeanOperationResult<T> |
insert(T bean,
DatastoreOperations.WriteOption... options)
Insert a bean instance in the data store.
|
Optional<Transactional> |
isTransactional()
Check if the concrete
Datastore is Transactional, i.e. |
static BeanDatastore |
of(Datastore datastore)
|
<T> BeanQuery<T> |
query(Class<T> beanClass)
Create a
QueryBuilder actuator, which can be used to configure and execute a query on the data managed by
this Datastore. |
Transactional |
requireTransactional()
Requires the concrete
Datastore to be Transactional, i.e. |
<T> BeanDatastore.BeanOperationResult<T> |
save(T bean,
DatastoreOperations.WriteOption... options)
Save a bean instance in the data store.
|
<T> BeanDatastore.BeanOperationResult<T> |
update(T bean,
DatastoreOperations.WriteOption... options)
Update a bean instance in the data store.
|
refreshcreate, getAvailableCommodities, hasCommodityaddExpressionResolver, addExpressionResolvers, removeExpressionResolvergetDataContextId<T> BeanDatastore.BeanOperationResult<T> insert(T bean, DatastoreOperations.WriteOption... options)
BeanDatastoreOperations
The operation data target (i.e. the persistence entity identifier) is obtained by default using the bean class
simple name. The DataPath annotation can be used on bean class to declare a specific data target name.
The bean property names are used as data model attribute names. The DataPath annotation can be used on
bean property fields or getter methods to specify a different data model attribute name.
insert in interface BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>T - Bean typebean - The bean instance to insert (not null)options - Optional write options. The write options are specific for each concrete implementation.<T> BeanDatastore.BeanOperationResult<T> update(T bean, DatastoreOperations.WriteOption... options)
BeanDatastoreOperations
The operation data target (i.e. the persistence entity identifier) is obtained by default using the bean class
simple name. The DataPath annotation can be used on bean class to declare a specific data target name.
The bean property names are used as data model attribute names. The DataPath annotation can be used on
bean property fields or getter methods to specify a different data model attribute name.
update in interface BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>T - Bean typebean - The bean instance to insert (not null)options - Optional write options. The write options are specific for each concrete implementation.<T> BeanDatastore.BeanOperationResult<T> save(T bean, DatastoreOperations.WriteOption... options)
BeanDatastoreOperations
The operation data target (i.e. the persistence entity identifier) is obtained by default using the bean class
simple name. The DataPath annotation can be used on bean class to declare a specific data target name.
The bean property names are used as data model attribute names. The DataPath annotation can be used on
bean property fields or getter methods to specify a different data model attribute name.
save in interface BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>T - Bean typebean - The bean instance to save (not null)options - Optional write options. The write options are specific for each concrete implementation.<T> BeanDatastore.BeanOperationResult<T> delete(T bean, DatastoreOperations.WriteOption... options)
BeanDatastoreOperations
The operation data target (i.e. the persistence entity identifier) is obtained by default using the bean class
simple name. The DataPath annotation can be used on bean class to declare a specific data target name.
The bean property names are used as data model attribute names. The DataPath annotation can be used on
bean property fields or getter methods to specify a different data model attribute name.
delete in interface BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>T - Bean typebean - The bean instance to delete (not null)options - Optional write options. The write options are specific for each concrete implementation.<T> BeanBulkInsert<T> bulkInsert(Class<T> beanClass, DatastoreOperations.WriteOption... options)
BeanDatastoreOperationsBulkInsertOperation actuator, which can be used to configure and execute a bulk
INSERT operation.bulkInsert in interface BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>T - Bean typebeanClass - The bean class to insertoptions - Optional write options. The write options are specific for each concrete implementation.INSERT operation<T> BeanBulkUpdate<T> bulkUpdate(Class<T> beanClass, DatastoreOperations.WriteOption... options)
BeanDatastoreOperationsBulkUpdateOperation actuator, which can be used to configure and execute a bulk
UPDATE operation.bulkUpdate in interface BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>T - Bean typebeanClass - The bean class to updateoptions - Optional write options. The write options are specific for each concrete implementation.UPDATE operation<T> BeanBulkDelete<T> bulkDelete(Class<T> beanClass, DatastoreOperations.WriteOption... options)
BeanDatastoreOperationsBulkDeleteOperation actuator, which can be used to configure and execute a bulk
DELETE operation.bulkDelete in interface BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>T - Bean typebeanClass - The bean class to deleteoptions - Optional write options. The write options are specific for each concrete implementation.DELETE operation<T> BeanQuery<T> query(Class<T> beanClass)
BeanDatastoreOperationsQueryBuilder actuator, which can be used to configure and execute a query on the data managed by
this Datastore.query in interface BeanDatastoreOperations<BeanDatastore.BeanOperationResult<?>,BeanBulkInsert<?>,BeanBulkUpdate<?>,BeanBulkDelete<?>,BeanQuery<?>>T - Bean typebeanClass - The bean class to query (not null)Optional<Transactional> isTransactional()
Datastore is Transactional, i.e. supports execution of transactional
operations.Transactional, or an empty Optional
otherwiseTransactional requireTransactional()
Datastore to be Transactional, i.e. to support execution of transactional
operations, throwing an IllegalStateException if this Datastore is not transactional.TransactionalIllegalStateException - If this Datastore is not transactionalstatic BeanDatastore of(Datastore datastore)
datastore - The concrete Datastore to use for persistence operations (not null)BeanDatastore adapter which uses given DatastoreCopyright © 2019 The Holon Platform. All rights reserved.