TreeFrogFramework  1.18
Public Member Functions | List of all members
TMongoODMapper< T > Class Template Reference

#include <tmongoodmapper.h>

Inheritance diagram for TMongoODMapper< T >:
Inheritance graph
[legend]
Collaboration diagram for TMongoODMapper< T >:
Collaboration graph
[legend]

Public Member Functions

 TMongoODMapper ()
 
virtual ~TMongoODMapper ()
 
TMongoODMapper< T > & limit (int limit)
 
TMongoODMapper< T > & offset (int offset)
 
TMongoODMapper< T > & orderBy (int column, Tf::SortOrder order=Tf::AscendingOrder)
 
TMongoODMapper< T > & orderBy (const QString &column, Tf::SortOrder order=Tf::AscendingOrder)
 
void setLimit (int limit)
 
void setOffset (int offset)
 
void setSortOrder (int column, Tf::SortOrder order=Tf::AscendingOrder)
 
void setSortOrder (const QString &column, Tf::SortOrder order=Tf::AscendingOrder)
 
findOne (const TCriteria &cri=TCriteria())
 
findFirst (const TCriteria &cri=TCriteria())
 
findFirstBy (int column, QVariant value)
 
findByObjectId (const QString &id)
 
bool find (const TCriteria &cri=TCriteria())
 
bool findBy (int column, QVariant value)
 
bool findIn (int column, const QVariantList &values)
 
bool next ()
 
value () const
 
int findCount (const TCriteria &cri=TCriteria())
 
int findCountBy (int column, QVariant value)
 
int updateAll (const TCriteria &cri, int column, QVariant value)
 
int updateAll (const TCriteria &cri, const QMap< int, QVariant > &values)
 
int removeAll (const TCriteria &cri=TCriteria())
 

Additional Inherited Members

- Protected Member Functions inherited from TMongoQuery
 TMongoQuery (const QString &collection)
 
 TMongoQuery (const TMongoQuery &other)
 
virtual ~TMongoQuery ()
 
int limit () const
 
void setLimit (int limit)
 
int offset () const
 
void setOffset (int offset)
 
bool find (const QVariantMap &criteria=QVariantMap(), const QVariantMap &orderBy=QVariantMap(), const QStringList &fields=QStringList())
 
bool next ()
 
QVariantMap value () const
 
QVariantMap findOne (const QVariantMap &criteria=QVariantMap(), const QStringList &fields=QStringList())
 
QVariantMap findById (const QString &id, const QStringList &fields=QStringList())
 
bool insert (QVariantMap &document)
 
bool update (const QVariantMap &criteria, const QVariantMap &document, bool upsert=false)
 
bool updateById (const QVariantMap &document)
 
bool updateMulti (const QVariantMap &criteria, const QVariantMap &document)
 
bool remove (const QVariantMap &criteria=QVariantMap())
 
bool removeById (const QVariantMap &document)
 
int count (const QVariantMap &criteria=QVariantMap())
 
int numDocsAffected () const
 
QString lastErrorString () const
 
TMongoQueryoperator= (const TMongoQuery &other)
 

Detailed Description

template<class T>
class TMongoODMapper< T >

The TMongoODMapper class is a template class that provides concise functionality to object-document mapping for MongoDB.

See also
TCriteria, TMongoQuery

Constructor & Destructor Documentation

template<class T >
TMongoODMapper< T >::TMongoODMapper ( )
inline

Constructor.

template<class T >
TMongoODMapper< T >::~TMongoODMapper ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class T >
bool TMongoODMapper< T >::find ( const TCriteria cri = TCriteria())
inline
template<class T >
bool TMongoODMapper< T >::findBy ( int  column,
QVariant  value 
)
inline
template<class T >
T TMongoODMapper< T >::findByObjectId ( const QString &  id)
inline
template<class T >
int TMongoODMapper< T >::findCount ( const TCriteria cri = TCriteria())
inline
template<class T >
int TMongoODMapper< T >::findCountBy ( int  column,
QVariant  value 
)
inline
template<class T>
T TMongoODMapper< T >::findFirst ( const TCriteria cri = TCriteria())
inline
template<class T >
T TMongoODMapper< T >::findFirstBy ( int  column,
QVariant  value 
)
inline
template<class T >
bool TMongoODMapper< T >::findIn ( int  column,
const QVariantList &  values 
)
inline
template<class T >
T TMongoODMapper< T >::findOne ( const TCriteria cri = TCriteria())
inline
template<class T >
TMongoODMapper< T > & TMongoODMapper< T >::limit ( int  limit)
template<class T >
bool TMongoODMapper< T >::next ( )
inline
template<class T >
TMongoODMapper< T > & TMongoODMapper< T >::offset ( int  offset)
inline
template<class T >
TMongoODMapper< T > & TMongoODMapper< T >::orderBy ( int  column,
Tf::SortOrder  order = Tf::AscendingOrder 
)
inline
template<class T >
TMongoODMapper< T > & TMongoODMapper< T >::orderBy ( const QString &  column,
Tf::SortOrder  order = Tf::AscendingOrder 
)
inline
template<class T >
int TMongoODMapper< T >::removeAll ( const TCriteria cri = TCriteria())
inline
template<class T >
void TMongoODMapper< T >::setLimit ( int  limit)
inline
template<class T >
void TMongoODMapper< T >::setOffset ( int  offset)
inline
template<class T >
void TMongoODMapper< T >::setSortOrder ( int  column,
Tf::SortOrder  order = Tf::AscendingOrder 
)
inline
template<class T >
void TMongoODMapper< T >::setSortOrder ( const QString &  column,
Tf::SortOrder  order = Tf::AscendingOrder 
)
inline
template<class T >
int TMongoODMapper< T >::updateAll ( const TCriteria cri,
int  column,
QVariant  value 
)
inline
template<class T >
int TMongoODMapper< T >::updateAll ( const TCriteria cri,
const QMap< int, QVariant > &  values 
)
inline
template<class T >
T TMongoODMapper< T >::value ( ) const
inline

The documentation for this class was generated from the following file: