Class TestMemStore<V extends JSONEntry>

    • Constructor Detail

      • TestMemStore

        public TestMemStore()
    • Method Detail

      • getAll

        public List<V> getAll()
        Description copied from interface: Store
        Method to get every element in the store. This is useful for command line interfaces. Note that this might be very expensive.
        Specified by:
        getAll in interface Store<V extends JSONEntry>
        Returns:
      • create

        public V create()
        Description copied from interface: Store
        Create a new object of the given type. This is not in the store until it is registered. Attempts to update the object should throw an exception. Note that this allows for a separation of creation semantics. Some objects require specific initialization before saving
        Specified by:
        create in interface Store<V extends JSONEntry>
        Returns:
      • register

        public void register​(V value)
        Description copied from interface: Store
        Almost Identical to put(K,V) but since the object should have an identifier, passing along the key is redundant. This persists the object in the store. Note that this returns void since the contract assumes that this is not registered. If the object is registered an exception should be thrown. Generally use save(V).
        Specified by:
        register in interface Store<V extends JSONEntry>
      • save

        public void save​(V value)
        Description copied from interface: Store
        Saves an object. This bridges the gap between SQL stores update and insert commands. Implementations should check if the object already exists in the store and issue an appropriate call.
        Specified by:
        save in interface Store<V extends JSONEntry>
      • size

        public int size​(boolean includeVersions)
        Specified by:
        size in interface Store<V extends JSONEntry>
      • search

        public List<V> search​(String key,
                              String condition,
                              boolean isRegEx)
        Description copied from interface: Store
        Allows for searching via a reg ex. Note that this may be very expensive for certain stores!
        Specified by:
        search in interface Store<V extends JSONEntry>
        Returns:
      • search

        public List<V> search​(String key,
                              String condition,
                              boolean isRegEx,
                              List<String> attr)
        Description copied from interface: Store
        Return a subset of all the attributes. For non-SQL stores performance may be slow.
        Specified by:
        search in interface Store<V extends JSONEntry>
        Returns:
      • remove

        public boolean remove​(List<Identifiable> objects)
        Description copied from interface: Store
        Removes a list of identifiable object from the store by ID.
        Specified by:
        remove in interface Store<V extends JSONEntry>
        Returns: