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 );
80 template <
typename T> boost::shared_ptr<T>
fetch(
int itemId );
88 template <
typename T>
int insert(
const T& data );
92 template <
typename T>
void update(
int itemId,
const T& data );
94 void erase(
int itemId );
100 bool getNames( std::vector<std::string>& destination );
103 boost::shared_ptr<void>
fetchItemAsType(
int itemId,
const std::type_info& asTypeInfo);
104 int insertItem(
const void* data,
const std::type_info& typeInfo );
105 void updateItem(
int itemId,
const void* data,
const std::type_info& typeInfo );
115 template <
typename T>
121 template <
typename T>
124 extendSchema(
typeid(
T) );
127 template <
typename T>
130 return boost::static_pointer_cast<
T>( fetchItemAsType( itemId,
typeid(
T) ));
133 template <
typename T>
136 return insertItem( &data,
typeid( data ) );
139 template <
typename T>
142 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)
std::string realClassName()
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)