1 /***************************************************************************
2 * Copyright (C) 2008 by Sverre Rabbelier *
3 * sverre@rabbelier.nl *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 3 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
24 * This file contains the Join class.
32 * This class represents a checked join between two tables.
34 * With this class a join may be specified bewteen two tables.
35 * The native key should belong to the native table and the foreign key to the join table.
36 * Only one of the two keys may be a non-foreign key.
37 * Even so, either key should point to the other table.
38 * This is asserted at run-time.
43 /** Construct a Join between the specified tables with the specified keys. */
44 Join(TableImplPtr nativeTable
, TableImplPtr joinTable
, KeyImplPtr nativeKey
, KeyImplPtr foreignKey
);
46 /** Destructor, a noop. */
50 /** Returns the native table. */
51 TableImplPtr
getNativeTable() const;
53 /** Returns the join table. */
54 TableImplPtr
getJoinTable() const;
56 /** Returns the native key. */
57 KeyImplPtr
getNativeKey() const;
59 /** Returns the foreign key. */
60 KeyImplPtr
getForeignKey() const;
63 TableImplPtr m_nativeTable
; /**< The native table. */
64 TableImplPtr m_joinTable
; /**< The join table. */
65 KeyImplPtr m_nativeKey
; /**< The native key. */
66 KeyImplPtr m_foreignKey
; /**< The foreign key. */