#include <LocationDB.h>
Public Member Functions | |
| OsStatus | store () |
| int | getRowCount () const |
| Count rows in table. | |
| UtlBoolean | insertRow (const UtlString &locationName, const UtlString &locationDescription, const UtlString &locationCode, const UtlString &locationSubnetsString) |
| UtlBoolean | insertRow (const UtlHashMap &nvPairs) |
| UtlBoolean | removeRow (const UtlString &locationName) |
| UtlBoolean | removeRows (const UtlString &locationName) |
| void | removeAllRows () |
| UtlBoolean | getRowByName (const UtlString &locationName, UtlHashMap &nvPairs) const |
| get an individual row based on a matching critiria. The caller is responsible for calling UtlHashMap::destroyAll() on the returned UtlHashMap when it is done with it. | |
| UtlBoolean | getRowByLocationCode (const UtlString &locationCode, UtlHashMap &nvPairs) const |
| UtlBoolean | getRowByIpAddress (const UtlString &ipAddress, UtlHashMap &nvPairs) const |
| void | getAllRows (ResultSet &rResultset) const |
| bool | isLoaded () |
Static Public Member Functions | |
| static LocationDB * | getInstance (const UtlString &name="location") |
| Singleton Accessor. | |
| static void | releaseInstance () |
| releaseInstance - cleans up the singleton (for use at exit) | |
Static Public Attributes | |
| static const UtlString | sType |
| static const UtlString | sXmlNamespace |
Protected Member Functions | |
| OsStatus | load () |
| LocationDB (const UtlString &name) | |
Protected Attributes | |
| dbDatabase * | m_pFastDB |
| UtlString | mDatabaseName |
| bool | mTableLoaded |
Static Protected Attributes | |
| static LocationDB * | spInstance = NULL |
| static OsMutex | sLockMutex |
| static UtlString | gNameKey |
| static UtlString | gDescriptionKey |
| static UtlString | gLocationCodeKey |
| static UtlString | gSubnetsKey |
Private Member Functions | |
| UtlBoolean | getRowByQuery (dbQuery &query, UtlHashMap &nvPairs) const |
| virtual | ~LocationDB () |
| Virtual Destructor. | |
Private Attributes | |
| Patterns | subnetPatternMatcher |
| LocationDB | ( | const UtlString & | name | ) | [protected] |
| ~LocationDB | ( | ) | [private, virtual] |
Virtual Destructor.
| LocationDB * getInstance | ( | const UtlString & | name = "location" |
) | [static] |
Singleton Accessor.
| void releaseInstance | ( | ) | [static] |
releaseInstance - cleans up the singleton (for use at exit)
| OsStatus store | ( | ) |
| int getRowCount | ( | ) | const |
Count rows in table.
| UtlBoolean insertRow | ( | const UtlString & | locationName, | |
| const UtlString & | locationDescription, | |||
| const UtlString & | locationCode, | |||
| const UtlString & | locationSubnetsString | |||
| ) |
| UtlBoolean insertRow | ( | const UtlHashMap & | nvPairs | ) |
| UtlBoolean removeRow | ( | const UtlString & | locationName | ) |
| UtlBoolean removeRows | ( | const UtlString & | locationName | ) |
| void removeAllRows | ( | ) |
| UtlBoolean getRowByName | ( | const UtlString & | locationName, | |
| UtlHashMap & | nvPairs | |||
| ) | const |
get an individual row based on a matching critiria. The caller is responsible for calling UtlHashMap::destroyAll() on the returned UtlHashMap when it is done with it.
| UtlBoolean getRowByLocationCode | ( | const UtlString & | locationCode, | |
| UtlHashMap & | nvPairs | |||
| ) | const |
| UtlBoolean getRowByIpAddress | ( | const UtlString & | ipAddress, | |
| UtlHashMap & | nvPairs | |||
| ) | const |
| void getAllRows | ( | ResultSet & | rResultset | ) | const |
| bool isLoaded | ( | ) |
| OsStatus load | ( | ) | [protected] |
| UtlBoolean getRowByQuery | ( | dbQuery & | query, | |
| UtlHashMap & | nvPairs | |||
| ) | const [private] |
const UtlString sXmlNamespace [static] |
LocationDB * spInstance = NULL [static, protected] |
OsMutex sLockMutex [static, protected] |
UtlString gDescriptionKey [static, protected] |
UtlString gLocationCodeKey [static, protected] |
UtlString gSubnetsKey [static, protected] |
dbDatabase* m_pFastDB [protected] |
UtlString mDatabaseName [protected] |
bool mTableLoaded [protected] |
Patterns subnetPatternMatcher [private] |