Class PersonStore


  • public abstract class PersonStore
    extends Object
    Manages persistence of Person.
    Since:
    3.1.0
    See Also:
    Person
    • Constructor Detail

      • PersonStore

        public PersonStore()
    • Method Detail

      • setInstance

        public static void setInstance​(PersonStore store)
        Replaces the current store instance with the given one.
        Parameters:
        store - the new store.
      • getPerson

        public abstract Optional<Person> getPerson​(String identifier)
                                            throws PersonStoreException
        Returns existing Person for the given identifier.
        Parameters:
        identifier - the person identifier
        Returns:
        the stored person
        Throws:
        PersonStoreException - if an error occurs while querying the store
      • getPersons

        public abstract Collection<Person> getPersons​(String filter,
                                                      int limit)
                                               throws PersonStoreException
        Gets OSLC persons applying a filter.
        Parameters:
        filter - the filter to apply on OSLC persons.
        limit - maximum number of OSLC persons retrieved.
        Returns:
        all filtered persons.
        Throws:
        PersonStoreException - if an error occurs while querying the store