00001 #ifndef OracleUniqueKeyDefinition_H
00002 #define OracleUniqueKeyDefinition_H
00003
00004 //
00005 //
00006 // (C) Copyright 1990-2005 by Autodesk, Inc.
00007 //
00008 //
00009 //
00010 // By using this code, you are agreeing to the terms
00011 // and conditions of the License Agreement that appeared
00012 // and was accepted upon download or installation
00013 // (or in connection with the download or installation)
00014 // of the Autodesk software in which this code is included.
00015 // All permissions on use of this code are as set forth
00016 // in such License Agreement provided that the above copyright
00017 // notice appears in all authorized copies and that both that
00018 // copyright notice and the limited warranty and
00019 // restricted rights notice below appear in all supporting
00020 // documentation.
00021 //
00022 // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
00023 // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
00024 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
00025 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
00026 // UNINTERRUPTED OR ERROR FREE.
00027 //
00028 // Use, duplication, or disclosure by the U.S. Government is subject to
00029 // restrictions set forth in FAR 52.227-19 (Commercial Computer
00030 // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
00031 // (Rights in Technical Data and Computer Software), as applicable.
00032 //
00033 #include <Fdo/Commands/Schema/PhysicalElementMapping.h>
00034 #include <Fdo/Xml/NameCollectionHandler.h>
00035 #include <Rdbms/Override/Oracle/OracleOv.h>
00036 #include <Rdbms/Override/Oracle/OracleOvDataPropertyDefinitionCollection.h>
00037
00038 /// \cond DOXYGEN-IGNORE
00039
00040 /// \brief
00041 /// Concrete class defining physical schema overrides for a unique key definition.
00042 class FdoOracleOvUniqueKeyDefinition : public FdoPhysicalElementMapping
00043 {
00044 public:
00045 /// \brief
00046 /// Constructs a default of an FdoOracleOvUniqueKeyDefinition
00047 ///
00048 /// \return
00049 /// Returns FdoOracleOvUniqueKeyDefinition
00050 ///
00051 static FdoOracleOvUniqueKeyDefinition *Create();
00052
00053 /// \brief
00054 /// Constructs an instance of an FdoOracleOvIndexDefinition using the specified arguments
00055 ///
00056 /// \param name
00057 /// Input name
00058 ///
00059 /// \return
00060 /// Returns FdoOracleOvIndexDefinition
00061 ///
00062 static FdoOracleOvUniqueKeyDefinition *Create(FdoString* name);
00063
00064 /// \brief
00065 /// Gets a collection of data property definitions
00066 ///
00067 /// \return
00068 /// Returns a collection of data property definitions
00069 ///
00070 FdoStringCollection* GetProperties();
00071
00072 /// XML Serialization functions, not part of supported API.
00073
00074 virtual void _writeXml(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
00075
00076 virtual FdoXmlSaxHandler* XmlStartElement(
00077 FdoXmlSaxContext* context,
00078 FdoString* uri,
00079 FdoString* name,
00080 FdoString* qname,
00081 FdoXmlAttributeCollection* atts
00082 );
00083
00084 virtual FdoBoolean XmlEndElement(
00085 FdoXmlSaxContext* context,
00086 FdoString* uri,
00087 FdoString* name,
00088 FdoString* qname
00089 );
00090
00091 protected:
00092 FdoOracleOvUniqueKeyDefinition();
00093 FdoOracleOvUniqueKeyDefinition(FdoString *name);
00094 virtual ~FdoOracleOvUniqueKeyDefinition();
00095 virtual void Dispose();
00096
00097 private:
00098 /// unique key properties
00099 FdoStringsP mProperties;
00100 /// property deserialization handler
00101 FdoXmlNameCollectionHandlerP mPropertyHandler;
00102 };
00103
00104 /// \brief
00105 /// FdoOracleOvUniqueKeyP is a FdoPtr on FdoOracleOvUniqueKeyDefinition, provided for convenience.
00106 typedef FdoPtr<FdoOracleOvUniqueKeyDefinition> FdoOracleOvUniqueKeyP;
00107
00108 /// \endcond
00109
00110 #endif
00111
00112