LocationDB Class Reference

#include <LocationDB.h>

List of all members.


Detailed Description

The location database is used to contain all the attributes of a location as create by the administrator.

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 LocationDBgetInstance (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

dbDatabasem_pFastDB
UtlString mDatabaseName
bool mTableLoaded

Static Protected Attributes

static LocationDBspInstance = 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

Constructor & Destructor Documentation

LocationDB ( const UtlString name  )  [protected]

~LocationDB (  )  [private, virtual]

Virtual Destructor.


Member Function Documentation

LocationDB * getInstance ( const UtlString name = "location"  )  [static]

Singleton Accessor.

Returns:

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]


Member Data Documentation

const UtlString sType [static]

const UtlString sXmlNamespace [static]

LocationDB * spInstance = NULL [static, protected]

OsMutex sLockMutex [static, protected]

UtlString gNameKey [static, protected]

UtlString gDescriptionKey [static, protected]

UtlString gLocationCodeKey [static, protected]

UtlString gSubnetsKey [static, protected]

dbDatabase* m_pFastDB [protected]

UtlString mDatabaseName [protected]

bool mTableLoaded [protected]


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:13:23 build16 abuild