LibreOffice Module connectivity (master) 1
OColumn.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
20#pragma once
21
22#include <rtl/ustring.hxx>
23#include <sal/types.h>
25#include <utility>
26
27namespace connectivity
28{
30 {
31 OUString m_TableName;
32 OUString m_ColumnName;
33 OUString m_ColumnLabel;
34
35 sal_Int32 m_Nullable;
37 sal_Int32 m_Precision;
38 sal_Int32 m_Scale;
39 sal_Int32 m_ColumnType;
40
49
50 public:
52 : m_Nullable(0)
53 , m_ColumnDisplaySize(0)
54 , m_Precision(0)
55 , m_Scale(0)
56 , m_ColumnType(0)
57
58 , m_AutoIncrement(false)
59 , m_CaseSensitive(false)
60 , m_Searchable(true)
61 , m_Currency(false)
62 , m_Signed(false)
63 , m_ReadOnly(true)
64 , m_Writable(false)
65 , m_DefinitelyWritable(false)
66 {}
67
68 OColumn(OUString _aTableName,
69 const OUString &_aColumnName,
70 sal_Int32 _aNullable,
71 sal_Int32 _aColumnDisplaySize,
72 sal_Int32 _aPrecision,
73 sal_Int32 _aScale,
74 sal_Int32 _aColumnType)
75 : m_TableName(std::move(_aTableName)),
76 m_ColumnName(_aColumnName),
77 m_ColumnLabel(),
78
79 m_Nullable(_aNullable),
80 m_ColumnDisplaySize(_aColumnDisplaySize),
81 m_Precision(_aPrecision),
82 m_Scale(_aScale),
83 m_ColumnType(_aColumnType),
84
85 m_AutoIncrement(false),
86 m_CaseSensitive(false),
87 m_Searchable(true),
88 m_Currency(false),
89 m_Signed(false),
90 m_ReadOnly(true),
91 m_Writable(false),
92 m_DefinitelyWritable(false)
93 {
94 if(m_ColumnLabel.isEmpty())
95 m_ColumnLabel = _aColumnName;
96 }
97
98 bool isAutoIncrement() const { return m_AutoIncrement; }
99 bool isCaseSensitive() const { return m_CaseSensitive; }
100 bool isSearchable() const { return m_Searchable; }
101 bool isCurrency() const { return m_Currency; }
102 bool isSigned() const { return m_Signed; }
103 bool isReadOnly() const { return m_ReadOnly; }
104 bool isWritable() const { return m_Writable; }
105 bool isDefinitelyWritable() const { return m_DefinitelyWritable; }
106
107 sal_Int32 isNullable() const { return m_Nullable; }
108 sal_Int32 getColumnDisplaySize() const { return m_ColumnDisplaySize; }
109 sal_Int32 getPrecision() const { return m_Precision; }
110 sal_Int32 getScale() const { return m_Scale; }
111 sal_Int32 getColumnType() const { return m_ColumnType; }
112
113 const OUString& getColumnLabel() const { return m_ColumnLabel; }
114 const OUString& getColumnName() const { return m_ColumnName; }
115 const OUString& getTableName() const { return m_TableName; }
116 };
117}
118
119/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 getColumnDisplaySize() const
Definition: OColumn.hxx:108
bool isDefinitelyWritable() const
Definition: OColumn.hxx:105
const OUString & getColumnName() const
Definition: OColumn.hxx:114
sal_Int32 getColumnType() const
Definition: OColumn.hxx:111
sal_Int32 m_ColumnDisplaySize
Definition: OColumn.hxx:36
bool isSearchable() const
Definition: OColumn.hxx:100
bool isSigned() const
Definition: OColumn.hxx:102
OUString m_ColumnName
Definition: OColumn.hxx:32
const OUString & getColumnLabel() const
Definition: OColumn.hxx:113
sal_Int32 getScale() const
Definition: OColumn.hxx:110
sal_Int32 m_ColumnType
Definition: OColumn.hxx:39
sal_Int32 m_Nullable
Definition: OColumn.hxx:35
sal_Int32 m_Precision
Definition: OColumn.hxx:37
bool isReadOnly() const
Definition: OColumn.hxx:103
const OUString & getTableName() const
Definition: OColumn.hxx:115
bool isAutoIncrement() const
Definition: OColumn.hxx:98
bool isCurrency() const
Definition: OColumn.hxx:101
OUString m_TableName
Definition: OColumn.hxx:31
sal_Int32 getPrecision() const
Definition: OColumn.hxx:109
OColumn(OUString _aTableName, const OUString &_aColumnName, sal_Int32 _aNullable, sal_Int32 _aColumnDisplaySize, sal_Int32 _aPrecision, sal_Int32 _aScale, sal_Int32 _aColumnType)
Definition: OColumn.hxx:68
bool isCaseSensitive() const
Definition: OColumn.hxx:99
bool isWritable() const
Definition: OColumn.hxx:104
OUString m_ColumnLabel
Definition: OColumn.hxx:33
sal_Int32 isNullable() const
Definition: OColumn.hxx:107
#define OOO_DLLPUBLIC_DBTOOLS