1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <rtl/ustring.hxx>
23 #include <sal/types.h>
24 #include <connectivity/dbtoolsdllapi.hxx>
27 namespace connectivity
29 class OOO_DLLPUBLIC_DBTOOLS OColumn
32 OUString m_ColumnName
;
33 OUString m_ColumnLabel
;
36 sal_Int32 m_ColumnDisplaySize
;
37 sal_Int32 m_Precision
;
39 sal_Int32 m_ColumnType
;
48 bool m_DefinitelyWritable
;
53 , m_ColumnDisplaySize(0)
58 , m_AutoIncrement(false)
59 , m_CaseSensitive(false)
65 , m_DefinitelyWritable(false)
68 OColumn(OUString _aTableName
,
69 const OUString
&_aColumnName
,
71 sal_Int32 _aColumnDisplaySize
,
72 sal_Int32 _aPrecision
,
74 sal_Int32 _aColumnType
)
75 : m_TableName(std::move(_aTableName
)),
76 m_ColumnName(_aColumnName
),
79 m_Nullable(_aNullable
),
80 m_ColumnDisplaySize(_aColumnDisplaySize
),
81 m_Precision(_aPrecision
),
83 m_ColumnType(_aColumnType
),
85 m_AutoIncrement(false),
86 m_CaseSensitive(false),
92 m_DefinitelyWritable(false)
94 if(m_ColumnLabel
.isEmpty())
95 m_ColumnLabel
= _aColumnName
;
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
; }
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
; }
113 const OUString
& getColumnLabel() const { return m_ColumnLabel
; }
114 const OUString
& getColumnName() const { return m_ColumnName
; }
115 const OUString
& getTableName() const { return m_TableName
; }
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */