00001 /******************************************************************************/ 00002 /* */ 00003 /* POLiTe - Persistent Object Library Test */ 00004 /* Ph.D. Thesis by Mgr. Michal Kopecky */ 00005 /* */ 00006 /* Charles University Prague */ 00007 /* */ 00008 /******************************************************************************/ 00009 /* */ 00010 /* File name: ... */ 00011 /* Module: ...... */ 00012 /* */ 00013 /******************************************************************************/ 00014 00015 #ifndef __C_QUEREFPROTO_H__ 00016 #define __C_QUEREFPROTO_H__ 00017 00018 // Common POLiTe Header(s) 00019 #include <lStr.h> 00020 00021 class DLL_External QueRefProto { 00022 #ifdef POLITE_TEST_FRIEND 00023 friend POLITE_TEST_FRIEND; 00024 #endif // POLITE_TEST_FRIEND 00025 00026 friend class Query; 00027 friend class ComplexQuery; 00028 friend class Object; 00029 friend class ProtoBase; 00030 friend class Relation; 00031 friend class OneToOneRelationBase; 00032 friend class OneToManyRelationBase; 00033 friend class ManyToOneRelationBase; 00034 friend class ManyToManyRelationBase; 00035 friend class ChainedRelationBase; 00036 00037 protected: 00038 // char *_where; 00039 // char *_order_by; 00040 00041 public: 00042 class Query operator !() const; 00043 class Query operator ||(const QueRefProto & Q) const; 00044 class Query operator &&(const QueRefProto & Q) const; 00045 00046 protected: 00047 virtual char *_Where() const=0; 00048 virtual char *_OrderBy() const=0; 00049 virtual char *_Select() const {return NULL;}; 00050 //replace columns selected, when not NULL 00051 virtual char *_From() const {return NULL;}; 00052 //add to list of tables, when not null 00053 }; 00054 00055 #endif //__C_QUEREFPROTO_H__