bump product version to 5.0.4.1
[LibreOffice.git] / connectivity / source / inc / OColumn.hxx
blob74563555a51e5a530a638a2f0303f81ccc1376b7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_OCOLUMN_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_INC_OCOLUMN_HXX
23 #include <rtl/ustring.hxx>
24 #include <sal/types.h>
25 #include <connectivity/dbtoolsdllapi.hxx>
27 namespace connectivity
29 class OOO_DLLPUBLIC_DBTOOLS OColumn
31 OUString m_CatalogName;
32 OUString m_SchemaName;
33 OUString m_TableName;
34 OUString m_ColumnName;
35 OUString m_ColumnLabel;
36 OUString m_ColumnTypeName;
37 OUString m_ColumnServiceName;
39 sal_Int32 m_Nullable;
40 sal_Int32 m_ColumnDisplaySize;
41 sal_Int32 m_Precision;
42 sal_Int32 m_Scale;
43 sal_Int32 m_ColumnType;
45 bool m_AutoIncrement;
46 bool m_CaseSensitive;
47 bool m_Searchable;
48 bool m_Currency;
49 bool m_Signed;
50 bool m_ReadOnly;
51 bool m_Writable;
52 bool m_DefinitelyWritable;
54 public:
55 OColumn()
56 : m_Nullable(0)
57 , m_ColumnDisplaySize(0)
58 , m_Precision(0)
59 , m_Scale(0)
60 , m_ColumnType(0)
62 , m_AutoIncrement(false)
63 , m_CaseSensitive(false)
64 , m_Searchable(true)
65 , m_Currency(false)
66 , m_Signed(false)
67 , m_ReadOnly(true)
68 , m_Writable(false)
69 , m_DefinitelyWritable(false)
72 OColumn(const OUString &_aTableName,
73 const OUString &_aColumnName,
75 sal_Int32 _aNullable=0,
76 sal_Int32 _aColumnDisplaySize=0,
77 sal_Int32 _aPrecision=0,
78 sal_Int32 _aScale=0,
79 sal_Int32 _aColumnType=0,
81 bool _aAutoIncrement=false,
82 bool _aCaseSensitive=false,
83 bool _aSearchable=true,
84 bool _aCurrency=false,
85 bool _aSigned=false,
86 bool _aReadOnly=true,
87 bool _aWritable=false,
88 bool _aDefinitelyWritable=false,
90 const OUString &_aColumnLabel = OUString(),
91 const OUString &_aColumnTypeName = OUString(),
92 const OUString &_aColumnServiceName = OUString())
93 : m_TableName(_aTableName),
94 m_ColumnName(_aColumnName),
95 m_ColumnLabel(_aColumnLabel),
96 m_ColumnTypeName(_aColumnTypeName),
97 m_ColumnServiceName(_aColumnServiceName),
99 m_Nullable(_aNullable),
100 m_ColumnDisplaySize(_aColumnDisplaySize),
101 m_Precision(_aPrecision),
102 m_Scale(_aScale),
103 m_ColumnType(_aColumnType),
105 m_AutoIncrement(_aAutoIncrement),
106 m_CaseSensitive(_aCaseSensitive),
107 m_Searchable(_aSearchable),
108 m_Currency(_aCurrency),
109 m_Signed(_aSigned),
110 m_ReadOnly(_aReadOnly),
111 m_Writable(_aWritable),
112 m_DefinitelyWritable(_aDefinitelyWritable)
114 if(m_ColumnLabel.isEmpty())
115 m_ColumnLabel = _aColumnName;
118 inline static void * SAL_CALL operator new( size_t nSize )
119 { return ::rtl_allocateMemory( nSize ); }
120 inline static void * SAL_CALL operator new( size_t ,void* _pHint )
121 { return _pHint; }
122 inline static void SAL_CALL operator delete( void * pMem )
123 { ::rtl_freeMemory( pMem ); }
124 inline static void SAL_CALL operator delete( void *,void* )
127 bool isAutoIncrement() const { return m_AutoIncrement; }
128 bool isCaseSensitive() const { return m_CaseSensitive; }
129 bool isSearchable() const { return m_Searchable; }
130 bool isCurrency() const { return m_Currency; }
131 bool isSigned() const { return m_Signed; }
132 bool isReadOnly() const { return m_ReadOnly; }
133 bool isWritable() const { return m_Writable; }
134 bool isDefinitelyWritable() const { return m_DefinitelyWritable; }
136 sal_Int32 isNullable() const { return m_Nullable; }
137 sal_Int32 getColumnDisplaySize() const { return m_ColumnDisplaySize; }
138 sal_Int32 getPrecision() const { return m_Precision; }
139 sal_Int32 getScale() const { return m_Scale; }
140 sal_Int32 getColumnType() const { return m_ColumnType; }
142 const OUString& getColumnLabel() const { return m_ColumnLabel; }
143 const OUString& getColumnName() const { return m_ColumnName; }
144 const OUString& getSchemaName() const { return m_SchemaName; }
145 const OUString& getTableName() const { return m_TableName; }
146 const OUString& getCatalogName() const { return m_CatalogName; }
147 const OUString& getColumnTypeName() const { return m_ColumnTypeName; }
148 const OUString& getColumnServiceName() const { return m_ColumnServiceName; }
153 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_OCOLUMN_HXX
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */