public class DBManager extends Manager
DBManager class.
initialized| Constructor and Description |
|---|
DBManager()
Constructor for DBManager.
|
DBManager(Map<String,String> params)
Constructor for DBManager.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeResultSet(ResultSet rs) |
protected void |
closeStatement(Statement statement) |
int |
countMaps(int mapId)
countMaps
|
void |
deleteElement(DbElement e)
deleteElement
|
void |
deleteElement(int id,
int mapid,
String type)
deleteElement
|
void |
deleteElements(DbElement[] elems)
deleteElements
|
int |
deleteMap(int id)
delete the map with id in input
|
void |
deleteMapTypeElementsFromAllMaps()
deleteMapTypeElementsFromAllMaps
|
void |
deleteNodeTypeElementsFromAllMaps()
deleteNodeTypeElementsFromAllMaps
|
void |
finalize(Connection conn)
finalize
|
List<VElementInfo> |
getAlarmedElements()
getAlarmedElements
|
Vector<VElementInfo> |
getAllElementInfo()
getAllElementInfo
|
DbElement[] |
getAllElements()
getAllElements
|
VMapInfo[] |
getAllMapMenus()
getAllMapMenus
|
DbMap[] |
getAllMaps()
getAllMaps
|
Map<Integer,Double> |
getAvails(DbElement[] mapElements)
getAvails
|
DbMap[] |
getContainerMaps(int id,
String type)
getContainerMaps
|
List<Integer> |
getDeletedNodes()
gets a Vector containing the nodeids of all deleted nodes
|
DbElement |
getElement(int id,
int mapId,
String type)
getElement
|
DbElement[] |
getElementsLike(String elementLabel)
getElementsLike
|
DbElement[] |
getElementsOfMap(int mapid)
getElementsOfMap
|
Set<LinkInfo> |
getLinksOnElements(Set<Integer> allnodes)
getLinksOnElements
|
DbMap |
getMap(int id)
getMap
|
DbElement[] |
getMapElementsOfMap(int mapid)
getMapElementsOfMap
|
VMapInfo |
getMapMenu(int mapId)
getMapMenu
|
DbMap[] |
getMaps(String mapname,
String maptype)
getMaps
|
DbMap[] |
getMapsByName(String mapLabel)
getMapsByName
|
DbMap[] |
getMapsLike(String mapLabel)
getMapsLike
|
VMapInfo[] |
getMapsMenuByGroup(String group)
getMapsMenuByGroup
|
VMapInfo[] |
getMapsMenuByName(String mapLabel)
getMapsMenuByName
|
VMapInfo[] |
getMapsMenuByOther()
getMapsMenuByOther
|
VMapInfo[] |
getMapsMenuByOwner(String owner)
getMapsMenuByOwner
|
Map<Integer,Set<Integer>> |
getMapsStructure()
getMapsStructure
|
DbElement[] |
getNodeElementsOfMap(int mapid)
getNodeElementsOfMap
|
Set<Integer> |
getNodeIdsBySource(String query)
getNodeIdsBySource
|
Set<Integer> |
getNodeidsOnElement(DbElement elem)
getNodeidsOnElement
|
boolean |
isElementDeleted(int elementId,
String type)
isElementDeleted
|
boolean |
isElementInMap(int elementId,
int mapId,
String type)
isElementInMap
|
DbElement |
newElement(int id,
int mapId,
String type)
newElement
|
void |
saveElement(DbElement e)
saveElement
|
int |
saveMap(DbMap m,
Collection<DbElement> e)
saveMap
|
public DBManager()
throws MapsException
Constructor for DBManager.
MapsException - if any.public DBManager(Map<String,String> params) throws MapsException
Constructor for DBManager.
params - a java$util$Map object.MapsException - if any.protected void closeStatement(Statement statement)
protected void closeResultSet(ResultSet rs)
public void finalize(Connection conn) throws MapsException
finalize
conn - a Connection object.MapsException - if any.public int saveMap(DbMap m, Collection<DbElement> e) throws MapsException
saveMap
saveMap in class Managerm - a DbMap object.e - a Collection object.MapsException - if any.public void saveElement(DbElement e) throws MapsException
saveElement
e - a DbElement object.MapsException - if any.public void deleteElements(DbElement[] elems) throws MapsException
deleteElements
elems - an array of DbElement objects.MapsException - if any.public void deleteElement(DbElement e) throws MapsException
deleteElement
e - a DbElement object.MapsException - if any.public void deleteElement(int id,
int mapid,
String type)
throws MapsException
deleteElement
id - a int.mapid - a int.type - a String object.MapsException - if any.public int deleteMap(int id)
throws MapsException
deleteMap in class Managerid - a int.MapsException - if any.public void deleteNodeTypeElementsFromAllMaps()
throws MapsException
deleteNodeTypeElementsFromAllMaps
deleteNodeTypeElementsFromAllMaps in class ManagerMapsException - if any.public void deleteMapTypeElementsFromAllMaps()
throws MapsException
deleteMapTypeElementsFromAllMaps
deleteMapTypeElementsFromAllMaps in class ManagerMapsException - if any.public DbElement getElement(int id, int mapId, String type) throws MapsException
getElement
getElement in class Managerid - a int.mapId - a int.type - a String object.DbElement object.MapsException - if any.public DbElement newElement(int id, int mapId, String type) throws MapsException
newElement
newElement in class Managerid - a int.mapId - a int.type - a String object.DbElement object.MapsException - if any.public DbElement[] getAllElements() throws MapsException
getAllElements
getAllElements in class ManagerDbElement objects.MapsException - if any.public DbElement[] getElementsOfMap(int mapid) throws MapsException
getElementsOfMap
getElementsOfMap in class Managermapid - a int.DbElement objects.MapsException - if any.public DbElement[] getNodeElementsOfMap(int mapid) throws MapsException
getNodeElementsOfMap
getNodeElementsOfMap in class Managermapid - a int.DbElement objects.MapsException - if any.public DbElement[] getMapElementsOfMap(int mapid) throws MapsException
getMapElementsOfMap
getMapElementsOfMap in class Managermapid - a int.DbElement objects.MapsException - if any.public DbElement[] getElementsLike(String elementLabel) throws MapsException
getElementsLike
getElementsLike in class ManagerelementLabel - a String object.DbElement objects.MapsException - if any.public Map<Integer,Set<Integer>> getMapsStructure() throws MapsException
getMapsStructure
getMapsStructure in class ManagerMapsException - if any.public int countMaps(int mapId)
throws MapsException
countMaps
countMaps in class ManagermapId - a int.MapsException - if any.public DbMap getMap(int id) throws MapsException
getMap
getMap in class Managerid - a int.DbMap object.MapsException - if any.public DbMap[] getMaps(String mapname, String maptype) throws MapsException
getMaps
public DbMap[] getAllMaps() throws MapsException
getAllMaps
getAllMaps in class ManagerDbMap objects.MapsException - if any.public DbMap[] getMapsLike(String mapLabel) throws MapsException
getMapsLike
getMapsLike in class ManagermapLabel - a String object.DbMap objects.MapsException - if any.public DbMap[] getMapsByName(String mapLabel) throws MapsException
getMapsByName
getMapsByName in class ManagermapLabel - a String object.DbMap objects.MapsException - if any.public DbMap[] getContainerMaps(int id, String type) throws MapsException
getContainerMaps
getContainerMaps in class Managerid - a int.type - a String object.DbMap objects.MapsException - if any.public VMapInfo[] getAllMapMenus() throws MapsException
getAllMapMenus
getAllMapMenus in class ManagerVMapInfo objects.MapsException - if any.public VMapInfo getMapMenu(int mapId) throws MapsException
getMapMenu
getMapMenu in class ManagermapId - a int.VMapInfo object.MapsException - if any.public VMapInfo[] getMapsMenuByName(String mapLabel) throws MapsException
getMapsMenuByName
getMapsMenuByName in class ManagermapLabel - a String object.VMapInfo objects.MapsException - if any.public VMapInfo[] getMapsMenuByOwner(String owner) throws MapsException
getMapsMenuByOwner
getMapsMenuByOwner in class Managerowner - a String object.VMapInfo objects.MapsException - if any.public VMapInfo[] getMapsMenuByGroup(String group) throws MapsException
getMapsMenuByGroup
getMapsMenuByGroup in class Managergroup - a String object.VMapInfo objects.MapsException - if any.public VMapInfo[] getMapsMenuByOther() throws MapsException
getMapsMenuByOther
getMapsMenuByOther in class ManagerVMapInfo objects.MapsException - if any.public boolean isElementInMap(int elementId,
int mapId,
String type)
throws MapsException
isElementInMap
isElementInMap in class ManagerelementId - a int.mapId - a int.type - a String object.MapsException - if any.public Vector<VElementInfo> getAllElementInfo() throws MapsException
getAllElementInfo
getAllElementInfo in class ManagerVector object.MapsException - if any.public List<VElementInfo> getAlarmedElements() throws MapsException
getAlarmedElements
getAlarmedElements in class ManagerList object.MapsException - if any.public Map<Integer,Double> getAvails(DbElement[] mapElements) throws MapsException
getAvails
getAvails in class ManagermapElements - an array of DbElement objects.MapsException - if any.public List<Integer> getDeletedNodes() throws MapsException
getDeletedNodes in class ManagerMapsException - if any.public Set<Integer> getNodeidsOnElement(DbElement elem) throws MapsException
getNodeidsOnElement
recursively gets all nodes contained by elem and its submaps (if elem is a map)getNodeidsOnElement in class Managerelem - a DbElement object.Set object.MapsException - if any.public Set<LinkInfo> getLinksOnElements(Set<Integer> allnodes) throws MapsException
getLinksOnElements
getLinksOnElements in class Managerallnodes - a Set object.Set object.MapsException - if any.public Set<Integer> getNodeIdsBySource(String query) throws MapsException
getNodeIdsBySource
getNodeIdsBySource in class Managerquery - a String object.Set object.MapsException - if any.public boolean isElementDeleted(int elementId,
String type)
throws MapsException
isElementDeleted
isElementDeleted in class ManagerelementId - a int.type - a String object.MapsException - if any.Copyright © 2015. All rights reserved.