1 #ifndef INCLUDE_ORA_CONTAINER_H
2 #define INCLUDE_ORA_CONTAINER_H
8 #include <boost/shared_ptr.hpp>
13 class DatabaseContainer;
30 template <
typename T> boost::shared_ptr<T>
get();
39 boost::shared_ptr<void>
getItemAsType(
const std::type_info& asTypeInfo );
60 const std::string&
name();
78 template <
typename T> boost::shared_ptr<T>
fetch(
int itemId );
86 template <
typename T>
int insert(
const T& data );
90 template <
typename T>
void update(
int itemId,
const T& data );
92 void erase(
int itemId );
96 void setItemName(
const std::string& name,
int itemId );
98 bool getNames( std::vector<std::string>& destination );
101 boost::shared_ptr<void>
fetchItemAsType(
int itemId,
const std::type_info& asTypeInfo);
102 int insertItem(
const void* data,
const std::type_info& typeInfo );
103 void updateItem(
int itemId,
const void* data,
const std::type_info& typeInfo );
113 template <
typename T>
119 template <
typename T>
122 extendSchema(
typeid(
T) );
125 template <
typename T>
128 return boost::static_pointer_cast<
T>( fetchItemAsType( itemId,
typeid(
T) ));
131 template <
typename T>
134 return insertItem( &data,
typeid( data ) );
137 template <
typename T>
140 return updateItem( itemId, &data,
typeid( data ) );
int insert(const T &data)
void updateItem(int itemId, const Object &data)
Handle< IteratorBuffer > m_buffer
const std::string & name()
int insertItem(const Object &data)
boost::shared_ptr< T > get()
void setAccessPermission(const std::string &principal, bool forWrite)
Object fetchItem(int itemId)
void setItemName(const std::string &name, int itemId)
const std::string & className()
const std::string & mappingVersion()
void update(int itemId, const T &data)
boost::shared_ptr< void > fetchItemAsType(int itemId, const std::type_info &asTypeInfo)
char data[epos_bytes_allocation]
boost::shared_ptr< void > getItemAsType(const std::type_info &asTypeInfo)
boost::shared_ptr< T > fetch(int itemId)
Container & operator=(const Container &rhs)
virtual ~ContainerIterator()
bool getNames(std::vector< std::string > &destination)
Handle< DatabaseContainer > m_dbContainer
ContainerIterator iterator()
ContainerIterator & operator=(const ContainerIterator &rhs)