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
7 
8 namespace ora {
9 
10  class MappingElement;
11  class ContainerSchema;
12  class DataElement;
13  class IBlobStreamingService;
14 
16 
17  public:
18  BlobWriterBase( const edm::TypeWithDict& 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:
31 
32  private:
38  };
39 
40  class BlobWriter : public BlobWriterBase, public IRelationalWriter {
41 
42  public:
43  BlobWriter( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
44 
45  virtual ~BlobWriter();
46 
47  bool build(DataElement& dataElement, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
48 
49  void setRecordId( const std::vector<int>& identity );
50 
51  void write( int oid, const void* data );
52 
53  };
54 
55 
57 
58  public:
59  BlobUpdater( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
60 
61  virtual ~BlobUpdater();
62 
63  bool build(DataElement& dataElement, IRelationalData& relationalData, RelationalBuffer& operationBuffer);
64 
65  void setRecordId( const std::vector<int>& identity );
66 
67  void update( int oid, const void* data );
68 
69  };
70 
71  class BlobReader : public IRelationalReader {
72 
73  public:
74  BlobReader( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
75 
76  virtual ~BlobReader();
77 
78  bool build(DataElement& dataElement, IRelationalData& relationalData );
79 
80  void select( int oid );
81 
82  void setRecordId( const std::vector<int>& identity );
83 
84  void read( void* data );
85 
86  void clear();
87 
88  private:
93 
94  private:
98 
99  };
100 
102  {
103  public:
104  BlobStreamer( const edm::TypeWithDict& objectType, MappingElement& mapping, ContainerSchema& contSchema );
105 
106  ~BlobStreamer();
107 
109 
111 
113 
114  private:
118  };
119 
120 }
121 
122 
123 #endif
124 
125 
126 
IRelationalData * m_relationalData
Definition: BlobStreamer.h:34
BlobWriterBase(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Definition: BlobStreamer.cc:16
virtual ~BlobWriterBase()
Definition: BlobStreamer.cc:30
bool buildDataElement(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
Definition: BlobStreamer.cc:33
MappingElement & m_mapping
Definition: BlobStreamer.h:28
edm::TypeWithDict m_objectType
Definition: BlobStreamer.h:27
void setRecordId(const std::vector< int > &identity)
edm::TypeWithDict m_objectType
Definition: BlobStreamer.h:115
IBlobStreamingService * m_blobReader
Definition: BlobStreamer.h:97
BlobWriter(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Definition: BlobStreamer.cc:67
void bindData(const void *data)
Definition: BlobStreamer.cc:55
bool build(DataElement &dataElement, IRelationalData &relationalData)
DataElement * m_dataElement
Definition: BlobStreamer.h:95
virtual ~BlobUpdater()
Definition: BlobStreamer.cc:96
virtual ~BlobWriter()
Definition: BlobStreamer.cc:73
void update(int oid, const void *data)
Updates a data element.
bool build(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
Definition: BlobStreamer.cc:99
bool build(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
Definition: BlobStreamer.cc:76
MappingElement & m_mapping
Definition: BlobStreamer.h:116
BlobStreamer(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
void select(int oid)
BlobReader(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
IRelationalUpdater * newUpdater()
edm::TypeWithDict m_objectType
Definition: BlobStreamer.h:89
void read(void *data)
Reads a data element.
Interface for a Streaming Service.
IRelationalData * m_relationalData
Definition: BlobStreamer.h:96
DataElement * m_dataElement
Definition: BlobStreamer.h:33
MappingElement & m_mapping
Definition: BlobStreamer.h:90
void setRecordId(const std::vector< int > &identity)
ContainerSchema & m_schema
Definition: BlobStreamer.h:92
void setRecordId(const std::vector< int > &identity)
Definition: BlobStreamer.cc:82
BlobUpdater(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
Definition: BlobStreamer.cc:90
IRelationalWriter * newWriter()
IBlobStreamingService * m_blobWriter
Definition: BlobStreamer.h:36
IRelationalReader * newReader()
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
ContainerSchema & m_schema
Definition: BlobStreamer.h:117
ContainerSchema & m_schema
Definition: BlobStreamer.h:30
virtual ~BlobReader()
RelationalBuffer * m_relationalBuffer
Definition: BlobStreamer.h:35
void write(int oid, const void *data)
Writes a data element.
Definition: BlobStreamer.cc:85