package uk.ac.ic.wlgitbridge.bridge.db;

import java.sql.Timestamp;
import java.util.List;

/**
 * Created by winston on 20/08/2016.
 */
public interface DBStore {

    int getNumProjects();

    List<String> getProjectNames();

    void setLatestVersionForProject(String project, int versionID);

    int getLatestVersionForProject(String project);

    void addURLIndexForProject(String projectName, String url, String path);

    void deleteFilesForProject(String project, String... files);

    String getPathForURLInProject(String projectName, String url);

    String getOldestUnswappedProject();

    int getNumUnswappedProjects();

    ProjectState getProjectState(String projectName);

    /**
     * Sets the last accessed time for the given project name.
     * @param projectName the project's name
     * @param time the time, or null if the project is to be swapped
     */
    void setLastAccessedTime(String projectName, Timestamp time);

}

@@ -593,24 +593,177 @@
 Project();%0A%0A
+    void swap(String projectName, String compressionMethod);%0A%0A    void restore(String projectName);%0A%0A    String getSwapCompression(String projectName);%0A%0A
     int getN

Add swap/restore methods to DBStore interface