summaryrefslogtreecommitdiff
path: root/libopie/pim/opimaccesstemplate.h
Unidiff
Diffstat (limited to 'libopie/pim/opimaccesstemplate.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/opimaccesstemplate.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/libopie/pim/opimaccesstemplate.h b/libopie/pim/opimaccesstemplate.h
index 36f5a99..31ab516 100644
--- a/libopie/pim/opimaccesstemplate.h
+++ b/libopie/pim/opimaccesstemplate.h
@@ -40,17 +40,17 @@ public:
40 /** 40 /**
41 * load from the backend 41 * load from the backend
42 */ 42 */
43 virtual void load(); 43 virtual bool load();
44 44
45 /** 45 /**
46 * reload from the backend 46 * reload from the backend
47 */ 47 */
48 virtual void reload(); 48 virtual bool reload();
49 49
50 /** 50 /**
51 * save to the backend 51 * save to the backend
52 */ 52 */
53 virtual void save(); 53 virtual bool save();
54 54
55 /** 55 /**
56 * if the resource was changed externally 56 * if the resource was changed externally
@@ -71,7 +71,7 @@ public:
71 /** 71 /**
72 * find the OPimRecord uid 72 * find the OPimRecord uid
73 */ 73 */
74 virtual T find( int uid ); 74 virtual T find( int uid )const;
75 75
76 /* invalidate cache here */ 76 /* invalidate cache here */
77 /** 77 /**
@@ -105,6 +105,7 @@ protected:
105 */ 105 */
106 void invalidateCache(); 106 void invalidateCache();
107 107
108 void setBackEnd( BackEnd* end );
108 /** 109 /**
109 * returns the backend 110 * returns the backend
110 */ 111 */
@@ -125,16 +126,16 @@ OPimAccessTemplate<T>::~OPimAccessTemplate() {
125 delete m_backEnd; 126 delete m_backEnd;
126} 127}
127template <class T> 128template <class T>
128void OPimAccessTemplate<T>::load() { 129bool OPimAccessTemplate<T>::load() {
129 m_backEnd->load(); 130 return m_backEnd->load();
130} 131}
131template <class T> 132template <class T>
132void OPimAccessTemplate<T>::reload() { 133bool OPimAccessTemplate<T>::reload() {
133 m_backEnd->reload(); 134 return m_backEnd->reload();
134} 135}
135template <class T> 136template <class T>
136void OPimAccessTemplate<T>::save() { 137bool OPimAccessTemplate<T>::save() {
137 m_backEnd->save(); 138 return m_backEnd->save();
138} 139}
139template <class T> 140template <class T>
140OPimAccessTemplate<T>::List OPimAccessTemplate<T>::allRecords()const { 141OPimAccessTemplate<T>::List OPimAccessTemplate<T>::allRecords()const {
@@ -151,7 +152,7 @@ OPimAccessTemplate<T>::queryByExample( const T& t, int sortOrder ) {
151 return lis; 152 return lis;
152} 153}
153template <class T> 154template <class T>
154T OPimAccessTemplate<T>::find( int uid ) { 155T OPimAccessTemplate<T>::find( int uid ) const{
155 T t = m_backEnd->find( uid ); 156 T t = m_backEnd->find( uid );
156 return t; 157 return t;
157} 158}
@@ -188,4 +189,8 @@ template <class T>
188bool OPimAccessTemplate<T>::wasChangedExternally()const { 189bool OPimAccessTemplate<T>::wasChangedExternally()const {
189 return false; 190 return false;
190} 191}
192template <class T>
193void OPimAccessTemplate<T>::setBackEnd( BackEnd* end ) {
194 m_backEnd = end;
195}
191#endif 196#endif