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
Exceptionpublic boolean isUpToDate()
isUpToDate in interface DBInterfacepublic void setLastUpdateTime(long lastUpdateTime)
public String getAssociatedScope()
public int fetchSpecies()
throws Exception
fetchSpecies in interface DBInterfaceExceptionpublic String getPhylogenyJSON(String level) throws Exception
getPhylogenyJSON in interface DBInterfaceExceptionpublic String getJSONAreasByType(boolean includeFAO, boolean includeEEZ, boolean includeLME, org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.PagedRequestSettings settings) throws Exception
getJSONAreasByType in interface DBInterfaceExceptionpublic List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> getAreasByType(boolean includeFAO, boolean includeEEZ, boolean includeLME) throws Exception
getAreasByType in interface DBInterfaceExceptionpublic String getUserJSONBasket(String userName, int start, int limit, String sortColumn, String sortDirection) throws Exception
getUserJSONBasket in interface DBInterfaceExceptionpublic int removeFromBasket(List<String> speciesIds, String userName) throws Exception
removeFromBasket in interface DBInterfaceExceptionpublic int addToUserBasket(List<String> speciesIds, String userName) throws Exception
addToUserBasket in interface DBInterfaceExceptionpublic int addToObjectBasket(List<String> speciesIds, String userName, String title) throws Exception
addToObjectBasket in interface DBInterfaceExceptionpublic int removeFromObjectBasket(List<String> speciesIds, String userName, String title) throws Exception
removeFromObjectBasket in interface DBInterfaceExceptionpublic String getObjectJSONBasket(String userName, String title, int start, int limit, String sortColumn, String sortDirection) throws Exception
getObjectJSONBasket in interface DBInterfaceExceptionpublic List<String> getObjectBasketIds(String userName, String title) throws Exception
getObjectBasketIds in interface DBInterfaceExceptionpublic List<String> getUserBasketIds(String userName) throws Exception
getUserBasketIds in interface DBInterfaceExceptionpublic int removeObjectByTitle(String userName, String title) throws Exception
removeObjectByTitle in interface DBInterfaceExceptionpublic int removeSession(String userName) throws Exception
removeSession in interface DBInterfaceExceptionpublic int updateObject(String userName, String oldTitle, String title, ClientObjectType type, String bbox, float threshold, boolean gis) throws Exception
updateObject in interface DBInterfaceExceptionpublic List<ClientObject> getObjects(String userName) throws Exception
getObjects in interface DBInterfaceExceptionpublic int clearBasket(String userName) throws Exception
clearBasket in interface DBInterfaceExceptionpublic int clearObjectBasket(String userName, String title) throws Exception
clearObjectBasket in interface DBInterfaceExceptionpublic String getSpecies() throws Exception
getSpecies in interface DBInterfaceExceptionpublic int fetchGeneratedObjRelatedSpecies(int objId,
List<String> speciesIds)
throws Exception
fetchGeneratedObjRelatedSpecies in interface DBInterfaceExceptionpublic String getFetchedJSONBasket(int objId, int start, int limit, String sortColumn, String sortDirection) throws Exception
getFetchedJSONBasket in interface DBInterfaceExceptionpublic int deleteFetched(String objId) throws Exception
deleteFetched in interface DBInterfaceExceptionpublic long getBasketCount(String userName) throws Exception
getBasketCount in interface DBInterfaceExceptionpublic long getObjectBasketCount(String userName, String title) throws Exception
getObjectBasketCount in interface DBInterfaceExceptionpublic long getObjectCount(String userName) throws Exception
getObjectCount in interface DBInterfaceExceptionpublic long getObjectCountByType(String userName, ClientObjectType type) throws Exception
getObjectCountByType in interface DBInterfaceExceptionpublic String getJSONObjectsByType(String userName, ClientObjectType type, int start, int limit, String sortColumn, String sortDirection) throws Exception
getJSONObjectsByType in interface DBInterfaceExceptionpublic String getPerturbation(String speciesId, String userName) throws Exception
getPerturbation in interface DBInterfaceExceptionpublic void setPerturbation(String speciesIds, String userName, String jsonString) throws Exception
setPerturbation in interface DBInterfaceExceptionpublic int removeObjectByType(String userName, ClientObjectType type) throws Exception
removeObjectByType in interface DBInterfaceExceptionpublic int changeGis(String userName, List<String> titles) throws Exception
changeGis in interface DBInterfaceExceptionpublic int addToAreaSelection(String user, List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> selection) throws Exception
addToAreaSelection in interface DBInterfaceExceptionpublic String getJSONAreaSelection(String user, org.gcube.application.aquamaps.aquamapsservice.stubs.fw.model.PagedRequestSettings settings) throws Exception
getJSONAreaSelection in interface DBInterfaceExceptionpublic List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> getAreaSelection(String user) throws Exception
getAreaSelection in interface DBInterfaceExceptionpublic int removeFromAreaSelection(String user, List<org.gcube.application.aquamaps.aquamapsservice.stubs.datamodel.enhanced.Area> toRemove) throws Exception
removeFromAreaSelection in interface DBInterfaceExceptionpublic int createObjectsBySelection(List<String> ids, String title, ClientObjectType type, float threshold, String bbox, String username) throws Exception
createObjectsBySelection in interface DBInterfaceExceptionpublic void clearPerturbation(String speciesId, String userName) throws Exception
clearPerturbation in interface DBInterfaceExceptionCopyright © 2017. All Rights Reserved.