TreeFrogFramework  2.8
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, const QVariant &value)
 
findByObjectId (const QString &id)
 
bool find (const TCriteria &cri=TCriteria())
 
bool findBy (int column, const QVariant &value)
 
bool findIn (int column, const QVariantList &values)
 
bool next ()
 
value () const
 
int findCount (const TCriteria &cri=TCriteria())
 
int findCountBy (int column, const QVariant &value)
 
int updateAll (const TCriteria &cri, int column, const 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)
 
int update (const QVariantMap &criteria, const QVariantMap &document, bool upsert=false)
 
bool updateById (const QVariantMap &document)
 
int updateMany (const QVariantMap &criteria, const QVariantMap &document)
 
int updateMulti (const QVariantMap &criteria, const QVariantMap &document)
 
int remove (const QVariantMap &criteria)
 
bool removeById (const QVariantMap &document)
 
int count (const QVariantMap &criteria=QVariantMap())
 
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

◆ TMongoODMapper()

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

Constructor.

◆ ~TMongoODMapper()

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

Destructor.

Member Function Documentation

◆ find()

template<class T >
bool TMongoODMapper< T >::find ( const TCriteria cri = TCriteria())
inline

◆ findBy()

template<class T >
bool TMongoODMapper< T >::findBy ( int  column,
const QVariant &  value 
)
inline

◆ findByObjectId()

template<class T >
T TMongoODMapper< T >::findByObjectId ( const QString &  id)
inline

◆ findCount()

template<class T >
int TMongoODMapper< T >::findCount ( const TCriteria cri = TCriteria())
inline

◆ findCountBy()

template<class T >
int TMongoODMapper< T >::findCountBy ( int  column,
const QVariant &  value 
)
inline

◆ findFirst()

template<class T >
T TMongoODMapper< T >::findFirst ( const TCriteria cri = TCriteria())
inline

◆ findFirstBy()

template<class T >
T TMongoODMapper< T >::findFirstBy ( int  column,
const QVariant &  value 
)
inline

◆ findIn()

template<class T >
bool TMongoODMapper< T >::findIn ( int  column,
const QVariantList &  values 
)
inline

◆ findOne()

template<class T >
T TMongoODMapper< T >::findOne ( const TCriteria cri = TCriteria())
inline

◆ limit()

template<class T >
TMongoODMapper< T > & TMongoODMapper< T >::limit ( int  limit)

◆ next()

template<class T >
bool TMongoODMapper< T >::next
inline

◆ offset()

template<class T >
TMongoODMapper< T > & TMongoODMapper< T >::offset ( int  offset)
inline

◆ orderBy() [1/2]

template<class T >
TMongoODMapper< T > & TMongoODMapper< T >::orderBy ( const QString &  column,
Tf::SortOrder  order = Tf::AscendingOrder 
)
inline

◆ orderBy() [2/2]

template<class T >
TMongoODMapper< T > & TMongoODMapper< T >::orderBy ( int  column,
Tf::SortOrder  order = Tf::AscendingOrder 
)
inline

◆ removeAll()

template<class T >
int TMongoODMapper< T >::removeAll ( const TCriteria cri = TCriteria())
inline

◆ setLimit()

template<class T >
void TMongoODMapper< T >::setLimit ( int  limit)
inline

◆ setOffset()

template<class T >
void TMongoODMapper< T >::setOffset ( int  offset)
inline

◆ setSortOrder() [1/2]

template<class T >
void TMongoODMapper< T >::setSortOrder ( const QString &  column,
Tf::SortOrder  order = Tf::AscendingOrder 
)
inline

◆ setSortOrder() [2/2]

template<class T >
void TMongoODMapper< T >::setSortOrder ( int  column,
Tf::SortOrder  order = Tf::AscendingOrder 
)
inline

◆ updateAll() [1/2]

template<class T >
int TMongoODMapper< T >::updateAll ( const TCriteria cri,
const QMap< int, QVariant > &  values 
)
inline

◆ updateAll() [2/2]

template<class T >
int TMongoODMapper< T >::updateAll ( const TCriteria cri,
int  column,
const QVariant &  value 
)
inline

◆ value()

template<class T >
T TMongoODMapper< T >::value
inline

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