00001 #ifndef FDO_RDBMSOVPROPERTYMAPPINGSINGLE_H 00002 #define FDO_RDBMSOVPROPERTYMAPPINGSINGLE_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 /// FdoRdbms.lib 00022 00023 #include <FdoCommon.h> 00024 #include <Rdbms/Override/RdbmsOv.h> 00025 #include <Rdbms/Override/RdbmsOvPropertyMappingDefinition.h> 00026 00027 00028 ///<summary> 00029 ///Abstract class defining the physical schema overrides for the Single 00030 ///type object property mapping. Under the Single mapping type, the object 00031 ///property is kept in the same table as its containing class. 00032 ///</summary> 00033 class FdoRdbmsOvPropertyMappingSingle : public virtual FdoRdbmsOvPropertyMappingDefinition 00034 { 00035 public: 00036 ///<summary> 00037 ///Gets the prefix which is prepended to the name of each column 00038 ///</summary> 00039 /// <returns>Returns the prefix</returns> 00040 FDORDBMS_OV_API FdoString* GetPrefix(); 00041 00042 ///<summary>Sets the prefix</summary> 00043 /// <returns>Returns nothing</returns> 00044 FDORDBMS_OV_API void SetPrefix(FdoString* prefix); 00045 00046 /// \cond DOXYGEN-IGNORE 00047 00048 // XML Serialization functions, not part of the API. 00049 00050 // Serialize this property to XML. 00051 FDORDBMS_OV_API virtual void _writeXml(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags); 00052 00053 // Initialize this element from its XML attributes 00054 FDORDBMS_OV_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs); 00055 00056 /// \endcond 00057 00058 protected: 00059 FDORDBMS_OV_API FdoRdbmsOvPropertyMappingSingle(); 00060 FDORDBMS_OV_API virtual ~FdoRdbmsOvPropertyMappingSingle(); 00061 00062 // Handle sub-elements when deserializing from XML. 00063 FDORDBMS_OV_API virtual FdoXmlSaxHandler* XmlStartElement( 00064 FdoXmlSaxContext* context, 00065 FdoString* uri, 00066 FdoString* name, 00067 FdoString* qname, 00068 FdoXmlAttributeCollection* atts 00069 ); 00070 00071 private: 00072 FdoStringP mPrefix; 00073 }; 00074 00075 ///<summary> 00076 ///FdoRdbmsOvPropertyMappingSingleP is a FdoPtr on 00077 ///FdoRdbmsOvPropertyMappingSingle, provided for convenience. 00078 ///</summary> 00079 typedef FdoPtr<FdoRdbmsOvPropertyMappingSingle> FdoRdbmsOvPropertyMappingSingleP; 00080 00081 #endif 00082