Class OrientDBStorage

  • All Implemented Interfaces:
    Storage, org.springframework.beans.factory.DisposableBean

    public class OrientDBStorage
    extends Object
    implements Storage, org.springframework.beans.factory.DisposableBean
    Author:
    wouter vdb
    • Constructor Detail

      • OrientDBStorage

        public OrientDBStorage()
    • Method Detail

      • get

        public Map<String,​Object> get​(String id)
        Description copied from interface: Storage
        Gets a entity by id
        Specified by:
        get in interface Storage
        Parameters:
        id - the id of the entity
        Returns:
        the entity
      • delete

        public boolean delete​(String id)
        Description copied from interface: Storage
        Deletes a entity by id
        Specified by:
        delete in interface Storage
        Parameters:
        id - the id of the entity
        Returns:
        boolean indicating success
      • deleteAll

        public boolean deleteAll()
        Description copied from interface: Storage
        Deletes all entities
        Specified by:
        deleteAll in interface Storage
        Returns:
        boolean indicating success
      • update

        public void update​(String id,
                           Map<String,​Object> object)
        Description copied from interface: Storage
        Updates a entity
        Specified by:
        update in interface Storage
        Parameters:
        id - the id of the entity
        object - the entity itself
      • search

        public List<Map> search​(be.personify.util.SearchCriteria searchCriteria,
                                int start,
                                int count,
                                String sortBy,
                                String sortOrder)
        Specified by:
        search in interface Storage
      • search

        public List<Map> search​(be.personify.util.SearchCriteria searchCriteria,
                                int start,
                                int count,
                                String sortBy,
                                String sortOrder,
                                List<String> includeAttributes)
        Description copied from interface: Storage
        Searches entities
        Specified by:
        search in interface Storage
        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
      • count

        public long count​(be.personify.util.SearchCriteria searchCriteria)
        Description copied from interface: Storage
        Counts the results giving a searchcrtieria
        Specified by:
        count in interface Storage
        Parameters:
        searchCriteria - the searchcriteria
        Returns:
        a long indicating the number of results
      • flush

        public void flush()
        Description copied from interface: Storage
        Optional to implement : persist
        Specified by:
        flush in interface Storage
      • initialize

        public void initialize​(String type)
        Description copied from interface: Storage
        Bootstrap your storage here
        Specified by:
        initialize in interface Storage
        Parameters:
        type - the type
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
      • get

        public Map<String,​Object> get​(String id,
                                            String version)
        Description copied from interface: Storage
        Gets a antity by id and version
        Specified by:
        get in interface Storage
        Parameters:
        id - the id of the entity
        version - the version of the entity
        Returns:
        the entity
      • getVersions

        public List<String> getVersions​(String id)
        Description copied from interface: Storage
        Gets the version of a specific entity
        Specified by:
        getVersions in interface Storage
        Parameters:
        id - the id of the entity
        Returns:
        a list containing the versions