wiki:FDORfc7

FDO RFC 7 - Add New Methods to FdoClassDefinition

This page contains a request for comments document (RFC) for the FDO Open Source project. More FDO RFCs can be found on the RFCs page.

Status

RFC Template Version(1.0)
Submission DateJuly 25, 2007
Last Modified Greg Boone Timestamp
AuthorBarbara Zoladek
RFC StatusWithdrawn
Implementation StatusUnder Development
Proposed Milestone3.3.0.0
Assigned PSC guide(s) Greg Boone
Voting HistoryTBD
+1
+0
-0
-1

Overview

The purpose of this RFC is to enhance the FdoClassDefinition class by adding new methods GetIsVirtual() and SetIsVirtual().

Motivation

The motivation for this RFC is to expose classes based on virtual objects. The significat differenece between classes based on real and virtual objects is that the later do not contain any data themselves. Also, a virtual object is not stored in the datastore as a distinct object. An RDBMS view is one exmaple of the virtual object. It is just a named query. An FDO class based on that query exposes data that is contained in other objects referenced in the query. The class schema characterists like property types and constraints tightly depends on the these objects. Data exposed by the class is more dynamic as it can be edited or deleted from the objects that contain it.

How these classes can be used? Classes based on virtual objects can be used for limiting or restricting access to some data and for analysis where a class exposes data that is combination of many classes joined in certain way with sometimes complex conditions.

Why is it important to distinguish these classes in FDO? Because these classes fall into a different category, for the same reasons why in RDBMSs views are distinguished from tables. These classes virtualness cannot be expressed by any existing methods of FdoClassdefinition. In fact, their characteristics are somewhat unpredictable and depend on the underlying virtual object definition. Exposing the virtual class type as a new type returned by GetClassType() would affect current behaviour of existing applications.

Proposed Solution

The following shows the proposed changes to FdoClassDefinition:

     class FdoClassDefinition : public FdoSchemaElement
     {
        ...
        public:
            ...
            /// \brief
            /// Gets the value of m_IsVirtual. It is true if a class is based on virtual object; otherwise is false.
            /// 
            /// \return
            /// Returns bool
            /// 
	    FDO_API bool GetIsVirtual();

	    /// \brief
            /// Sets the value of m_IsVirtual. It is true if a class is based on virtual object; otherwise is false.
            /// This is an internal method that can only be called by providers. Application should not use this method.
            /// 
            /// \return
            /// Returns nothing
            /// 
	    FDO_API void SetIsVirtual( bool value );
            ...
        
         private:
            ...
            FdoBoolean	m_isVirtual;
            ...
       }

Note that for the providers where the virtual object concept cannot be used, GetIsVirtual() will always return false.

The below shows the changes for the Managed code.

     public __gc class ClassDefinition : public NAMESPACE_OSGEO_FDO_SCHEMA::SchemaElement
     {
        public:
        ...
        /// \brief
	/// Gets the flag indicating if the class is based on the virtual object.
	///
	/// \return 
	/// Returns true if class is based on virtual object; otherwise false.

	__property System::Boolean get_IsVirtual();

        /// \brief
	/// Sets the flag indicating that the class is based on the virtual object.
	///
	/// \parm value
	/// Input true or false
	///
	/// \return
	/// Returns nothing

	__property System::Void set_IsVirtual(System::Boolean value);

     }

Implications

This change will not cause any functional or performance side effects.

Test Plan

Existing unit tests will be expanded to test the proposed enhancements defined above.

Funding/Resources

Autodesk to provide resources / funding to update the FDO API.

Last modified 17 years ago Last modified on 08/23/07 08:57:38
Note: See TracWiki for help on using the wiki.