Bump for 3.6-28
[LibreOffice.git] / connectivity / source / inc / FDatabaseMetaDataResultSetMetaData.hxx
blob75940176edb13b572b51d660790be5e0837356f1
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_DATABASEMETADATARESULTSETMETADATA_HXX_
30 #define _CONNECTIVITY_DATABASEMETADATARESULTSETMETADATA_HXX_
32 #include <com/sun/star/sdbc/XResultSetMetaData.hpp>
33 #include <cppuhelper/implbase1.hxx>
34 #ifndef _VECTOR_
35 #include <vector>
36 #endif
37 #include "FDatabaseMetaDataResultSet.hxx"
38 #include "OColumn.hxx"
39 #include "connectivity/StdTypeDefs.hxx"
40 #include "connectivity/dbtoolsdllapi.hxx"
42 namespace connectivity
44 //**************************************************************
45 //************ Class: ODatabaseMetaDataResultSetMetaData
46 //**************************************************************
47 typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData> ODatabaseMetaResultSetMetaData_BASE;
49 class OOO_DLLPUBLIC_DBTOOLS ODatabaseMetaDataResultSetMetaData : public ODatabaseMetaResultSetMetaData_BASE
51 TIntVector m_vMapping; // when not every column is needed
52 ::std::map<sal_Int32,connectivity::OColumn> m_mColumns;
53 ::std::map<sal_Int32,connectivity::OColumn>::const_iterator m_mColumnsIter;
55 sal_Int32 m_nColCount;
56 protected:
57 virtual ~ODatabaseMetaDataResultSetMetaData();
58 public:
59 // a Constructor, that is needed for when Returning the Object is needed:
60 // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
61 ODatabaseMetaDataResultSetMetaData( )
62 : m_nColCount(0)
65 /// Avoid ambigous cast error from the compiler.
66 inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
67 { return this; }
69 virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
70 virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
71 virtual sal_Bool SAL_CALL isCaseSensitive( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
72 virtual sal_Bool SAL_CALL isSearchable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
73 virtual sal_Bool SAL_CALL isCurrency( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
74 virtual sal_Int32 SAL_CALL isNullable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
75 virtual sal_Bool SAL_CALL isSigned( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
76 virtual sal_Int32 SAL_CALL getColumnDisplaySize( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
77 virtual ::rtl::OUString SAL_CALL getColumnLabel( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
78 virtual ::rtl::OUString SAL_CALL getColumnName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
79 virtual ::rtl::OUString SAL_CALL getSchemaName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
80 virtual sal_Int32 SAL_CALL getPrecision( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
81 virtual sal_Int32 SAL_CALL getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
82 virtual ::rtl::OUString SAL_CALL getTableName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
83 virtual ::rtl::OUString SAL_CALL getCatalogName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
84 virtual sal_Int32 SAL_CALL getColumnType( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
85 virtual ::rtl::OUString SAL_CALL getColumnTypeName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
86 virtual sal_Bool SAL_CALL isReadOnly( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
87 virtual sal_Bool SAL_CALL isWritable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
88 virtual sal_Bool SAL_CALL isDefinitelyWritable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
89 virtual ::rtl::OUString SAL_CALL getColumnServiceName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
91 // methods to set the right column mapping
92 void setColumnPrivilegesMap();
93 void setColumnMap();
94 void setColumnsMap();
95 void setTableNameMap();
96 void setTablesMap();
97 void setProcedureColumnsMap();
98 void setPrimaryKeysMap();
99 void setIndexInfoMap();
100 void setTablePrivilegesMap();
101 void setCrossReferenceMap();
102 void setTypeInfoMap();
103 void setProcedureNameMap();
104 void setProceduresMap();
105 void setTableTypes();
106 void setBestRowIdentifierMap() { setVersionColumnsMap();}
107 void setVersionColumnsMap();
108 void setExportedKeysMap() { setCrossReferenceMap(); }
109 void setImportedKeysMap() { setCrossReferenceMap(); }
110 void setCatalogsMap();
111 void setSchemasMap();
114 #endif // _CONNECTIVITY_FILE_ADATABASEMETARESULTSETMETADATA_HXX_
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */