Dataquay 0.8
Transaction.h
Go to the documentation of this file.
1/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3/*
4 Dataquay
5
6 A C++/Qt library for simple RDF datastore management.
7 Copyright 2009-2012 Chris Cannam.
8
9 Permission is hereby granted, free of charge, to any person
10 obtaining a copy of this software and associated documentation
11 files (the "Software"), to deal in the Software without
12 restriction, including without limitation the rights to use, copy,
13 modify, merge, publish, distribute, sublicense, and/or sell copies
14 of the Software, and to permit persons to whom the Software is
15 furnished to do so, subject to the following conditions:
16
17 The above copyright notice and this permission notice shall be
18 included in all copies or substantial portions of the Software.
19
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
24 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
25 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
28 Except as contained in this notice, the name of Chris Cannam
29 shall not be used in advertising or otherwise to promote the sale,
30 use or other dealings in this Software without prior written
31 authorization.
32*/
33
34#ifndef DATAQUAY_TRANSACTION_H
35#define DATAQUAY_TRANSACTION_H
36
37#include "Store.h"
38
39namespace Dataquay
40{
41
52class Transaction : public Store
53{
54public:
64 virtual ~Transaction() { }
65
76 virtual void commit() = 0;
77
87 virtual void rollback() = 0;
88
98 virtual ChangeSet getCommittedChanges() const = 0;
99
112 virtual ChangeSet getChanges() const = 0;
113
114protected:
116
117private:
118 Transaction(const Transaction &);
119 Transaction &operator=(const Transaction &);
120};
121
122extern Transaction *const NoTransaction;
123
124}
125
126#endif
Store is an abstract interface for Dataquay RDF data stores.
Definition Store.h:72
Transaction is an abstract interface for classes that read and write an RDF Store within the context ...
Definition Transaction.h:53
virtual void commit()=0
Commit this transaction.
virtual ChangeSet getCommittedChanges() const =0
Return the ChangeSet committed in this transaction.
virtual void rollback()=0
Roll back this transaction.
virtual ~Transaction()
Delete this transaction object.
Definition Transaction.h:64
virtual ChangeSet getChanges() const =0
Return the ChangeSet for this transaction to date.
QList< Change > ChangeSet
A sequence of add/remove operations such as may be enacted by a transaction.
Definition Store.h:63
Transaction *const NoTransaction