/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
namespace com::sun::star::sdbc { class XParameters; } namespace com::sun::star::sdb { class XSingleSelectQueryAnalyzer; }
namespace dbtools::param
{
//= ParameterWrapper
/** wraps a parameter column as got from an SQLQueryComposer, so that it has an additional property "Value", which is forwarded to an XParameters interface
*/ class OOO_DLLPUBLIC_DBTOOLS ParameterWrapper final : public ::cppu::OWeakObject
,public css::lang::XTypeProvider
,public ::comphelper::OMutexAndBroadcastHelper
,public ::cppu::OPropertySetHelper
{ private: typedef ::cppu::OWeakObject UnoBase; typedef ::cppu::OPropertySetHelper PropertyBase;
private: /// the most recently set value of the parameter
::connectivity::ORowSetValue m_aValue; /// the positions (in our m_xValueDestination) at which the value should be set (0-based!)
::std::vector< sal_Int32 > m_aIndexes;
/// the "delegator" column to which standard property requests are forwarded
css::uno::Reference< css::beans::XPropertySet > m_xDelegator; /// the property set info for our delegator
css::uno::Reference< css::beans::XPropertySetInfo > m_xDelegatorPSI; /// the component taking the value
css::uno::Reference< css::sdbc::XParameters > m_xValueDestination; /// helper for implementing XPropertySetInfo
::std::unique_ptr< ::cppu::OPropertyArrayHelper > m_pInfoHelper;
/// class for the parameter event @see approveParameter class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_DBTOOLS) ParameterWrapperContainer final : public ParameterWrapperContainer_Base
{ private:
Parameters m_aParameters;
virtual ~ParameterWrapperContainer() override;
public: /** creates an empty container
*/
ParameterWrapperContainer();
/** creates a container from a SingleSelectQuerAnalyzer's parameter columns
Note that here, the simple constructor of the ParameterWrapper will be used, which does not use a XParameters instance to forward values to, but only remembers the values itself.
*/
ParameterWrapperContainer( const css::uno::Reference< css::sdb::XSingleSelectQueryAnalyzer >& _rxComposer );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.