FDO API Reference | Feature Data Objects |
00001 #ifndef _IAPPLYSCHEMA_H_ 00002 #define _IAPPLYSCHEMA_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/ICommand.h> 00028 #include <Fdo/Schema/FeatureSchema.h> 00029 #include <Fdo/Commands/Schema/PhysicalSchemaMapping.h> 00030 00031 /// \brief 00032 /// The FdoIApplySchema interface defines the ApplySchema command, which creates or 00033 /// updates a feature schema within the DataStore. Input to the ApplySchema 00034 /// command is the feature schema instance to be created or updated. Optionally, 00035 /// a provider-specific FdoIPhysicalSchemaMapping interface can be specified that can be 00036 /// used to control how the feature schema elements are mapped into physical 00037 /// storage. 00038 class FdoIApplySchema : public FdoICommand 00039 { 00040 public: 00041 /// \brief 00042 /// Gets the name of the schema to create. 00043 /// 00044 /// \return 00045 /// Returns the name of the schema to create 00046 /// 00047 FDO_API virtual FdoFeatureSchema* GetFeatureSchema() = 0; 00048 00049 /// \brief 00050 /// Sets the name of the schema to create. 00051 /// 00052 /// \param value 00053 /// Input the name of the schema to create 00054 /// 00055 /// \return 00056 /// Returns nothing 00057 /// 00058 FDO_API virtual void SetFeatureSchema(FdoFeatureSchema* value) = 0; 00059 00060 /// \brief 00061 /// Gets the FdoPhysicalSchemaMapping used to specify how the schema definition 00062 /// gets mapped into physical storage. 00063 /// 00064 /// \return 00065 /// Returns FdoPhysicalSchemaMapping 00066 /// 00067 FDO_API virtual FdoPhysicalSchemaMapping* GetPhysicalMapping() = 0; 00068 00069 /// \brief 00070 /// Sets the FdoPhysicalSchemaMapping used to specify how the schema definition 00071 /// gets mapped into physical storage. 00072 /// 00073 /// \param value 00074 /// Input the FdoPhysicalSchemaMapping 00075 /// 00076 /// \return 00077 /// Returns nothing 00078 /// 00079 FDO_API virtual void SetPhysicalMapping(FdoPhysicalSchemaMapping* value) = 0; 00080 00081 /// \brief 00082 /// Indicates whether Execute() will ignore element states 00083 /// when applying the feature schema. 00084 /// 00085 /// \return 00086 /// Returns true if elements states will be ignored, false otherwise. 00087 /// 00088 /// 00089 FDO_API virtual FdoBoolean GetIgnoreStates() = 0; 00090 00091 /// \brief 00092 /// Changes the handling of element states by Execute(). 00093 /// 00094 /// \param ignoreStates 00095 /// Input True: Execute() will ignore the 00096 /// element states on the Feature Schema elements. Instead, it 00097 /// will additively merge the Feature Schema into the current DataStore. 00098 /// False: Execute() will use the element states to determine whether 00099 /// each element is inserted, modified or deleted. 00100 /// 00101 /// \return 00102 /// Returns nothing 00103 /// 00104 FDO_API virtual void SetIgnoreStates( FdoBoolean ignoreStates ) = 0; 00105 00106 00107 00108 /// \brief 00109 /// Executes the ApplySchema command that creates metadata and physical 00110 /// storage for the schema. An exception is thrown if the schema already 00111 /// exists or if a schema already exists and the feature provider only 00112 /// supports a single schema. If schema changes include deletion of classes 00113 /// or the schema itself, then those classes (or the schema, if it is marked 00114 /// as deleted) must not contain any instance data. If they do, an exception 00115 /// will be thrown. 00116 /// Implementors must call FdoFeatureSchema::AcceptChanges() when Execute() succeeds. 00117 /// It must be called after the schema has been successfully applied, in 00118 /// order to synchronize the states of the schema elements. 00119 /// 00120 /// \return 00121 /// Returns nothing 00122 /// 00123 FDO_API virtual void Execute() = 0; 00124 }; 00125 #endif 00126 00127
Comments or suggestions? Send us feedback. |