DataModel Class Reference

An DataModel object describes a schema — a collection of entities (data models) that you use in your application. More...

#include <DataModel.h>

Inheritance diagram for DataModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

StringSetkeysForEntity (string anEntity)
 Ask for the data model of given entity.

Protected Member Functions

 DataModel ()
 Default constructor.
virtual ~DataModel ()
 Default destructor.

Private Attributes

map< std::string, StringSet * > _models

Friends

class Singleton< DataModel >

Detailed Description

An DataModel object describes a schema — a collection of entities (data models) that you use in your application.

The model contains one or more objects representing the entities in the schema. Each entity name object has property description objects that represent the properties (or fields) of the entity in the schema.


Constructor & Destructor Documentation

DataModel::DataModel (  )  [protected]

Default constructor.

References LOG_CTOR.

DataModel::~DataModel (  )  [protected, virtual]

Default destructor.

Remove all cached models

References _models, and LOG_DTOR.


Member Function Documentation

StringSet & DataModel::keysForEntity ( string  anEntity  ) 

Ask for the data model of given entity.

The first time the method keysForEntity() is called, the class asks the database for attributes list of given entity, while immediately returns the same information whenever the same question is issued again.

Parameters:
[in] anEntity Entity name
Returns:
A set of string representing table columns
See also:
StringSet

References _models, Database::getConnection(), Singleton< DataModel >::instance(), and LOG.

Referenced by ManagedObject::initEntity().


Friends And Related Function Documentation

friend class Singleton< DataModel > [friend]

Member Data Documentation

map<std::string, StringSet *> DataModel::_models [private]

Referenced by keysForEntity(), and ~DataModel().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2