Interface EntityStorePlugin
-
- All Superinterfaces:
io.vertigo.core.node.component.CoreComponent
,io.vertigo.core.node.component.Plugin
- All Known Implementing Classes:
AbstractStaticEntityStorePlugin
,SqlEntityStorePlugin
public interface EntityStorePlugin extends io.vertigo.core.node.component.Plugin
The DataStorePlugin class defines the logical way used to read and write data in a data store. This plugin can be implemented in a sql or no sql way. this datatore is linked to a dataSpace. Several dtDefinition can be included in a dataSpace.- Author:
- pchretien
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
count(DtDefinition dtDefinition)
Returns the number of elements contained in the definition.<E extends Entity>
Ecreate(DtDefinition dtDefinition, E entity)
Creates an object.void
delete(DtDefinition dtDefinition, UID<?> uid)
Deletes an object identified by an uri.<E extends Entity>
DtList<E>findAll(DtDefinition dtDefinition, DtListURIForNNAssociation uid)
Récupération d'une liste correspondant à l'URI fournie.<E extends Entity>
DtList<E>findAll(DtDefinition dtDefinition, DtListURIForSimpleAssociation uid)
Récupération d'une liste correspondant à l'URI fournie.<E extends Entity>
DtList<E>findByCriteria(DtDefinition dtDefinition, Criteria<E> criteria, DtListState dtListState)
Finds a lists of entities matching a criteria.String
getConnectionName()
String
getDataSpace()
<E extends Entity>
EreadNullable(DtDefinition dtDefinition, UID<E> uid)
Récupération de l'objet correspondant à l'URI fournie.<E extends Entity>
EreadNullableForUpdate(DtDefinition dtDefinition, UID<?> uid)
Loads for update.void
update(DtDefinition dtDefinition, Entity entity)
Updates an object.
-
-
-
Method Detail
-
getDataSpace
String getDataSpace()
- Returns:
- the dataSpace
-
getConnectionName
String getConnectionName()
- Returns:
- the name of the connection
-
count
int count(DtDefinition dtDefinition)
Returns the number of elements contained in the definition.- Parameters:
dtDefinition
- Définition de DT- Returns:
- the number of elements
-
readNullable
<E extends Entity> E readNullable(DtDefinition dtDefinition, UID<E> uid)
Récupération de l'objet correspondant à l'URI fournie.- Type Parameters:
E
- the type of entity- Parameters:
uid
- UID de l'objet à chargerdtDefinition
- Definition- Returns:
- D correspondant à l'URI fournie.
-
findAll
<E extends Entity> DtList<E> findAll(DtDefinition dtDefinition, DtListURIForNNAssociation uid)
Récupération d'une liste correspondant à l'URI fournie. NOT NULL- Type Parameters:
E
- the type of entity- Parameters:
uid
- UID de la collection à chargerdtDefinition
- Definition- Returns:
- DtList
Liste correspondant à l'URI fournie
-
findAll
<E extends Entity> DtList<E> findAll(DtDefinition dtDefinition, DtListURIForSimpleAssociation uid)
Récupération d'une liste correspondant à l'URI fournie. NOT NULL- Type Parameters:
E
- the type of entity- Parameters:
uid
- UID de la collection à chargerdtDefinition
- Definition- Returns:
- DtList
Liste correspondant à l'URI fournie
-
create
<E extends Entity> E create(DtDefinition dtDefinition, E entity)
Creates an object. No object with the same id must have been created previously.- Parameters:
dtDefinition
- Definitionentity
- Object to create- Returns:
- the created entity
-
update
void update(DtDefinition dtDefinition, Entity entity)
Updates an object. This object must have an id.- Parameters:
dtDefinition
- Definitionentity
- Object to update
-
delete
void delete(DtDefinition dtDefinition, UID<?> uid)
Deletes an object identified by an uri.- Parameters:
dtDefinition
- Definitionuid
- UID
-
readNullableForUpdate
<E extends Entity> E readNullableForUpdate(DtDefinition dtDefinition, UID<?> uid)
Loads for update.- Type Parameters:
E
- the type of entity- Parameters:
dtDefinition
- Object's definitionuid
- Object's uid- Returns:
- D Object value.
-
findByCriteria
<E extends Entity> DtList<E> findByCriteria(DtDefinition dtDefinition, Criteria<E> criteria, DtListState dtListState)
Finds a lists of entities matching a criteria.- Parameters:
dtDefinition
- the definition of entities to findcriteria
- the criteria to matchdtListState
- listState of rows to retrieve- Returns:
- the list
-
-