test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RelationalMapping.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_RELATIONALMAPPING_H
2 #define INCLUDE_ORA_RELATIONALMAPPING_H
3 
4 //
5 #include <utility>
6 #include <string>
7 // externals
8 #include "Reflex/Type.h"
9 
10 namespace Reflex {
11  class Type;
12 }
13 
14 namespace ora {
15 
16  namespace RelationalMapping {
17  size_t sizeInColumns(const Reflex::Type& topLevelClassType );
18  std::pair<bool,size_t> sizeInColumnsForCArray( const Reflex::Type& arrayType );
19  void _sizeInColumns(const Reflex::Type& typ, size_t& sz, bool& hasDependencies );
20  void _sizeInColumnsForCArray(const Reflex::Type& typ, size_t& sz, bool& hasDependencies );
21  }
22 
23  class MappingElement;
24  class TableRegister;
25 
27  public:
29  }
30 
31  virtual void process( MappingElement& parentElement, const std::string& attributeName,
32  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema ) = 0;
33  };
34 
36  public:
37  explicit RelationalMappingFactory( TableRegister& tableRegister );
38  virtual ~RelationalMappingFactory();
39 
40  public:
41  IRelationalMapping* newProcessor( const Reflex::Type& attributeType, bool blobStreaming=false );
42 
43  private:
45  };
46 
48  public:
49  PrimitiveMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
51 
52  void process( MappingElement& parentElement, const std::string& attributeName,
53  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
54  private:
57 
58  };
59 
61  public:
62  BlobMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
63 
64  ~BlobMapping();
65 
66  void process( MappingElement& parentElement, const std::string& attributeName,
67  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
68  private:
71 
72  };
73 
75  public:
76  OraReferenceMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
77 
79 
80  void process( MappingElement& parentElement, const std::string& attributeName,
81  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
82  private:
85 
86  };
87 
89  public:
90  UniqueReferenceMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
91 
93 
94  void process( MappingElement& parentElement, const std::string& attributeName,
95  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
96  private:
99 
100  };
101 
103  public:
104  OraPtrMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
105 
106  ~OraPtrMapping();
107 
108  void process( MappingElement& parentElement, const std::string& attributeName,
109  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
110  private:
113 
114  };
115 
117  public:
118  NamedRefMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
120 
121  void process( MappingElement& parentElement, const std::string& attributeName,
122  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
123 
124  private:
127  };
128 
130  public:
131  ArrayMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
132 
133  ~ArrayMapping();
134 
135  void process( MappingElement& parentElement, const std::string& attributeName,
136  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
137  private:
140 
141  };
142 
144  public:
145  CArrayMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
146 
147  ~CArrayMapping();
148 
149  void process( MappingElement& parentElement, const std::string& attributeName,
150  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
151  private:
154 
155  };
156 
158  public:
159  ObjectMapping( const Reflex::Type& attributeType, TableRegister& tableRegister );
160 
161  ~ObjectMapping();
162 
163  void process( MappingElement& parentElement, const std::string& attributeName,
164  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
165  private:
168 
169  };
170 
172  public:
173  EmptyMapping();
174 
175  ~EmptyMapping();
176 
177  void process( MappingElement& parentElement, const std::string& attributeName,
178  const std::string& attributeNameForSchema, const std::string& scopeNameForSchema );
179  };
180 
181 }
182 
183 #endif
NamedRefMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
void _sizeInColumnsForCArray(const Reflex::Type &typ, size_t &sz, bool &hasDependencies)
PrimitiveMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
RelationalMappingFactory(TableRegister &tableRegister)
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
TableRegister & m_tableRegister
UniqueReferenceMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
BlobMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
TableRegister & m_tableRegister
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
std::pair< bool, size_t > sizeInColumnsForCArray(const Reflex::Type &arrayType)
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
TableRegister & m_tableRegister
CArrayMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
Reflex::Type m_type
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
TableRegister & m_tableRegister
TableRegister & m_tableRegister
OraReferenceMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
ObjectMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
TableRegister & m_tableRegister
size_t sizeInColumns(const Reflex::Type &topLevelClassType)
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
OraPtrMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
virtual void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)=0
TableRegister & m_tableRegister
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
TableRegister & m_tableRegister
ArrayMapping(const Reflex::Type &attributeType, TableRegister &tableRegister)
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
void _sizeInColumns(const Reflex::Type &typ, size_t &sz, bool &hasDependencies)
IRelationalMapping * newProcessor(const Reflex::Type &attributeType, bool blobStreaming=false)
void process(MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)