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 
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  void setAccessPermission( const std::string& principal, bool forWrite );
45 
46  const Reflex::Type& type();
47 
48  MappingTree& mapping( bool writeEnabled=false);
49 
50  bool extendIfRequired( const Reflex::Type& dependentClass );
51 
52  MappingElement& mappingForDependentClass( const Reflex::Type& dependentClass, bool writeEnabled=false );
53 
54  bool mappingForDependentClasses( std::vector<MappingElement>& destination );
55 
57 
59 
61 
62  int containerId();
63 
64  const std::string& containerName();
65 
66  const std::string& className();
67 
68  const std::string& mappingVersion();
69 
70  coral::ISchema& storageSchema();
71 
73 
74  private:
75  void initClassDict();
76  bool loadMappingForDependentClass( const Reflex::Type& dependentClass );
77  void extend( const Reflex::Type& dependentClass );
78  void getTableHierarchy( const std::set<std::string>& containerMappingVersions, std::vector<std::string>& destination );
79  private:
80 
86  bool m_loaded;
89  std::map<std::string,MappingTree*> m_dependentMappings;
90 
91  };
92 }
93 
94 #endif
Sequences & containerSequences()
IReferenceHandler * referenceHandler()
void setAccessPermission(const std::string &principal, bool forWrite)
std::map< std::string, MappingTree * > m_dependentMappings
string destination
bool extendIfRequired(const Reflex::Type &dependentClass)
void getTableHierarchy(const std::set< std::string > &containerMappingVersions, std::vector< std::string > &destination)
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)