public interface TransactionalTreeDatabase
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(java.sql.Connection con,
com.prosyst.mprm.data.tree.NodeInfo node,
long timestamp)
Adds a node(gateway group) into gateways tree as an immediate
descendant of the node identified by the
parentPath field of the node parameter. |
Enumerator |
enumerateDeletedGroups(java.sql.Connection con,
java.lang.String path)
Enumerates all the gateway groups which are immediate
descendants of the node identified by
path parameter and are removed from tree. |
Enumerator<java.lang.String,DatabaseException> |
enumerateExplicitlyConfiguredNodes(java.sql.Connection con,
java.lang.String path,
java.lang.String property)
Returns the nodes from the subtree starting with
path that has explicitly set values for the property. |
Enumerator |
enumerateGroups(java.sql.Connection con,
java.lang.String path,
long timestamp)
Enumerates all the gateway groups which are immediate
descendants of the node identified by
path parameter. |
Enumerator |
enumerateManagedObjects(java.sql.Connection con,
java.lang.String path,
long timestamp)
Enumerates all the gateways which are immediate descendants
of the node identified by the
path parameter. |
java.lang.String |
getManagedObjectInfoPath(java.sql.Connection con,
java.lang.String moId,
long timestamp)
This method returns the path of a managed object in the tree of managed objects by its identifier.
|
com.prosyst.mprm.data.tree.NodeInfo |
getNode(java.sql.Connection con,
java.lang.String path,
long timestamp)
Returns the node identified by the
path parameter. |
com.prosyst.mprm.data.tree.NodeInfo |
getNode(java.sql.ResultSet resultSet)
Returns the node retrieved from the result set after execution of an SQL query.
|
ExternalizableDictionary |
getNodeProperties(java.sql.Connection con,
java.lang.String path,
long timestamp)
Returns properties for a node identified by the
path parameter. |
com.prosyst.mprm.data.tree.NodeInfo |
getParent(java.sql.Connection con,
java.lang.String path)
Returns the parent node of the node identified by
path parameter. |
boolean |
hasDescendants(java.sql.Connection con,
java.lang.String path,
long timestamp)
Checks whether a given node has descendants.
|
void |
invalidateAndSetNodeProperties(java.sql.Connection con,
java.lang.String path,
java.util.Dictionary properties)
Deprecated.
|
void |
invalidateNode(java.sql.Connection con,
java.lang.String path,
long timestamp)
Invalidates the record for a node with specified node path.
|
boolean |
isInstanceOf(java.sql.Connection con,
java.lang.String path,
java.lang.String nType)
Checks whether a node is of a specified type.
|
boolean |
nodeExists(java.sql.Connection con,
java.lang.String path,
long timestamp)
Checks whether a node with the specified path is stored in the database.
|
boolean |
removeNode(java.sql.Connection con,
java.lang.String path)
Removes a node identified by the
path parameter. |
void |
retrieveNode(java.sql.ResultSet resultSet,
com.prosyst.mprm.data.tree.ManagedObjectInfo managedObjectInfo)
Retrieves a node from a result set and returns the result in the
ManagedObjectInfo |
void |
setNodeProperties(java.sql.Connection con,
java.lang.String path,
java.util.Dictionary properties)
Sets properties for a node identified by the
path parameter. |
void |
updateDisplayName(java.sql.Connection con,
java.lang.String path,
java.lang.String displayName)
Updates the display name of a node with certain path.
|
void addNode(java.sql.Connection con,
com.prosyst.mprm.data.tree.NodeInfo node,
long timestamp)
throws DatabaseException
parentPath field of the node parameter.con - Connection object holding connection to database server.node - the gateway group to be added.
node.parentPath equals null or empty string we
consider node.parentPath refers the root of the gateways tree.timestamp - long number specifying the time the node was valid in milliseconds.
If the value of passed parameter is -1 we consider it the current time.DatabaseException - is thrown if an error
occurs while adding the node into the database.com.prosyst.mprm.data.tree.NodeInfo getNode(java.sql.Connection con,
java.lang.String path,
long timestamp)
throws DatabaseException
path parameter.path - the unique path of the node.
path equals null or empty string we
consider path refers the root of the gateways tree.con - Connection object, managing connection to tree database server.timestamp - time indicating when the entry was valid in milliseconds.
NodeInfo or GatewayInfo object identified by the path
parameter or null if the path is not presented in the gateways tree.DatabaseException - is thrown
if an error occurs while retrieving data.boolean removeNode(java.sql.Connection con,
java.lang.String path)
throws DatabaseException
path parameter.con - Connection object, managing connection to tree database server.path - the unique path of the node.true if the gateway group is successfully removed, false otherwise.DatabaseException - is thrown if an error
occurs while modifying the database, or if the node has subentries.void invalidateNode(java.sql.Connection con,
java.lang.String path,
long timestamp)
throws DatabaseException
con - Connection object, managing connection to tree database server.path - path of object containing information about node to be invalidated.timestamp - Timestamp to be set as expire date of invalidated record.DatabaseException - is thrown if an error
occurs while invalidating the node into the database.void updateDisplayName(java.sql.Connection con,
java.lang.String path,
java.lang.String displayName)
throws DatabaseException
con - connection to database server.path - path of the node.displayName - the new display name of node.
DatabaseException - is thrown if an error
occurs while modifying the node record.@Deprecated
void invalidateAndSetNodeProperties(java.sql.Connection con,
java.lang.String path,
java.util.Dictionary properties)
throws DatabaseException
con - Connection object, managing connection to tree database server.path - path of node.properties - dictionary containing properties for the specified node.DatabaseException - is thrown if error while modifying properties records in database
occurs of if path does not refer tree node.void setNodeProperties(java.sql.Connection con,
java.lang.String path,
java.util.Dictionary properties)
throws DatabaseException
path parameter.con - Connection object, managing connection to tree database server.path - the unique path of the node.properties - dictionary containing the properties of the specified nodeDatabaseException - is thrown if error while saving properties in database
occurs.ExternalizableDictionary getNodeProperties(java.sql.Connection con, java.lang.String path, long timestamp) throws DatabaseException
path parameter.con - Connection object, managing connection to tree database server.path - the unique path of the node.timestamp - the time when entry is valid in milliseconds.
ExternalizableDictionary object containing properties stored for
specified node, null if no properties are stored.DatabaseException - is thrown if error while retrieving data occurs.boolean nodeExists(java.sql.Connection con,
java.lang.String path,
long timestamp)
throws DatabaseException
con - Connection object, managing connection to tree database server.path - the unique path of the node.timestamp - the time the entry was valid in milliseconds.
true if the specified node is presented, false otherwise.DatabaseException - is thrown if an error
occurs while retrieving data from the database.boolean hasDescendants(java.sql.Connection con,
java.lang.String path,
long timestamp)
throws DatabaseException
con - Connection object, managing connection to tree database server.path - the unique path of the node.
null or empty string we
consider path refers the root of the gateways tree.timestamp - the time the entry was valid in milliseconds.
true if the node has descendants.DatabaseException - is thrown if an error
occurs while retrieving data from the database.boolean isInstanceOf(java.sql.Connection con,
java.lang.String path,
java.lang.String nType)
throws DatabaseException
con - Connection object, managing connection to tree database server.path - the unique path of the node.nType - type of node, which the node should be checked for.true if node is instance of specified type, false otherwise.DatabaseException - is thrown if error while retrieving data from
database occurs.java.lang.IllegalArgumentException - is thrown if nodePath does not refer tree node.com.prosyst.mprm.data.tree.NodeInfo getParent(java.sql.Connection con,
java.lang.String path)
throws DatabaseException
path parameter.con - Connection object, managing connection to tree database server.path - the unique path of the node.null if path refers the root of gateways tree
or if node with parent path does not exist in database.DatabaseException - is thrown if an error occurs while
retrieving data from the database.java.lang.IllegalArgumentException - is thrown if
the path is not a valid node path.Enumerator enumerateGroups(java.sql.Connection con, java.lang.String path, long timestamp) throws DatabaseException
path parameter.path - the unique path of the node.
path equals null or empty string we
consider path refers the root of the gateways tree.con - Connection object, managing connection to tree database server.timestamp - the time the returned entries were valid in milliseconds.
GroupInfo objects that are immediate
descendants of the node identified by path and represent gateway groups.
If path refers leaf node an emtpy enumeration is returned.DatabaseException - is thrown if an error
occurs while retrieving data from the database.Enumerator enumerateDeletedGroups(java.sql.Connection con, java.lang.String path) throws DatabaseException
path parameter and are removed from tree.con - Connection object, managing connection to tree database server.path - the unique path of the node.
path equals null or empty string we
consider path refers the root of the gateways tree.GroupInfo objects that are immediate
descendants of the node identified by the path and represent gateway groups.DatabaseException - is thrown if an error occurs while retrieving data
from the database.Enumerator enumerateManagedObjects(java.sql.Connection con, java.lang.String path, long timestamp) throws DatabaseException
path parameter.con - Connection object, managing connection to tree database server.path - the path of the parent node.
path equals null or empty string we
consider path refers the root of the gateways tree.timestamp - the time the returned entries were valid in milliseconds.
ManagedObjectInfo objects
representing gateway nodes which have been subentries of given nodeDatabaseException - is thrown if an error
occurs while retrieving data from the database.java.lang.IllegalArgumentException - is thrown if
the path does not refer tree node.Enumerator<java.lang.String,DatabaseException> enumerateExplicitlyConfiguredNodes(java.sql.Connection con, java.lang.String path, java.lang.String property) throws DatabaseException
path that has explicitly set values for the property.con - Connection object, managing connection to tree database server.path - subtree pathproperty - changed propertyDatabaseExceptioncom.prosyst.mprm.data.tree.NodeInfo getNode(java.sql.ResultSet resultSet)
throws DatabaseException
resultSet - java.sql.ResultSet object containing result of execution of a sql query.NodeInfo object representing a node, which has been retrieved from the
result set after execution of an SQL query.DatabaseException - is thrown if an error occurs while retrieving data.void retrieveNode(java.sql.ResultSet resultSet,
com.prosyst.mprm.data.tree.ManagedObjectInfo managedObjectInfo)
throws DatabaseException
ManagedObjectInforesultSet - java.sql.ResultSet object containing result of execution of an sql query.managedObjectInfo - ManagedObjectInfo object where information retrieved from the resultSet
will be stored.DatabaseException - is thrown if an error occurs while retrieving data.java.lang.String getManagedObjectInfoPath(java.sql.Connection con,
java.lang.String moId,
long timestamp)
throws DatabaseException
con - Connection object, managing connection to tree database server.moId - identifier of the managed object.timestamp - the time when the managed object was active in milliseconds.DatabaseException - is thrown if error while retrieving data from database occurs.java.lang.IllegalArgumentException - is thrown if moId is not a valid managed object info identifier.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.