- Type Parameters:
E
- the entity typeID
- the identifier type
- All Superinterfaces:
Data.BasicRepository<E,
,ID> Data.GenericRepository<E,
ID>
- Enclosing class:
Data
Data repository interface for CRUD entity operations.
CRUD entity operations are:
- Create
- Read
- Update
- Delete
-
Method Summary
Methods inherited from interface io.helidon.data.Data.BasicRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findById, save, saveAll
-
Method Details
-
insert
Insert provided entity. This method will insert a new record into the database. The operation will fail if the record is already present in the database.- Type Parameters:
T
- type of the entity- Parameters:
entity
- the entity to persist, shall not benull
- Returns:
- persisted entity, never returns
null
- Throws:
DataException
- if the entity isnull
or the operation has failed
-
insertAll
Insert all provided entities. This method will insert a new record into the database. The operation will fail if the record is already present in the database or entities are not unique.- Type Parameters:
T
- type of the entity- Parameters:
entities
- the entities to persist, shall not benull
- Returns:
- persisted entity, never returns
null
- Throws:
DataException
- if the entity isnull
or the operation has failed
-
update
Update provided entity. This operation will fail if the record is not already present in the database.- Type Parameters:
T
- type of the entity- Parameters:
entity
- the entity to persist, shall not benull
- Returns:
- updated entity, never returns
null
- Throws:
DataException
- if the entity isnull
or the operation has failed
-
updateAll
Update all provided entities. This operation will fail if the record is not already present in the database.- Type Parameters:
T
- type of the entity- Parameters:
entities
- the entities to persist, shall not benull
- Returns:
- updated entities, never returns
null
- Throws:
DataException
- if the entities arenull
or the operation has failed
-