LibreOffice Module dbaccess (master) 1
QTableConnectionData.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
23#include <QEnumTypes.hxx>
24
25namespace dbaui
26{
28 {
33
35 public:
38 OQueryTableConnectionData( const TTableWindowData::value_type& _pReferencingTable,const TTableWindowData::value_type& _pReferencedTable );
39 virtual ~OQueryTableConnectionData() override;
40
41 virtual void CopyFrom(const OTableConnectionData& rSource) override;
42 virtual std::shared_ptr<OTableConnectionData> NewInstance() const override;
43
44
49 virtual bool Update() override;
50
51 OUString const & GetAliasName(EConnectionSide nWhich) const;
52
53 sal_Int32 GetFieldIndex(EConnectionSide nWhich) const { return nWhich==JTCS_TO ? m_nDestEntryIndex : m_nFromEntryIndex; }
54 void SetFieldIndex(EConnectionSide nWhich, sal_Int32 nVal) { if (nWhich==JTCS_TO) m_nDestEntryIndex=nVal; else m_nFromEntryIndex=nVal; }
55
56 void InitFromDrag(const OTableFieldDescRef& rDragLeft, const OTableFieldDescRef& rDragRight);
57
58 EJoinType GetJoinType() const { return m_eJoinType; };
59 void SetJoinType(const EJoinType& eJT) { m_eJoinType = eJT; };
60
61 void setNatural(bool _bNatural) { m_bNatural = _bNatural; }
62 bool isNatural() const { return m_bNatural; }
63 };
64
65}
66
67/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 GetFieldIndex(EConnectionSide nWhich) const
void SetFieldIndex(EConnectionSide nWhich, sal_Int32 nVal)
OQueryTableConnectionData & operator=(const OQueryTableConnectionData &rConnData)
void SetJoinType(const EJoinType &eJT)
virtual void CopyFrom(const OTableConnectionData &rSource) override
initialise from a source (more comfortable than a virtual assignment operator)
virtual std::shared_ptr< OTableConnectionData > NewInstance() const override
deliver a new instance of my own type
virtual bool Update() override
Update create a new connection.
OUString const & GetAliasName(EConnectionSide nWhich) const
void InitFromDrag(const OTableFieldDescRef &rDragLeft, const OTableFieldDescRef &rDragRight)
Contains all connection data which exists between two windows.
EConnectionSide
Definition: QEnumTypes.hxx:42
@ JTCS_TO
Definition: QEnumTypes.hxx:44