1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: objectnames.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef DBACCESS_SOURCE_SDBTOOLS_INC_OBJECTNAMES_HXX
32 #define DBACCESS_SOURCE_SDBTOOLS_INC_OBJECTNAMES_HXX
34 #include "connectiondependent.hxx"
36 /** === begin UNO includes === **/
37 #include <com/sun/star/sdb/tools/XObjectNames.hpp>
38 /** === end UNO includes === **/
40 #include <comphelper/componentcontext.hxx>
41 #include <cppuhelper/implbase1.hxx>
45 //........................................................................
48 //........................................................................
50 //====================================================================
52 //====================================================================
53 typedef ::cppu::WeakImplHelper1
< ::com::sun::star::sdb::tools::XObjectNames
55 struct ObjectNames_Impl
;
56 /** default implementation for XObjectNames
58 class ObjectNames
:public ObjectNames_Base
59 ,public ConnectionDependentComponent
62 ::std::auto_ptr
< ObjectNames_Impl
> m_pImpl
;
65 /** constructs the instance
68 the component's context
70 the connection to work with. Will be held weak. Must not be <NULL/>.
72 @throws ::com::sun::star::lang::NullPointerException
73 if _rxConnection is <NULL/>
76 const ::comphelper::ComponentContext
& _rContext
,
77 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>& _rxConnection
81 virtual ::rtl::OUString SAL_CALL
suggestName( ::sal_Int32 CommandType
, const ::rtl::OUString
& BaseName
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
82 virtual ::rtl::OUString SAL_CALL
convertToSQLName( const ::rtl::OUString
& Name
) throw (::com::sun::star::uno::RuntimeException
);
83 virtual ::sal_Bool SAL_CALL
isNameUsed( ::sal_Int32 CommandType
, const ::rtl::OUString
& Name
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
84 virtual ::sal_Bool SAL_CALL
isNameValid( ::sal_Int32 CommandType
, const ::rtl::OUString
& Name
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
85 virtual void SAL_CALL
checkNameForCreate( ::sal_Int32 CommandType
, const ::rtl::OUString
& Name
) throw (::com::sun::star::sdbc::SQLException
, ::com::sun::star::uno::RuntimeException
);
88 virtual ~ObjectNames();
91 ObjectNames(); // never implemented
92 ObjectNames( const ObjectNames
& ); // never implemented
93 ObjectNames
& operator=( const ObjectNames
& ); // never implemented
96 //........................................................................
97 } // namespace sdbtools
98 //........................................................................
100 #endif // DBACCESS_SOURCE_SDBTOOLS_INC_OBJECTNAMES_HXX