- Main Page
- Namespaces
- Classes
- Files

# RdbmsOvPhysicalSchemaMapping.h

Go to the documentation of this file.

    00001 #ifndef FDO_RDBMSOVPHYSICALSCHEMAMAPPING_H
    00002 #define FDO_RDBMSOVPHYSICALSCHEMAMAPPING_H
    00003 //
    00004 //
    00005 // Copyright (C) 2004-2006  Autodesk, Inc.
    00006 //
    00007 // This library is free software; you can redistribute it and/or
    00008 // modify it under the terms of version 2.1 of the GNU Lesser
    00009 // General Public License as published by the Free Software Foundation.
    00010 //
    00011 // This library is distributed in the hope that it will be useful,
    00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014 // Lesser General Public License for more details.
    00015 //
    00016 // You should have received a copy of the GNU Lesser General Public
    00017 // License along with this library; if not, write to the Free Software
    00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    00019 //
    00020
    00021 #include <Fdo/Commands/Schema/PhysicalSchemaMapping.h>
    00022 #include <Utilities/SchemaMgr/Overrides/TableMappingType.h>
    00023 #include <Utilities/SchemaMgr/Overrides/GeometricColumnType.h>
    00024 #include <Utilities/SchemaMgr/Overrides/GeometricContentType.h>
    00025 #include <Rdbms/Override/RdbmsOv.h>
    00026 #include <Rdbms/Override/RdbmsOvClassCollection.h>
    00027 #include <Rdbms/Override/RdbmsOvSchemaAutoGeneration.h>
    00028
    00029 /// FdoRdbms.lib
    00030
    00031 ///<summary>Abstract base class for RDBMS type provider schema
    00032 ///override sets.</summary>
    00033 class FdoRdbmsOvPhysicalSchemaMapping : public FdoPhysicalSchemaMapping
    00034 {
    00035
    00036 public:
    00037     ///<summary>Gets the collection of class overrides for this schema
    00038     ///override set.</summary>
    00039     /// <returns>Returns FdoRdbmsOvReadOnlyClassCollection</returns>
    00040     FDORDBMS_OV_API FdoRdbmsOvReadOnlyClassCollection* GetClasses();
    00041
    00042     ///<summary>Gets the table mapping</summary>
    00043     ///<returns>Returns the table mapping</returns>
    00044     FDORDBMS_OV_API FdoSmOvTableMappingType GetTableMapping();
    00045
    00046     ///<summary>Sets the table mapping</summary>
    00047     /// <param name="mappingType">Input the mapping type</param>
    00048     ///<returns>Returns nothing</returns>
    00049     FDORDBMS_OV_API void SetTableMapping(FdoSmOvTableMappingType mappingType);
    00050
    00051     ///<summary>Gets the default geometric column type for newly-created geometric properties</summary>
    00052     ///<returns>Returns the default geometric column type</returns>
    00053     FDORDBMS_OV_API FdoSmOvGeometricColumnType GetGeometricColumnType();
    00054
    00055     ///<summary>Sets default geometric column type for newly-created geometric properties</summary>
    00056     /// <param name="columnType">Input the default geometric column type</param>
    00057     ///<returns>Returns nothing</returns>
    00058     FDORDBMS_OV_API void SetGeometricColumnType(FdoSmOvGeometricColumnType columnType);
    00059
    00060     ///<summary>Gets the default geometric content type for newly-created geometric properties</summary>
    00061     ///<returns>Returns the default geometric content type</returns>
    00062     FDORDBMS_OV_API FdoSmOvGeometricContentType GetGeometricContentType();
    00063
    00064     ///<summary>Sets default geometric content type for newly-created geometric properties</summary>
    00065     /// <param name="contentType">Input the default geometric content type</param>
    00066     ///<returns>Returns nothing</returns>
    00067     FDORDBMS_OV_API void SetGeometricContentType(FdoSmOvGeometricContentType contentType);
    00068
    00069     ///<summary>Gets the settings for AutoGenerating classes for this feature
    00070     ///schema from the physical schema of the connected datastore.
    00071     ///</summary>
    00072     ///<returns>Returns FdoRdbmsOvSchemaAutoGeneration</returns>
    00073     FDORDBMS_OV_API FdoRdbmsOvSchemaAutoGeneration* GetAutoGeneration();
    00074
    00075     ///<summary>Sets class autogeneration settings.</summary>
    00076     /// <param name="autoGeneration">
    00077     /// Input the autogeneration settings. If NULL then no schema autogeneration
    00078     /// takes place.
    00079     /// </param>
    00080     ///<returns>Returns nothing</returns>
    00081     FDORDBMS_OV_API void SetAutoGeneration(FdoRdbmsOvSchemaAutoGeneration* autoGeneration);
    00082
    00083 /// \cond DOXYGEN-IGNORE
    00084
    00085     FDORDBMS_OV_API void SetParent(FdoPhysicalElementMapping* value);
    00086
    00087     FDORDBMS_OV_API FdoXmlSaxHandler* XmlStartElement(
    00088         FdoXmlSaxContext* context,
    00089         FdoString* uri,
    00090         FdoString* name,
    00091         FdoString* qname,
    00092         FdoXmlAttributeCollection* atts
    00093     );
    00094 /// \endcond
    00095 protected:
    00096     FDORDBMS_OV_API FdoRdbmsOvPhysicalSchemaMapping();
    00097     FDORDBMS_OV_API FdoRdbmsOvPhysicalSchemaMapping(FdoString* name);
    00098     FDORDBMS_OV_API virtual ~FdoRdbmsOvPhysicalSchemaMapping();
    00099
    00100     // Initialize this element from its XML attributes
    00101     FDORDBMS_OV_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
    00102
    00103     // Serialize this property to XML.
    00104     FDORDBMS_OV_API virtual void _writeXml(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
    00105
    00106     // Write any provider-specific parts that become XML attributes.
    00107     FDORDBMS_OV_API virtual void _writeXmlAttributes(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
    00108
    00109     // Write any provider-specific parts that become XML elements.
    00110     FDORDBMS_OV_API virtual void _writeXmlElements(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
    00111
    00112     // Get a writable version of the class override collection.
    00113     FDORDBMS_OV_API FdoRdbmsOvClassCollection* GetRdbmsClasses();
    00114
    00115     // Create a class override. Each provider that supports class overrides
    00116     // must override this function.
    00117     FDORDBMS_OV_API virtual FdoRdbmsOvClassDefinition* CreateClass(
    00118         FdoXmlSaxContext* context,
    00119         FdoXmlAttributeCollection* atts
    00120     )
    00121     {
    00122         // TODO: exception
    00123         return NULL;
    00124     }
    00125
    00126     // Add a class override to this schema override set. Each provider that
    00127     // supports class overrides must override this function.
    00128     FDORDBMS_OV_API virtual void AddClass(
    00129         FdoRdbmsOvClassDefinition* pClass
    00130     )
    00131     {
    00132         // TODO: exception
    00133     }
    00134
    00135 private:
    00136     FdoSmOvTableMappingType    mMappingType;
    00137     FdoSmOvGeometricColumnType  mDefaultGeometricColumnType;
    00138     FdoSmOvGeometricContentType mDefaultGeometricContentType;
    00139     FdoRdbmsOvClassesP mClasses;
    00140     FdoRdbmsOvSchemaAutoGenerationP mAutoGeneration;
    00141 };
    00142
    00143 ///<summary>FdoRdbmsOvSchemaMappingP is a FdoPtr on FdoRdbmsOvPhysicalSchemaMapping, provided for convenience.</summary>
    00144 typedef FdoPtr<FdoRdbmsOvPhysicalSchemaMapping> FdoRdbmsOvSchemaMappingP;
    00145
    00146 #endif
    00147

Please send us your comment about this page