Bump for 3.6-28
[LibreOffice.git] / connectivity / source / inc / OColumn.hxx
blob076a4e68123f9ba3f93395542192d23d65da2971
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _CONNECTIVITY_COLUMN_HXX_
30 #define _CONNECTIVITY_COLUMN_HXX_
32 #include <rtl/ustring.hxx>
33 #include <sal/types.h>
34 #include "connectivity/dbtoolsdllapi.hxx"
36 namespace connectivity
38 class OOO_DLLPUBLIC_DBTOOLS OColumn
40 ::rtl::OUString m_CatalogName;
41 ::rtl::OUString m_SchemaName;
42 ::rtl::OUString m_TableName;
43 ::rtl::OUString m_ColumnName;
44 ::rtl::OUString m_ColumnLabel;
45 ::rtl::OUString m_ColumnTypeName;
46 ::rtl::OUString m_ColumnServiceName;
48 sal_Int32 m_Nullable;
49 sal_Int32 m_ColumnDisplaySize;
50 sal_Int32 m_Precision;
51 sal_Int32 m_Scale;
52 sal_Int32 m_ColumnType;
54 sal_Bool m_AutoIncrement;
55 sal_Bool m_CaseSensitive;
56 sal_Bool m_Searchable;
57 sal_Bool m_Currency;
58 sal_Bool m_Signed;
59 sal_Bool m_ReadOnly;
60 sal_Bool m_Writable;
61 sal_Bool m_DefinitelyWritable;
63 public:
64 OColumn() {}
65 OColumn(const ::rtl::OUString &_aTableName,
66 const ::rtl::OUString &_aColumnName,
68 sal_Int32 _aNullable=0,
69 sal_Int32 _aColumnDisplaySize=0,
70 sal_Int32 _aPrecision=0,
71 sal_Int32 _aScale=0,
72 sal_Int32 _aColumnType=0,
74 sal_Bool _aAutoIncrement=sal_False,
75 sal_Bool _aCaseSensitive=sal_False,
76 sal_Bool _aSearchable=sal_True,
77 sal_Bool _aCurrency=sal_False,
78 sal_Bool _aSigned=sal_False,
79 sal_Bool _aReadOnly=sal_True,
80 sal_Bool _aWritable=sal_False,
81 sal_Bool _aDefinitelyWritable=sal_False,
83 const ::rtl::OUString &_aColumnLabel = ::rtl::OUString(),
84 const ::rtl::OUString &_aColumnTypeName = ::rtl::OUString(),
85 const ::rtl::OUString &_aColumnServiceName = ::rtl::OUString())
86 : m_TableName(_aTableName),
87 m_ColumnName(_aColumnName),
88 m_ColumnLabel(_aColumnLabel),
89 m_ColumnTypeName(_aColumnTypeName),
90 m_ColumnServiceName(_aColumnServiceName),
92 m_Nullable(_aNullable),
93 m_ColumnDisplaySize(_aColumnDisplaySize),
94 m_Precision(_aPrecision),
95 m_Scale(_aScale),
96 m_ColumnType(_aColumnType),
98 m_AutoIncrement(_aAutoIncrement),
99 m_CaseSensitive(_aCaseSensitive),
100 m_Searchable(_aSearchable),
101 m_Currency(_aCurrency),
102 m_Signed(_aSigned),
103 m_ReadOnly(_aReadOnly),
104 m_Writable(_aWritable),
105 m_DefinitelyWritable(_aDefinitelyWritable)
107 if(m_ColumnLabel.isEmpty())
108 m_ColumnLabel = _aColumnName;
111 inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(())
112 { return ::rtl_allocateMemory( nSize ); }
113 inline static void * SAL_CALL operator new( size_t ,void* _pHint ) SAL_THROW(())
114 { return _pHint; }
115 inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(())
116 { ::rtl_freeMemory( pMem ); }
117 inline static void SAL_CALL operator delete( void *,void* ) SAL_THROW(())
120 sal_Bool isAutoIncrement() const { return m_AutoIncrement; }
121 sal_Bool isCaseSensitive() const { return m_CaseSensitive; }
122 sal_Bool isSearchable() const { return m_Searchable; }
123 sal_Bool isCurrency() const { return m_Currency; }
124 sal_Bool isSigned() const { return m_Signed; }
125 sal_Bool isReadOnly() const { return m_ReadOnly; }
126 sal_Bool isWritable() const { return m_Writable; }
127 sal_Bool isDefinitelyWritable() const { return m_DefinitelyWritable; }
129 sal_Int32 isNullable() const { return m_Nullable; }
130 sal_Int32 getColumnDisplaySize() const { return m_ColumnDisplaySize; }
131 sal_Int32 getPrecision() const { return m_Precision; }
132 sal_Int32 getScale() const { return m_Scale; }
133 sal_Int32 getColumnType() const { return m_ColumnType; }
135 const ::rtl::OUString& getColumnLabel() const { return m_ColumnLabel; }
136 const ::rtl::OUString& getColumnName() const { return m_ColumnName; }
137 const ::rtl::OUString& getSchemaName() const { return m_SchemaName; }
138 const ::rtl::OUString& getTableName() const { return m_TableName; }
139 const ::rtl::OUString& getCatalogName() const { return m_CatalogName; }
140 const ::rtl::OUString& getColumnTypeName() const { return m_ColumnTypeName; }
141 const ::rtl::OUString& getColumnServiceName() const { return m_ColumnServiceName; }
146 #endif //_CONNECTIVITY_COLUMN_HXX_
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */