CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BlobStreamer.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_BLOBSTREAMER_H
2 #define INCLUDE_ORA_BLOBSTREAMER_H
3 
4 #include "IRelationalStreamer.h"
5 // externals
6 #include "Reflex/Type.h"
7 
8 namespace ora {
9 
10  class MappingElement;
11  class ContainerSchema;
12  class DataElement;
13  class IBlobStreamingService;
14 
16 
17  public:
18  BlobWriterBase( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
19 
20  virtual ~BlobWriterBase();
21 
22  bool buildDataElement( DataElement& dataElement, IRelationalData& relationalData, RelationalBuffer& operationBuffer );
23 
24  void bindData( const void* data );
25 
26  private:
28  std::string m_columnName;
30 
31  private:
37  };
38 
39  class BlobWriter : public BlobWriterBase, public IRelationalWriter {
40 
41  public:
42  BlobWriter( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
43 
44  virtual ~BlobWriter();
45 
46  bool build(DataElement& dataElement, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
47 
48  void setRecordId( const std::vector<int>& identity );
49 
50  void write( int oid, const void* data );
51 
52  };
53 
54 
56 
57  public:
58  BlobUpdater( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
59 
60  virtual ~BlobUpdater();
61 
62  bool build(DataElement& dataElement, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
63 
64  void setRecordId( const std::vector<int>& identity );
65 
66  void update( int oid, const void* data );
67 
68  };
69 
70  class BlobReader : public IRelationalReader {
71 
72  public:
73  BlobReader( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
74 
75  virtual ~BlobReader();
76 
77  bool build(DataElement& dataElement, IRelationalData& relationalData );
78 
79  void select( int oid );
80 
81  void setRecordId( const std::vector<int>& identity );
82 
83  void read( void* data );
84 
85  void clear();
86 
87  private:
89  std::string m_columnName;
91 
92  private:
96 
97  };
98 
100  {
101  public:
102  BlobStreamer( const Reflex::Type& objectType, MappingElement& mapping, ContainerSchema& contSchema );
103 
104  ~BlobStreamer();
105 
107 
109 
111 
112  private:
116  };
117 
118 }
119 
120 
121 #endif
122 
123 
124 
Reflex::Type m_objectType
Definition: BlobStreamer.h:113
IRelationalData * m_relationalData
Definition: BlobStreamer.h:33
virtual ~BlobWriterBase()
Definition: BlobStreamer.cc:33
bool buildDataElement(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
Definition: BlobStreamer.cc:36
BlobStreamer(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
BlobWriterBase(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Definition: BlobStreamer.cc:16
void setRecordId(const std::vector< int > &identity)
IBlobStreamingService * m_blobReader
Definition: BlobStreamer.h:95
void bindData(const void *data)
Definition: BlobStreamer.cc:57
bool build(DataElement &dataElement, IRelationalData &relationalData)
DataElement * m_dataElement
Definition: BlobStreamer.h:93
Reflex::Type m_objectType
Definition: BlobStreamer.h:88
virtual ~BlobUpdater()
Definition: BlobStreamer.cc:98
virtual ~BlobWriter()
Definition: BlobStreamer.cc:75
void update(int oid, const void *data)
Updates a data element.
bool build(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
bool build(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
Definition: BlobStreamer.cc:78
Reflex::Type m_objectType
Definition: BlobStreamer.h:27
MappingElement & m_mapping
Definition: BlobStreamer.h:114
std::string m_columnName
Definition: BlobStreamer.h:89
void select(int oid)
IRelationalUpdater * newUpdater()
void read(void *data)
Reads a data element.
Interface for a Streaming Service.
IRelationalData * m_relationalData
Definition: BlobStreamer.h:94
DataElement * m_dataElement
Definition: BlobStreamer.h:32
void setRecordId(const std::vector< int > &identity)
BlobReader(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
ContainerSchema & m_schema
Definition: BlobStreamer.h:90
void setRecordId(const std::vector< int > &identity)
Definition: BlobStreamer.cc:84
IRelationalWriter * newWriter()
std::string m_columnName
Definition: BlobStreamer.h:28
IBlobStreamingService * m_blobWriter
Definition: BlobStreamer.h:35
IRelationalReader * newReader()
ContainerSchema & m_schema
Definition: BlobStreamer.h:115
ContainerSchema & m_schema
Definition: BlobStreamer.h:29
virtual ~BlobReader()
RelationalBuffer * m_relationalBuffer
Definition: BlobStreamer.h:34
BlobWriter(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Definition: BlobStreamer.cc:69
BlobUpdater(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Definition: BlobStreamer.cc:92
void write(int oid, const void *data)
Writes a data element.
Definition: BlobStreamer.cc:87