Definition at line 778 of file network.h.
typedef Id<Network> OSB_LIB::Network::Oid |
OSB_LIB::Network::Network | ( | const Oid & | oid, | |
long | objVs, | |||
const std::string & | name, | |||
const std::string & | des = "" | |||
) |
Constructor with full attributes.
bool OSB_LIB::Network::addElement | ( | OSB_DB::Session & | session, | |
NetworkElement & | element | |||
) |
Add a network element for this network.
Add an element entry to the database. Also add it to the element list. The object id, network id and object version of this network element will be set if insertion success.
Session will be committed if successful.
session | Database session to use. | |
element | Network element to be added. |
OsbException |
|
const Id<ConnectionPt>& OSB_LIB::Network::connectionPt | ( | ) | const |
Id of the assigned connection point.
bool OSB_LIB::Network::delElement | ( | OSB_DB::Session & | session, | |
const Id2< NetworkElement > & | neId | |||
) |
Delete a network element for this network.
Including delete an entry from the database, also delete it from the element list. Session will be committed if successful.
session | Database session to use. | |
neId | Object id of network element to be deleted. |
OsbException |
|
const std::string& OSB_LIB::Network::des | ( | ) | const |
Description of the network.
NetworkElement* OSB_LIB::Network::element | ( | const Id2< NetworkElement > & | neId | ) |
Get the writable network element based on the given oid.
neId | Object id of network element. |
const NetworkElements& OSB_LIB::Network::elements | ( | ) | const |
List of network elements.
const NetworkElement* OSB_LIB::Network::findElement | ( | const Id2< NetworkElement > & | neId | ) | const |
Find the network element from the master list.
neId | Object id of the network element. |
void OSB_LIB::Network::getAddressInfo | ( | const NetworkAddressInfo & | src | ) | [private] |
Copy address information from info buffer.
const NetworkElement& OSB_LIB::Network::getElement | ( | const Id2< NetworkElement > & | neId | ) | const |
Get the network element based on the given oid.
neId | Object id of the network element. |
ObjectNotFound |
const TrunkGroup& OSB_LIB::Network::getTrkGroup | ( | const Id< TrunkGroup > & | tgId | ) | const |
Find a trunk group by its id.
tgId | Id of the trunk group to find. |
ObjectNotFound |
bool OSB_LIB::Network::insert | ( | const OSB_DB::Session & | session | ) | [private] |
Insert a network.
Add a network entry to the database. The object id and object version of network will be set if the insertion is successful.
session | Database session to use. |
OsbException |
|
const std::string& OSB_LIB::Network::name | ( | ) | const |
Name of the network.
const NwAddrInfo& OSB_LIB::Network::nwAddrInfo | ( | ) | const |
Network address information.
long OSB_LIB::Network::objVs | ( | ) | const |
Object version of the network.
const Oid& OSB_LIB::Network::oid | ( | ) | const |
Object id.
void OSB_LIB::Network::putAddressInfo | ( | NetworkAddressInfo & | dest | ) | const [private] |
Copy address information to info buffer.
bool OSB_LIB::Network::read | ( | const OSB_DB::Session & | session | ) |
Read a network from the database.
The function reads and sets the data members of the class. It will also retrieve network element list.
session | Database session to use. |
OsbException |
|
bool OSB_LIB::Network::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Delete a network.
Delete a network entry from the database.
Object id will be unset.
session | Database session to use. |
OsbException |
|
void OSB_LIB::Network::setConnectionPt | ( | const Id< ConnectionPt > & | cpId | ) |
Set the id of the connection point.
void OSB_LIB::Network::setDes | ( | const std::string & | des | ) | [inline] |
void OSB_LIB::Network::setName | ( | const std::string & | name | ) | [inline] |
void OSB_LIB::Network::setNwAddrInfo | ( | const NwAddrInfo & | info | ) |
Set network address information.
void OSB_LIB::Network::setTimeZone | ( | const TimeZone::Oid & | tzId | ) |
Set the timezone information.
void OSB_LIB::Network::sortElementByName | ( | bool | desc = false |
) |
Sort network elements by name.
desc | Flag to sort in descending (true) or ascending (false) order. |
const TimeZone::Oid OSB_LIB::Network::tzId | ( | ) | const |
Get timezone id.
bool OSB_LIB::Network::update | ( | const OSB_DB::Session & | session | ) | [private] |
Update a network to the database.
This function will also update the data member objVs.
session | Database session to use. |
OsbException |
|
bool OSB_LIB::Network::updElement | ( | OSB_DB::Session & | session, | |
NetworkElement & | netElement | |||
) |
Update a network element to the database.
Update network element to the database. Also update it to the element list. The object version will be update if success.
Session will be committed if successful.
session | The database session. | |
netElement | Network element to update. |
OsbException |
|
friend class NetworkManager [friend] |
friend class OSB_DB::NetworkGw [friend] |
Id<ConnectionPt> OSB_LIB::Network::connectionPt_ [private] |
std::string OSB_LIB::Network::des_ [private] |
NetworkElements OSB_LIB::Network::elements_ [private] |
std::string OSB_LIB::Network::name_ [private] |
NwAddrInfo OSB_LIB::Network::nwAddrInfo_ [private] |
long OSB_LIB::Network::objVs_ [private] |
Oid OSB_LIB::Network::oid_ [private] |
TimeZone::Oid OSB_LIB::Network::tzId_ [private] |