Package io.vertigo.datastore.entitystore
Interface EntityStoreManager
-
- All Superinterfaces:
io.vertigo.core.node.component.Component
,io.vertigo.core.node.component.CoreComponent
,io.vertigo.core.node.component.Manager
- All Known Implementing Classes:
EntityStoreManagerImpl
public interface EntityStoreManager extends io.vertigo.core.node.component.Manager
Defines the way to acces and store all the data. Les méthodes de mises à jour lacent des erreurs utilisateurs et techniques. Les méthodes d'accès aux données ne lancent que des erreurs techniques.- Author:
- pchretien
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAIN_DATA_SPACE_NAME
Main DataSpace's name.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
count(DtDefinition dtDefinition)
Nombre d'éléments présents dans le sysème de persistance.<E extends Entity>
Ecreate(E entity)
Create an object.void
delete(UID<? extends Entity> uid)
Destruction d'un objet persistant par son UID.<E extends Entity>
DtList<E>find(DtDefinition dtDefinition, Criteria<E> criteria, DtListState dtListState)
Returns a list identified by criteria<E extends Entity>
DtList<E>findAll(DtListURI uid)
Récupération d'une liste identifiée par son UID.BrokerNN
getBrokerNN()
Return the a dedicated object that handles NN associationsEntityStoreConfig
getDataStoreConfig()
MasterDataConfig
getMasterDataConfig()
<E extends Entity>
EreadOne(UID<E> uid)
Récupération d'un objet persistant par son UID.<E extends Entity>
EreadOneForUpdate(UID<E> uid)
Loads and marks element for update, and ensure non concurrency.<D extends DtObject>
DtList<D>sort(DtList<D> list, String fieldName, boolean desc)
Sorts a list from a column.void
update(Entity entity)
Update an object.
-
-
-
Field Detail
-
MAIN_DATA_SPACE_NAME
static final String MAIN_DATA_SPACE_NAME
Main DataSpace's name.- See Also:
- Constant Field Values
-
-
Method Detail
-
count
int count(DtDefinition dtDefinition)
Nombre d'éléments présents dans le sysème de persistance.- Parameters:
dtDefinition
- Définition de DT- Returns:
- Nombre d'éléments.
-
readOne
<E extends Entity> E readOne(UID<E> uid)
Récupération d'un objet persistant par son UID. Lorsque l'objet est en lecture seule il est possible d'accéder au objets partagés. (Liste de référence par ex) L'objet doit exister.- Type Parameters:
E
- the type of entity- Parameters:
uid
- UID de l'object- Returns:
- object récupéré NOT NULL
-
findAll
<E extends Entity> DtList<E> findAll(DtListURI uid)
Récupération d'une liste identifiée par son UID.- Type Parameters:
E
- the type of entity- Parameters:
uid
- UID de la collection à récupérer- Returns:
- DtList DTC
-
readOneForUpdate
<E extends Entity> E readOneForUpdate(UID<E> uid)
Loads and marks element for update, and ensure non concurrency. Fire an update event for this uid on eventbus after commit.- Type Parameters:
E
- the type of entity- Parameters:
uid
- UID of object- Returns:
- object to update
-
create
<E extends Entity> E create(E entity)
Create an object. No object with the same id must have been created previously.- Parameters:
entity
- the entity to create- Returns:
- the created object
-
update
void update(Entity entity)
Update an object. This object must have an id.- Parameters:
entity
- the entity to update
-
delete
void delete(UID<? extends Entity> uid)
Destruction d'un objet persistant par son UID.- Parameters:
uid
- UID de l'objet à supprimer
-
find
<E extends Entity> DtList<E> find(DtDefinition dtDefinition, Criteria<E> criteria, DtListState dtListState)
Returns a list identified by criteria- Parameters:
dtDefinition
- the list definitioncriteria
- criteriadtListState
- request state : sort, top, offset- Returns:
- list
-
sort
<D extends DtObject> DtList<D> sort(DtList<D> list, String fieldName, boolean desc)
Sorts a list from a column.- Parameters:
list
- the list to sortfieldName
- the field namedesc
- if the sotr is desc- Returns:
- the sorted list
-
getBrokerNN
BrokerNN getBrokerNN()
Return the a dedicated object that handles NN associations- Returns:
- the handler for NN Associations
-
getDataStoreConfig
EntityStoreConfig getDataStoreConfig()
-
getMasterDataConfig
MasterDataConfig getMasterDataConfig()
-
-