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 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 à charger
        dtDefinition - Definition
        Returns:
        D correspondant à l'URI fournie.
      • findAll

        <E extends EntityDtList<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 à charger
        dtDefinition - Definition
        Returns:
        DtList Liste correspondant à l'URI fournie
      • findAll

        <E extends EntityDtList<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 à charger
        dtDefinition - 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 - Definition
        entity - 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 - Definition
        entity - Object to update
      • delete

        void delete​(DtDefinition dtDefinition,
                    UID<?> uid)
        Deletes an object identified by an uri.
        Parameters:
        dtDefinition - Definition
        uid - 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 definition
        uid - Object's uid
        Returns:
        D Object value.
      • findByCriteria

        <E extends EntityDtList<E> findByCriteria​(DtDefinition dtDefinition,
                                                    Criteria<E> criteria,
                                                    DtListState dtListState)
        Finds a lists of entities matching a criteria.
        Parameters:
        dtDefinition - the definition of entities to find
        criteria - the criteria to match
        dtListState - listState of rows to retrieve
        Returns:
        the list