CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ContainerSchema.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_CONTAINERSCHEMA_H
2 #define INCLUDE_ORA_CONTAINERSCHEMA_H
3 
4 #include "MappingTree.h"
5 #include "Sequences.h"
6 // externals
7 #include "Reflex/Type.h"
8 
9 namespace coral {
10  class ISchema;
11 }
12 
13 namespace ora {
14 
15  class DatabaseSession;
16  class IBlobStreamingService;
17  class IReferenceHandler;
18 
20  public:
21 
23  const std::string& containerName,
24  const Reflex::Type& containerType,
26 
27  ContainerSchema( int containerId,
28  const std::string& containerName,
29  const std::string& className,
30  DatabaseSession& session );
31 
33 
34  void create();
35 
36  void drop();
37 
38  void evolve();
39 
40  void create( const Reflex::Type& dependentClass );
41 
42  void evolve( const Reflex::Type& dependentClass, MappingTree& baseMapping );
43 
44  const Reflex::Type& type();
45 
46  MappingTree& mapping( bool writeEnabled=false);
47 
48  bool extendIfRequired( const Reflex::Type& dependentClass );
49 
50  MappingElement& mappingForDependentClass( const Reflex::Type& dependentClass, bool writeEnabled=false );
51 
52  bool mappingForDependentClasses( std::vector<MappingElement>& destination );
53 
55 
57 
59 
60  int containerId();
61 
62  const std::string& containerName();
63 
64  const std::string& className();
65 
66  const std::string& mappingVersion();
67 
68  coral::ISchema& storageSchema();
69 
71 
72  private:
73  void initClassDict();
74  bool loadMappingForDependentClass( const Reflex::Type& dependentClass );
75  void extend( const Reflex::Type& dependentClass );
76  private:
77 
79  std::string m_containerName;
80  std::string m_className;
83  bool m_loaded;
86  std::map<std::string,MappingTree*> m_dependentMappings;
87 
88  };
89 }
90 
91 #endif
Sequences & containerSequences()
IReferenceHandler * referenceHandler()
std::map< std::string, MappingTree * > m_dependentMappings
bool extendIfRequired(const Reflex::Type &dependentClass)
const Reflex::Type & type()
Reflex::Type m_classDict
MappingElement & mappingForDependentClass(const Reflex::Type &dependentClass, bool writeEnabled=false)
Sequences m_containerSchemaSequences
bool mappingForDependentClasses(std::vector< MappingElement > &destination)
const std::string & className()
DatabaseSession & m_session
bool loadMappingForDependentClass(const Reflex::Type &dependentClass)
DatabaseSession & dbSession()
Interface for a Streaming Service.
std::string m_containerName
const std::string & containerName()
coral::ISchema & storageSchema()
MappingTree & mapping(bool writeEnabled=false)
ContainerSchema(int containerId, const std::string &containerName, const Reflex::Type &containerType, DatabaseSession &session)
const std::string & mappingVersion()
IBlobStreamingService * blobStreamingService()
void extend(const Reflex::Type &dependentClass)