Class DifftableRepository
- java.lang.Object
-
- de.narimo.georepo.server.repository.DifftableRepository
-
public class DifftableRepository extends Object
-
-
Constructor Summary
Constructors Constructor Description DifftableRepository()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanaddDiffLayer(String diffLayername, String diffWorkspace, String dataLayerName, String dataWorkspace)Adds a diff layer to the difftables table.static booleancheckDiffTableExists(String diffTableName)Checks existence of a given diff table name.static voidcreateDiffAuthTable(String diffAuthTableName)static voidcreateDiffTable(String dataTable, String diffTable)Creates a diff table from the structure of a data table.static StringgetDataWorkspace(String diffWorkspace, String dataLayerName)Find the data workspace for a diff workspace and corresponding data layer name.static StringgetDiffWorkspace(String dataWorkspace)Retrieve a diff workspace for a data workspace, assuming there is a one-to-one relation.
-
-
-
Method Detail
-
getDiffWorkspace
public static String getDiffWorkspace(String dataWorkspace)
Retrieve a diff workspace for a data workspace, assuming there is a one-to-one relation. A diff workspace holds tables with user generated, not reviewed data updates. A data workspace holds the original data tables where updates should be merged only after admin review.- Parameters:
dataWorkspace-- Returns:
-
getDataWorkspace
public static String getDataWorkspace(String diffWorkspace, String dataLayerName)
Find the data workspace for a diff workspace and corresponding data layer name.- Parameters:
diffWorkspace-dataLayerName-- Returns:
-
addDiffLayer
public static boolean addDiffLayer(String diffLayername, String diffWorkspace, String dataLayerName, String dataWorkspace)
Adds a diff layer to the difftables table.- Returns:
-
createDiffTable
public static void createDiffTable(String dataTable, String diffTable) throws SQLException, IOException
Creates a diff table from the structure of a data table. And adds a grpstatus column.- Parameters:
dataTable-- Throws:
SQLExceptionIOException
-
createDiffAuthTable
public static void createDiffAuthTable(String diffAuthTableName) throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
checkDiffTableExists
public static boolean checkDiffTableExists(String diffTableName) throws SQLException, IOException
Checks existence of a given diff table name. DO NOT use this on a diffTableName that comes from user input!- Parameters:
diffTableName-- Returns:
- Throws:
SQLExceptionIOException
-
-