Interface Storage

    • Method Detail

      • initialize

        void initialize​(String type)
        Bootstrap your storage here
        Parameters:
        type - the type
      • get

        Map<String,​Object> get​(String id)
        Gets a entity by id
        Parameters:
        id - the id of the entity
        Returns:
        the entity
      • get

        Map<String,​Object> get​(String id,
                                     String version)
        Gets a antity by id and version
        Parameters:
        id - the id of the entity
        version - the version of the entity
        Returns:
        the entity
      • getVersions

        List<String> getVersions​(String id)
        Gets the version of a specific entity
        Parameters:
        id - the id of the entity
        Returns:
        a list containing the versions
      • delete

        boolean delete​(String id)
        Deletes a entity by id
        Parameters:
        id - the id of the entity
        Returns:
        boolean indicating success
      • deleteAll

        boolean deleteAll()
        Deletes all entities
        Returns:
        boolean indicating success
      • search

        List<Map> search​(be.personify.util.SearchCriteria searchCriteria,
                         int start,
                         int count,
                         String sortBy,
                         String sortOrder,
                         List<String> includeAttributes)
        Searches entities
        Parameters:
        searchCriteria - the searchcriteria
        start - the start position
        count - the number of results to returm
        sortBy - the sortby attributes separated by a comma
        sortOrder - the sortorder ( ascending or descending )
        Returns:
        a list containing the entities
      • search

        List<Map> search​(be.personify.util.SearchCriteria searchCriteria,
                         int start,
                         int count,
                         String sortBy,
                         String sortOrder)
      • count

        long count​(be.personify.util.SearchCriteria searchCriteria)
        Counts the results giving a searchcrtieria
        Parameters:
        searchCriteria - the searchcriteria
        Returns:
        a long indicating the number of results
      • flush

        void flush()
        Optional to implement : persist