BankAndCustomer
Loading...
Searching...
No Matches
GloTAllSet.h
Go to the documentation of this file.
1#ifndef INC_GLOTALLSET_H
2#define INC_GLOTALLSET_H
3//-----------------------------------------------------------------------------
36//-----------------------------------------------------------------------------
37#include <list>
38#include "GloTypes.h"
39#include "GloBaseAllSet.h"
40#include "GloBasePersistent.h"
41#include "GloBase.h"
42#include "GloObjectMaker.h"
43//-----------------------------------------------------------------------------
44namespace glo
45{
46 //---------------------------------------------------------------------------
184 template < class T > class TAllSet : public BaseAllSet
185 {
186 public:
187 //============== Konstruktoren
188 //-----------------------------------------------------------------------
199 //-----------------------------------------------------------------------
217 TAllSet( Base & rBase, bool bWithSubClasses = true );
218 //-----------------------------------------------------------------------
238 TAllSet( Base & rBase, const std::string & rsFullIndexName );
239 //-----------------------------------------------------------------------
249 virtual ~TAllSet();
250 //-----------------------------------------------------------------------
251
252 private:
253 //============== Konstruktoren
254 //-----------------------------------------------------------------------
264 TAllSet( const TAllSet & );
265 //-----------------------------------------------------------------------
266
267 public:
268 //============== Methoden
269 //-----------------------------------------------------------------------
315 int get( T *& prRetVal, EnSeekMode eMode );
316 //-----------------------------------------------------------------------
352 int get( std::shared_ptr<T> & rRetVal, EnSeekMode eMode );
353 //-----------------------------------------------------------------------
406 int get( glo::ObjID & rObjID, T *& prRetVal, EnSeekMode eMode );
407 //-----------------------------------------------------------------------
449 int get( glo::ObjID & rObjID, std::shared_ptr<T> & rRetVal, EnSeekMode eMode );
450 //-----------------------------------------------------------------------
452
480 virtual int getPersistent( BasePersistent *& prRetVal, const glo::ObjID & rObjID );
481 int get( T *& prRetVal, const glo::ObjID & rObjID );
483 //-----------------------------------------------------------------------
501 int get( std::shared_ptr<T> & rRetVal, const glo::ObjID & rObjID );
502 //-----------------------------------------------------------------------
518 virtual int getPersistent( std::shared_ptr<BasePersistent> & rRetVal,
519 const glo::ObjID & rObjID );
520 //-----------------------------------------------------------------------
572 int getOndemand( glo::TOndemand<T> *& prRetVal, EnSeekMode eMode );
573 //-----------------------------------------------------------------------
609 int getOndemand( std::shared_ptr< glo::TOndemand<T> > & rRetVal, EnSeekMode eMode );
610 //-----------------------------------------------------------------------
647 int getOndemand( glo::TOndemand<T> & rRetVal, EnSeekMode eMode );
648 //-----------------------------------------------------------------------
681 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
682 const std::string & rsIndexSearchValue,
683 EnQueryType eQuerryType );
684 //-----------------------------------------------------------------------
723 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
724 const std::string & rsFullIndexName,
725 const std::string & rsIndexSearchValue,
726 EnQueryType eQuerryType );
727 //-----------------------------------------------------------------------
771 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
772 const std::string & rsIndexName,
773 unsigned long ulIndexClassID,
774 const std::string & rsIndexSearchValue,
775 EnQueryType eQuerryType );
776 //-----------------------------------------------------------------------
817 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
818 const std::string & rsIndexSearchValue,
819 EnComparisionOp eComparisionOp );
820 //-----------------------------------------------------------------------
866 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
867 const std::string & rsFullIndexName,
868 const std::string & rsIndexSearchValue,
869 EnComparisionOp eComparisionOp );
870 //-----------------------------------------------------------------------
921 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
922 const std::string & rsIndexName,
923 unsigned long ulIndexClassID,
924 const std::string & rsIndexSearchValue,
925 EnComparisionOp eComparisionOp );
926 //-----------------------------------------------------------------------
959 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
960 const std::string & rsRangeStartIndex,
961 const std::string & rsRangeEndIndex );
962 //-----------------------------------------------------------------------
1003 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
1004 const std::string & rsFullIndexName,
1005 const std::string & rsRangeStartIndexSearchValue,
1006 const std::string & rsRangeEndIndexSearchValue );
1007 //-----------------------------------------------------------------------
1054 int getIndexedOndemands( std::vector< glo::TOndemand<T> > & rOndemandVector,
1055 const std::string & rsIndexName,
1056 unsigned long ulIndexClassID,
1057 const std::string & rsRangeStartIndexSearchValue,
1058 const std::string & rsRangeEndIndexSearchValue );
1059 //-----------------------------------------------------------------------
1116 virtual int setWatch( TdWatchNotifyMode ulWatchMode, CallBack * pCallBack = 0 );
1117 //-----------------------------------------------------------------------
1165 virtual int unsetWatch( TdWatchNotifyMode ulWatchMode, CallBack * pCallBack = 0 );
1166 //-----------------------------------------------------------------------
1167
1168 private:
1169 //============== Methoden
1170 //-----------------------------------------------------------------------
1186 void transferObjIListIntoOndemandVector( const std::vector< glo::ObjID > & rSourceContainer,
1187 std::vector< glo::TOndemand<T> > & rTargetVevtor );
1188 //-----------------------------------------------------------------------
1189
1190 //============== Operatoren
1191 //-----------------------------------------------------------------------
1202 //-----------------------------------------------------------------------
1203 };
1204 //---------------------------------------------------------------------------
1205 #define SUPER BaseAllSet
1206 //---------------------------------------------------------------------------
1207 template < class T >
1209 : SUPER()
1210 {
1211 #ifdef _DEBUG
1212 m_strDebugInfo = "TAllSet";
1213 #endif
1214 std::shared_ptr<T> t_TempT( new T, Forgeter<T>() );
1215 SUPER::setClassIDFromTemplate( t_TempT->getGloClassID() );
1216 }
1217 //---------------------------------------------------------------------------
1218 template < class T >
1219 TAllSet< T >::TAllSet( Base & rBase, bool bWithSubClasses )
1220 : SUPER( rBase, 0, bWithSubClasses )
1221 {
1222 #ifdef _DEBUG
1223 m_strDebugInfo = "TAllSet";
1224 #endif
1225 std::shared_ptr<T> t_TempT( new T, Forgeter<T>() );
1226 SUPER::setClassIDFromTemplate( t_TempT->getGloClassID() );
1227 }
1228 //---------------------------------------------------------------------------
1229 template < class T >
1230 TAllSet< T >::TAllSet( Base & rBase, const std::string & rsFullIndexName )
1231 : SUPER( rBase, 0 )
1232 {
1233 #ifdef _DEBUG
1234 m_strDebugInfo = "TAllSet";
1235 #endif
1236 std::shared_ptr<T> t_TempT( new T, Forgeter<T>() );
1237 SUPER::setClassIDFromTemplate( t_TempT->getGloClassID() );
1238 int t_iErr = SUPER::setFullIndexName( rsFullIndexName );
1239 if ( t_iErr )
1240 {
1241 throw eut::ErrorNException( "TAllSet::setBase(Base * pBase, unsigned long ulClassID, const std::string & rsFullIndexName)", t_iErr, __FILE__, __LINE__ );
1242 }
1243 }
1244 //---------------------------------------------------------------------------
1245 template < class T >
1247 {
1248 }
1249 //---------------------------------------------------------------------------
1250 template < class T >
1251 int TAllSet< T >::get( T *& prRetVal, EnSeekMode eMode )
1252 {
1253 ObjID t_TempObjID;
1254 return this->get( t_TempObjID, prRetVal, eMode );
1255 }
1256 //---------------------------------------------------------------------------
1257 template < class T >
1258 int TAllSet< T >::get( std::shared_ptr<T> & rRetVal, EnSeekMode eMode )
1259 {
1260 ObjID t_TempObjID;
1261 return this->get( t_TempObjID, rRetVal, eMode );
1262 }
1263 //---------------------------------------------------------------------------
1264 template < class T >
1265 int TAllSet< T >::get( ObjID & rObjID, T *& prRetVal, EnSeekMode eMode )
1266 {
1267 int t_iErr = 0;
1268
1269 prRetVal = 0;
1270 t_iErr = this->open();
1271 if ( ! t_iErr )
1272 {
1273 BasePersistent * t_pGetObj = 0;
1274
1275 t_iErr = this->getBase()->getObjectFromAllSet( rObjID, t_pGetObj, *this, eMode );
1276 if ( ! t_iErr )
1277 {
1278 do
1279 {
1280 prRetVal = dynamic_cast<T*>( t_pGetObj );
1281 if ( ! prRetVal )
1282 {
1283 t_pGetObj->forget();
1284
1285 if ( eMode == glo::START || eMode == glo::NEXT )
1286 {
1287 t_iErr = this->getBase()->getObjectFromAllSet( rObjID, t_pGetObj, *this, glo::NEXT );
1288 }
1289 else if ( eMode == glo::END || eMode == glo::PREVIOUS )
1290 {
1291 t_iErr = this->getBase()->getObjectFromAllSet( rObjID, t_pGetObj, *this, glo::PREVIOUS );
1292 }
1293 }
1294 else
1295 {
1296 break;
1297 }
1298 } while ( ! t_iErr );
1299 }
1300 }
1301 return t_iErr;
1302 }
1303 //---------------------------------------------------------------------------
1304 template < class T >
1305 int TAllSet< T >::get( ObjID & rObjID, std::shared_ptr<T> & rRetVal, EnSeekMode eMode )
1306 {
1307 rRetVal.reset();
1308
1309 T * t_pPersistent = 0;
1310 int t_iErr = this->get( rObjID, t_pPersistent, eMode );
1311
1312 if ( t_pPersistent )
1313 {
1314 rRetVal = std::shared_ptr<T>( t_pPersistent, Forgeter<T>() );
1315 }
1316 return t_iErr;
1317 }
1318 //---------------------------------------------------------------------------
1319 template < class T >
1320 int TAllSet< T >::getPersistent( BasePersistent *& prRetVal, const ObjID & rObjID )
1321 {
1322 int t_iErr = 0;
1323
1324 prRetVal = NULL_PTR;
1325 if ( ! this->getBase() ) return ERR_NO_BASE;
1326 if ( this->getBase()->objIDInAllSet( rObjID, *this ) )
1327 {
1328 t_iErr = this->getBase()->getAnObject( prRetVal, rObjID );
1329 }
1330 else
1331 {
1332 return ERR_OBJID_NOT_IN_ALLSET;
1333 }
1334 return t_iErr;
1335 }
1336 //---------------------------------------------------------------------------
1337 template < class T >
1338 int TAllSet< T >::get( T *& prRetVal, const ObjID & rObjID )
1339 {
1340 int t_iErr = 0;
1341
1342 prRetVal = 0;
1343 t_iErr = this->open();
1344 if ( ! t_iErr )
1345 {
1346 BasePersistent * t_pReceivedObject = 0;
1347 if ( this->getBase()->objIDInAllSet( rObjID, *this ) )
1348 {
1349 t_iErr = this->getBase()->getAnObject( t_pReceivedObject, rObjID );
1350 if ( ! t_iErr )
1351 {
1352 prRetVal = dynamic_cast<T*>( t_pReceivedObject );
1353 if ( ! prRetVal )
1354 {
1355 t_pReceivedObject->forget();
1356 t_iErr = ERR_WRONG_TYPE;
1357 }
1358 }
1359 }
1360 else
1361 {
1362 return ERR_OBJID_NOT_IN_ALLSET;
1363 }
1364 }
1365 return t_iErr;
1366 }
1367 //---------------------------------------------------------------------------
1368 template < class T >
1369 int TAllSet< T >::get( std::shared_ptr<T> & rRetVal, const ObjID & rObjID )
1370 {
1371 rRetVal.reset();
1372
1373 T * t_pPersistent = 0;
1374 int t_iErr = this->get( t_pPersistent, rObjID );
1375
1376 if ( t_pPersistent )
1377 {
1378 rRetVal = std::shared_ptr<T>( t_pPersistent, Forgeter<T>() );
1379 }
1380 return t_iErr;
1381 }
1382 //---------------------------------------------------------------------------
1383 template < class T >
1384 int TAllSet< T >::getPersistent( std::shared_ptr<BasePersistent> & rRetVal,
1385 const ObjID & rObjID )
1386 {
1387 return SUPER::getPersistent( rRetVal, rObjID );
1388 }
1389 //---------------------------------------------------------------------------
1390 template < class T >
1391 int TAllSet< T >::getOndemand( TOndemand<T> *& prRetVal, EnSeekMode eMode )
1392 {
1393 int t_iErr = 0;
1394
1395 t_iErr = this->open();
1396 if ( ! t_iErr )
1397 {
1398 ObjID t_ObjID;
1399
1400 t_iErr = this->getBase()->getObjIdFromAllSet( t_ObjID, *this, eMode );
1401 if ( ! t_iErr )
1402 {
1403 // Erfragen, ob ObjID-Klasse hier verarbeitbar
1404 bool t_bIsKnownClassID = false;
1405
1406 t_iErr = this->getBase()->isKnownClassID( t_bIsKnownClassID, t_ObjID.getClassID() );
1407 if ( ! t_iErr )
1408 {
1409 if ( ! t_bIsKnownClassID )
1410 {
1411 // Unbekannte Klasse! Auch OK, dann nächstes oder vorheriges Objekt
1412 if ( eMode == START || eMode == NEXT )
1413 {
1414 t_iErr = this->getOndemand( prRetVal, NEXT );
1415 }
1416 else if ( eMode == END || eMode == PREVIOUS )
1417 {
1418 t_iErr = this->getOndemand( prRetVal, PREVIOUS );
1419 }
1420 }
1421 else
1422 {
1423 prRetVal = new TOndemand<T>( t_ObjID, * this->getBase() );
1424 }
1425 }
1426 }
1427 }
1428 return t_iErr;
1429 }
1430 //---------------------------------------------------------------------------
1431 template < class T >
1432 int TAllSet< T >::getOndemand( std::shared_ptr< TOndemand<T> > & rRetVal, EnSeekMode eMode )
1433 {
1434 rRetVal.reset();
1435
1436 TOndemand<T> * t_pTempGloTOndemand = 0;
1437 int t_iErr = this->getOndemand( t_pTempGloTOndemand, eMode );
1438
1439 if ( t_pTempGloTOndemand )
1440 {
1441 rRetVal = std::shared_ptr<T>( t_pTempGloTOndemand );
1442 }
1443 return t_iErr;
1444 }
1445 //---------------------------------------------------------------------------
1446 template < class T >
1447 int TAllSet< T >::getOndemand( TOndemand<T> & rRetVal, EnSeekMode eMode )
1448 {
1449 TOndemand<T> * t_pTempGloTOndemand = 0;
1450 int t_iErr = this->getOndemand( t_pTempGloTOndemand, eMode );
1451
1452 if ( t_pTempGloTOndemand )
1453 {
1454 rRetVal = * t_pTempGloTOndemand;
1455 delete t_pTempGloTOndemand;
1456 }
1457 return t_iErr;
1458 }
1459 //---------------------------------------------------------------------------
1460 template < class T >
1461 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1462 const std::string & rsIndexSearchValue,
1463 EnQueryType eQuerryType )
1464 {
1465 int t_iErr = 0;
1466 std::vector< ObjID > t_ObjIDContainer;
1467
1468 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1469 rsIndexSearchValue,
1470 eQuerryType );
1471 if ( ! t_iErr )
1472 {
1473 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1474 }
1475 return t_iErr;
1476 }
1477 //---------------------------------------------------------------------------
1478 template < class T >
1479 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1480 const std::string & rsFullIndexName,
1481 const std::string & rsIndexSearchValue,
1482 EnQueryType eQuerryType )
1483 {
1484 int t_iErr = 0;
1485 std::vector< ObjID > t_ObjIDContainer;
1486
1487 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1488 rsFullIndexName,
1489 rsIndexSearchValue,
1490 eQuerryType );
1491 if ( ! t_iErr )
1492 {
1493 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1494 }
1495 return t_iErr;
1496 }
1497 //---------------------------------------------------------------------------
1498 template < class T >
1499 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1500 const std::string & rsIndexName,
1501 unsigned long ulIndexClassID,
1502 const std::string & rsIndexSearchValue,
1503 EnQueryType eQuerryType )
1504 {
1505 int t_iErr = 0;
1506 std::vector< ObjID > t_ObjIDContainer;
1507
1508 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1509 rsIndexName,
1510 ulIndexClassID,
1511 rsIndexSearchValue,
1512 eQuerryType );
1513 if ( ! t_iErr )
1514 {
1515 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1516 }
1517 return t_iErr;
1518 }
1519 //---------------------------------------------------------------------------
1520 template < class T >
1521 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1522 const std::string & rsIndexSearchValue,
1523 EnComparisionOp eComparisionOp )
1524 {
1525 int t_iErr = 0;
1526 std::vector< ObjID > t_ObjIDContainer;
1527
1528 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1529 rsIndexSearchValue,
1530 eComparisionOp );
1531
1532 if ( ! t_iErr )
1533 {
1534 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1535 }
1536 return t_iErr;
1537 }
1538 //---------------------------------------------------------------------------
1539 template < class T >
1540 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1541 const std::string & rsFullIndexName,
1542 const std::string & rsIndexSearchValue,
1543 EnComparisionOp eComparisionOp )
1544 {
1545 int t_iErr = 0;
1546 std::vector< ObjID > t_ObjIDContainer;
1547
1548 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1549 rsFullIndexName,
1550 rsIndexSearchValue,
1551 eComparisionOp );
1552
1553 if ( ! t_iErr )
1554 {
1555 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1556 }
1557 return t_iErr;
1558 }
1559 //---------------------------------------------------------------------------
1560 template < class T >
1561 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1562 const std::string & rsIndexName,
1563 unsigned long ulIndexClassID,
1564 const std::string & rsIndexSearchValue,
1565 EnComparisionOp eComparisionOp )
1566 {
1567 int t_iErr = 0;
1568 std::vector< ObjID > t_ObjIDContainer;
1569
1570 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1571 rsIndexName,
1572 ulIndexClassID,
1573 rsIndexSearchValue,
1574 eComparisionOp );
1575
1576 if ( ! t_iErr )
1577 {
1578 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1579 }
1580 return t_iErr;
1581 }
1582 //---------------------------------------------------------------------------
1583 template < class T >
1584 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1585 const std::string & rsRangeStartIndex,
1586 const std::string & rsRangeEndIndex )
1587 {
1588 int t_iErr = 0;
1589 std::vector< ObjID > t_ObjIDContainer;
1590
1591 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1592 rsRangeStartIndex,
1593 rsRangeEndIndex );
1594
1595 if ( ! t_iErr )
1596 {
1597 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1598 }
1599 return t_iErr;
1600 }
1601 //---------------------------------------------------------------------------
1602 template < class T >
1603 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1604 const std::string & rsFullIndexName,
1605 const std::string & rsRangeStartIndexSearchValue,
1606 const std::string & rsRangeEndIndexSearchValue )
1607 {
1608 int t_iErr = 0;
1609 std::vector< ObjID > t_ObjIDContainer;
1610
1611 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1612 rsFullIndexName,
1613 rsRangeStartIndexSearchValue,
1614 rsRangeEndIndexSearchValue );
1615
1616 if ( ! t_iErr )
1617 {
1618 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1619 }
1620 return t_iErr;
1621 }
1622 //---------------------------------------------------------------------------
1623 template < class T >
1624 int TAllSet< T >::getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector,
1625 const std::string & rsIndexName,
1626 unsigned long ulIndexClassID,
1627 const std::string & rsRangeStartIndexSearchValue,
1628 const std::string & rsRangeEndIndexSearchValue )
1629 {
1630 int t_iErr = 0;
1631 std::vector< ObjID > t_ObjIDContainer;
1632
1633 t_iErr = this->getIndexedObjIds( t_ObjIDContainer,
1634 rsIndexName,
1635 ulIndexClassID,
1636 rsRangeStartIndexSearchValue,
1637 rsRangeEndIndexSearchValue );
1638
1639 if ( ! t_iErr )
1640 {
1641 this->transferObjIListIntoOndemandVector( t_ObjIDContainer, rOndemandVector );
1642 }
1643 return t_iErr;
1644 }
1645 //---------------------------------------------------------------------------
1646 template < class T >
1647 int TAllSet< T >::setWatch( TdWatchNotifyMode ulWatchMode, CallBack * pCallBack )
1648 {
1649 int t_iErr = this->open();
1650
1651 if ( ! t_iErr )
1652 {
1653 if ( ! this->getBase()->getObjectMaker() ) t_iErr = ERR_BASE_NOT_OPEN;
1654 if ( ! t_iErr )
1655 {
1656 if ( ! pCallBack )
1657 {
1658 TAllSet< T > * t_pConstCastThis = const_cast<TAllSet< T >*>( this );
1659
1660 pCallBack = t_pConstCastThis;
1661 }
1662 t_iErr = this->getBase()->setWatchClass( this->getBase()->getObjectMaker()->getClassID( this ),
1663 ulWatchMode,
1664 pCallBack );
1665 }
1666 }
1667 return t_iErr;
1668 }
1669 //---------------------------------------------------------------------------
1670 template < class T >
1671 int TAllSet< T >::unsetWatch( TdWatchNotifyMode ulWatchMode, CallBack * pCallBack )
1672 {
1673 if ( ! this->getBase() ) return ERR_NO_BASE;
1674 if ( ! this->getBase()->getObjectMaker() ) return ERR_BASE_NOT_OPEN;
1675
1676 if ( ! pCallBack )
1677 {
1678 TAllSet< T > * t_pConstCastThis = const_cast<TAllSet< T >*>( this );
1679
1680 pCallBack = t_pConstCastThis;
1681 }
1682 return this->getBase()->unsetWatchClass( this->getBase()->getObjectMaker()->getClassID( this ),
1683 ulWatchMode, pCallBack );
1684 }
1685 //---------------------------------------------------------------------------
1686 template < class T >
1687 void TAllSet< T >::transferObjIListIntoOndemandVector( const std::vector< glo::ObjID > & rSourceContainer,
1688 std::vector< TOndemand<T> > & rTargetVevtor )
1689 {
1690 for ( std::vector<ObjID>::const_iterator t_Iterator = rSourceContainer.begin();
1691 t_Iterator != rSourceContainer.end();
1692 ++t_Iterator )
1693 {
1694 rTargetVevtor.push_back( TOndemand<T>( * t_Iterator, * this->getBase() ) );
1695 }
1696 }
1697 //---------------------------------------------------------------------------
1698 #undef SUPER
1699 //---------------------------------------------------------------------------
1700} // namespace glo
1701#endif
#define NULL_PTR
Definition EuDef_NULL_PTR.h:74
Header for BaseAllSet
Header for BasePersistent
#define SUPER
Definition GloTOndemand.h:328
Is the base class of template AllSets and the generic AllSet.
Definition GloBaseAllSet.h:80
friend class Base
Definition GloBaseAllSet.h:205
Abstract base class for Persistent and the generic GenericPersistent.
Definition GloBasePersistent.h:116
virtual unsigned int forget()
Superclass for the classes that are 'connected' to a Base.
Definition GloCallBack.h:74
std::string m_strDebugInfo
Definition GloCallBack.h:115
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:77
unsigned long getClassID() const
AllSet, which returns objects from the database.
Definition GloTAllSet.h:185
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue)
Definition GloTAllSet.h:1624
virtual int getPersistent(std::shared_ptr< BasePersistent > &rRetVal, const glo::ObjID &rObjID)
Definition GloTAllSet.h:1384
int get(std::shared_ptr< T > &rRetVal, EnSeekMode eMode)
Definition GloTAllSet.h:1258
int get(glo::ObjID &rObjID, T *&prRetVal, EnSeekMode eMode)
Definition GloTAllSet.h:1265
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
Definition GloTAllSet.h:1521
int get(T *&prRetVal, const glo::ObjID &rObjID)
Returns an object from the AllSet of the database with passed object ID.
Definition GloTAllSet.h:1338
virtual int getPersistent(BasePersistent *&prRetVal, const glo::ObjID &rObjID)
Returns an object from the AllSet of the database with passed object ID.
Definition GloTAllSet.h:1320
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
Definition GloTAllSet.h:1561
int get(T *&prRetVal, EnSeekMode eMode)
Definition GloTAllSet.h:1251
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsFullIndexName, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
Definition GloTAllSet.h:1540
TAllSet()
Definition GloTAllSet.h:1208
TAllSet(Base &rBase, bool bWithSubClasses=true)
Definition GloTAllSet.h:1219
int getOndemand(glo::TOndemand< T > &rRetVal, EnSeekMode eMode)
Definition GloTAllSet.h:1447
virtual int setWatch(TdWatchNotifyMode ulWatchMode, CallBack *pCallBack=0)
Definition GloTAllSet.h:1647
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
Definition GloTAllSet.h:1499
TAllSet(const TAllSet &)
int get(glo::ObjID &rObjID, std::shared_ptr< T > &rRetVal, EnSeekMode eMode)
Definition GloTAllSet.h:1305
virtual ~TAllSet()
Definition GloTAllSet.h:1246
int get(std::shared_ptr< T > &rRetVal, const glo::ObjID &rObjID)
Definition GloTAllSet.h:1369
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsFullIndexName, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
Definition GloTAllSet.h:1479
virtual int unsetWatch(TdWatchNotifyMode ulWatchMode, CallBack *pCallBack=0)
Definition GloTAllSet.h:1671
void transferObjIListIntoOndemandVector(const std::vector< glo::ObjID > &rSourceContainer, std::vector< glo::TOndemand< T > > &rTargetVevtor)
Definition GloTAllSet.h:1687
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsRangeStartIndex, const std::string &rsRangeEndIndex)
Definition GloTAllSet.h:1584
TAllSet(Base &rBase, const std::string &rsFullIndexName)
Definition GloTAllSet.h:1230
int getOndemand(std::shared_ptr< glo::TOndemand< T > > &rRetVal, EnSeekMode eMode)
Definition GloTAllSet.h:1432
TAllSet< T > & operator=(const TAllSet &)
int getOndemand(glo::TOndemand< T > *&prRetVal, EnSeekMode eMode)
Definition GloTAllSet.h:1391
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
Definition GloTAllSet.h:1461
int getIndexedOndemands(std::vector< glo::TOndemand< T > > &rOndemandVector, const std::string &rsFullIndexName, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue)
Definition GloTAllSet.h:1603
A reference (as attribute) of a persistent object to another persistent object in the database.
Definition GloTOndemand.h:89
Definition GloBasePersistent.h:52