= 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 [wiki:FDORfcs RFCs] page. == Status == ||RFC Template Version||(1.0)|| ||Submission Date||July 25, 2007|| ||Last Modified|| Barbara Zoladek [[Timestamp]]|| ||Author|| Barbara Zoladek|| ||RFC Status||draft || ||Implementation Status|| under development|| ||Proposed Milestone|| || ||Assigned PSC guide(s)|| Greg Boone|| ||'''Voting History'''|||| || ||Bob, Mateusz|| || ||Frank|| || ||Orest|| || ||Greg || == Overview == The purpose of this RFC is to enhance the !FdoClassDefinition class by adding new methods !GetIsViewBased() and !SetIsViewBased(). == Motivation == Existing !FdoClassDefinition does not contain any information that would allow to determine a type of the base RDBMS object. There are cases when view-based classes should be distinguished from table-based classes to be able to handle behavioral differences: * Editing schema. View definition cannot be changed and therefore class schema cannot be changed. * Editing property values. Class data may not be editable. == Proposed Solution == The following shows the proposed changes to !FdoClassDefinition: {{{ class FdoClassDefinition : public FdoSchemaElement { ... public: ... /// \brief /// Gets the value of m_IsViewBased. It is true if a class is based on view; otherwise is false. /// /// \return /// Returns bool /// FDO_API bool GetIsViewBased(); /// \brief /// Sets the value of m_IsViewBased. It is true if a class is based on view; 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 SetIsViewBased( bool value ); ... private: ... FdoBoolean m_isViewBased; ... } }}} == Implications == This change will not cause any functional or performance side effects. == Test Plan == Exisitng unit tests will be enhanced.