public class DBManager extends Object implements DBInterface
Modifier and Type | Field and Description |
---|---|
protected String |
associatedScope |
protected static Map<String,DBManager> |
instanceMap |
protected DBSession |
session |
Modifier | Constructor and Description |
---|---|
protected |
DBManager(String scope) |
Modifier and Type | Method and Description |
---|---|
int |
addToAreaSelection(String user,
List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> selection) |
int |
addToObjectBasket(List<String> speciesIds,
String userName,
String title) |
int |
addToUserBasket(List<String> speciesIds,
String userName) |
int |
changeGis(String userName,
List<String> titles) |
protected void |
checkSession() |
int |
clearBasket(String userName) |
int |
clearObjectBasket(String userName,
String title) |
void |
clearPerturbation(String speciesId,
String userName) |
int |
createObjectsBySelection(List<String> ids,
String title,
ClientObjectType type,
float threshold,
String bbox,
String username) |
static void |
deleteDb(String currentScope) |
int |
deleteFetched(String objId) |
int |
fetchGeneratedObjRelatedSpecies(int objId,
List<String> speciesIds) |
int |
fetchSpecies() |
List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> |
getAreasByType(boolean includeFAO,
boolean includeEEZ,
boolean includeLME) |
List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> |
getAreaSelection(String user) |
String |
getAssociatedScope() |
long |
getBasketCount(String userName) |
String |
getFetchedJSONBasket(int objId,
int start,
int limit,
String sortColumn,
String sortDirection) |
static Set<String> |
getInitializedScopes() |
static DBInterface |
getInstance(String currentScopeString) |
String |
getJSONAreasByType(boolean includeFAO,
boolean includeEEZ,
boolean includeLME,
org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.PagedRequestSettings settings) |
String |
getJSONAreaSelection(String user,
org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.PagedRequestSettings settings) |
String |
getJSONObjectsByType(String userName,
ClientObjectType type,
int start,
int limit,
String sortColumn,
String sortDirection) |
long |
getObjectBasketCount(String userName,
String title) |
List<String> |
getObjectBasketIds(String userName,
String title) |
long |
getObjectCount(String userName) |
long |
getObjectCountByType(String userName,
ClientObjectType type) |
String |
getObjectJSONBasket(String userName,
String title,
int start,
int limit,
String sortColumn,
String sortDirection) |
List<ClientObject> |
getObjects(String userName) |
String |
getPerturbation(String speciesId,
String userName) |
String |
getPhylogenyJSON(String level) |
String |
getSpecies() |
List<String> |
getUserBasketIds(String userName) |
String |
getUserJSONBasket(String userName,
int start,
int limit,
String sortColumn,
String sortDirection) |
boolean |
isUpToDate() |
int |
removeFromAreaSelection(String user,
List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> toRemove) |
int |
removeFromBasket(List<String> speciesIds,
String userName) |
int |
removeFromObjectBasket(List<String> speciesIds,
String userName,
String title) |
int |
removeObjectByTitle(String userName,
String title) |
int |
removeObjectByType(String userName,
ClientObjectType type) |
int |
removeSession(String userName) |
void |
setLastUpdateTime(long lastUpdateTime) |
void |
setPerturbation(String speciesIds,
String userName,
String jsonString) |
int |
updateObject(String userName,
String oldTitle,
String title,
ClientObjectType type,
String bbox,
float threshold,
boolean gis) |
public static DBInterface getInstance(String currentScopeString) throws Exception
Exception
public boolean isUpToDate()
isUpToDate
in interface DBInterface
public void setLastUpdateTime(long lastUpdateTime)
public String getAssociatedScope()
public int fetchSpecies() throws Exception
fetchSpecies
in interface DBInterface
Exception
public String getPhylogenyJSON(String level) throws Exception
getPhylogenyJSON
in interface DBInterface
Exception
public String getJSONAreasByType(boolean includeFAO, boolean includeEEZ, boolean includeLME, org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.PagedRequestSettings settings) throws Exception
getJSONAreasByType
in interface DBInterface
Exception
public List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> getAreasByType(boolean includeFAO, boolean includeEEZ, boolean includeLME) throws Exception
getAreasByType
in interface DBInterface
Exception
public String getUserJSONBasket(String userName, int start, int limit, String sortColumn, String sortDirection) throws Exception
getUserJSONBasket
in interface DBInterface
Exception
public int removeFromBasket(List<String> speciesIds, String userName) throws Exception
removeFromBasket
in interface DBInterface
Exception
public int addToUserBasket(List<String> speciesIds, String userName) throws Exception
addToUserBasket
in interface DBInterface
Exception
public int addToObjectBasket(List<String> speciesIds, String userName, String title) throws Exception
addToObjectBasket
in interface DBInterface
Exception
public int removeFromObjectBasket(List<String> speciesIds, String userName, String title) throws Exception
removeFromObjectBasket
in interface DBInterface
Exception
public String getObjectJSONBasket(String userName, String title, int start, int limit, String sortColumn, String sortDirection) throws Exception
getObjectJSONBasket
in interface DBInterface
Exception
public List<String> getObjectBasketIds(String userName, String title) throws Exception
getObjectBasketIds
in interface DBInterface
Exception
public List<String> getUserBasketIds(String userName) throws Exception
getUserBasketIds
in interface DBInterface
Exception
public int removeObjectByTitle(String userName, String title) throws Exception
removeObjectByTitle
in interface DBInterface
Exception
public int removeSession(String userName) throws Exception
removeSession
in interface DBInterface
Exception
public int updateObject(String userName, String oldTitle, String title, ClientObjectType type, String bbox, float threshold, boolean gis) throws Exception
updateObject
in interface DBInterface
Exception
public List<ClientObject> getObjects(String userName) throws Exception
getObjects
in interface DBInterface
Exception
public int clearBasket(String userName) throws Exception
clearBasket
in interface DBInterface
Exception
public int clearObjectBasket(String userName, String title) throws Exception
clearObjectBasket
in interface DBInterface
Exception
public String getSpecies() throws Exception
getSpecies
in interface DBInterface
Exception
public int fetchGeneratedObjRelatedSpecies(int objId, List<String> speciesIds) throws Exception
fetchGeneratedObjRelatedSpecies
in interface DBInterface
Exception
public String getFetchedJSONBasket(int objId, int start, int limit, String sortColumn, String sortDirection) throws Exception
getFetchedJSONBasket
in interface DBInterface
Exception
public int deleteFetched(String objId) throws Exception
deleteFetched
in interface DBInterface
Exception
public long getBasketCount(String userName) throws Exception
getBasketCount
in interface DBInterface
Exception
public long getObjectBasketCount(String userName, String title) throws Exception
getObjectBasketCount
in interface DBInterface
Exception
public long getObjectCount(String userName) throws Exception
getObjectCount
in interface DBInterface
Exception
public long getObjectCountByType(String userName, ClientObjectType type) throws Exception
getObjectCountByType
in interface DBInterface
Exception
public String getJSONObjectsByType(String userName, ClientObjectType type, int start, int limit, String sortColumn, String sortDirection) throws Exception
getJSONObjectsByType
in interface DBInterface
Exception
public String getPerturbation(String speciesId, String userName) throws Exception
getPerturbation
in interface DBInterface
Exception
public void setPerturbation(String speciesIds, String userName, String jsonString) throws Exception
setPerturbation
in interface DBInterface
Exception
public int removeObjectByType(String userName, ClientObjectType type) throws Exception
removeObjectByType
in interface DBInterface
Exception
public int changeGis(String userName, List<String> titles) throws Exception
changeGis
in interface DBInterface
Exception
public int addToAreaSelection(String user, List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> selection) throws Exception
addToAreaSelection
in interface DBInterface
Exception
public String getJSONAreaSelection(String user, org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.PagedRequestSettings settings) throws Exception
getJSONAreaSelection
in interface DBInterface
Exception
public List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> getAreaSelection(String user) throws Exception
getAreaSelection
in interface DBInterface
Exception
public int removeFromAreaSelection(String user, List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> toRemove) throws Exception
removeFromAreaSelection
in interface DBInterface
Exception
public int createObjectsBySelection(List<String> ids, String title, ClientObjectType type, float threshold, String bbox, String username) throws Exception
createObjectsBySelection
in interface DBInterface
Exception
public void clearPerturbation(String speciesId, String userName) throws Exception
clearPerturbation
in interface DBInterface
Exception
Copyright © 2014. All Rights Reserved.