FDO API Reference Feature Data Objects

IInsert.h

Go to the documentation of this file.
00001 #ifndef _IINSERT_H_
00002 #define _IINSERT_H_
00003 // 
00004 
00005 //
00006 // Copyright (C) 2004-2006  Autodesk, Inc.
00007 // 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of version 2.1 of the GNU Lesser
00010 // General Public License as published by the Free Software Foundation.
00011 // 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 // 
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this library; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 //
00021 
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif
00025 
00026 #include <FdoStd.h>
00027 #include <Fdo/Commands/IFeatureCommand.h>
00028 #include <Fdo/Expression/Identifier.h>
00029 #include <Fdo/Connections/IConnection.h>
00030 #include <Fdo/Commands/PropertyValueCollection.h>
00031 #include <Fdo/Commands/BatchParameterValueCollection.h>
00032 #include <Fdo/Commands/Feature/IFeatureReader.h>
00033 
00034 /// \brief
00035 /// The FdoIInsert interface defines the Insert command, which inserts a new
00036 /// instance of a given class. Input to the insert command includes the name of
00037 /// the class and a collection of property values. Properties that are
00038 /// not specified and do not have a default value will be assigned a null value
00039 /// or an exception will be thrown if the property is required. The insert
00040 /// command can insert instances at global scope or instances nested within an
00041 /// object collection property. Instances at global scope are referred to simply
00042 /// by the class name. Instances at a nested scope (i.e. instances within a
00043 /// object collection property) are referred to by the containing class name,
00044 /// followed by a '.', followed by the object collection property name.
00045 class FdoIInsert : public FdoICommand
00046 {
00047     friend class FdoIConnection;
00048 
00049 public:
00050     /// \brief
00051     /// Gets the name of the class to be operated upon as an FdoIdentifier.
00052     /// 
00053     /// \return
00054     /// Returns the class name.
00055     /// 
00056     FDO_API virtual FdoIdentifier* GetFeatureClassName() = 0;
00057 
00058     /// \brief
00059     /// Sets the name of the class to be operated upon as an FdoIdentifier.
00060     /// 
00061     /// \param value 
00062     /// Input the identifier for the class.
00063     /// 
00064     /// \return
00065     /// Returns nothing
00066     /// 
00067     FDO_API virtual void SetFeatureClassName(FdoIdentifier* value) = 0;
00068 
00069     /// \brief
00070     /// Sets the name of the class to be operated upon as an FdoIdentifier.
00071     /// 
00072     /// \param value 
00073     /// Input the class name.
00074     /// 
00075     /// \return
00076     /// Returns nothing
00077     /// 
00078     FDO_API virtual void SetFeatureClassName(FdoString* value) = 0;
00079 
00080     /// \brief
00081     /// Gets the FdoPropertyValueCollection that specifies the names and values
00082     /// of the properties for the instance to be inserted.
00083     /// 
00084     /// \return
00085     /// Returns the list of properties and their values.
00086     /// 
00087     FDO_API virtual FdoPropertyValueCollection* GetPropertyValues() = 0;
00088 
00089     /// \brief
00090     /// Gets the FdoBatchParameterValueCollection that can be used for optimized
00091     /// batch inserts of multiple features with a single insert command. Batch
00092     /// inserts can be performed by using Parameters for each of the property
00093     /// values, then adding collections of parameter values to the
00094     /// FdoBatchParameterValueCollection. Each FdoParameterValueCollection in the
00095     /// FdoBatchParameterValueCollection should contain one FdoParameterValue for each
00096     /// of the parameters specified for property values.
00097     /// 
00098     /// \return
00099     /// Returns FdoBatchParameterValueCollection
00100     /// 
00101     FDO_API virtual FdoBatchParameterValueCollection* GetBatchParameterValues() = 0;
00102 
00103     /// \brief
00104     /// Executes the insert command and returns a reference to an
00105     /// FdoIFeatureReader. Some feature providers can generate automatic identity
00106     /// values for features. This will happen automatically as the features are
00107     /// inserted. The returned FdoIFeatureReader allows the client to obtain the
00108     /// automatic identity property value(s) of newly inserted object(s). The
00109     /// returned feature reader at a minimum will read the unique identity
00110     /// properties of the objects just inserted. Multiple objects will be
00111     /// returned through the reader in the case of a batch insert.
00112     /// 
00113     /// \return
00114     /// Returns an FdoIFeatureReader
00115     /// 
00116     FDO_API virtual FdoIFeatureReader* Execute() = 0;
00117 };
00118 #endif
00119 
00120 

Comments or suggestions? Send us feedback.