FDO .NET API Reference Feature Data Objects

mgAssociationPropertyDefinition.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (C) 2004-2006  Autodesk, Inc.
00003 * 
00004 * This library is free software; you can redistribute it and/or
00005 * modify it under the terms of version 2.1 of the GNU Lesser
00006 * General Public License as published by the Free Software Foundation.
00007 * 
00008 * This library is distributed in the hope that it will be useful,
00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 * Lesser General Public License for more details.
00012 * 
00013 * You should have received a copy of the GNU Lesser General Public
00014 * License along with this library; if not, write to the Free Software
00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016 *
00017 */
00018 
00019 #pragma  once
00020 
00021 #include "FDO\Schema\mgPropertyDefinition.h"
00022 
00023 #include "FDO\Schema\mgDeleteRule.h"
00024 #include "FDO\Schema\mgPropertyType.h"
00025 
00026 class FdoAssociationPropertyDefinition;
00027 
00028 BEGIN_NAMESPACE_OSGEO_FDO_SCHEMA
00029 public __gc class DataPropertyDefinitionCollection;
00030 public __gc class ClassDefinition;
00031 
00032 /// \ingroup (OSGeoFDOSchema)
00033 /// \brief
00034 /// AssociationPropertyDefinition class derives PropertyDefinition and represents
00035 /// the association between two classes.
00036 /// The class of the associated class must already be defined in the feature
00037 /// schema and cannot be abstract.
00038 public __gc class AssociationPropertyDefinition : public NAMESPACE_OSGEO_FDO_SCHEMA::PropertyDefinition
00039 {
00040 public:
00041     /// \brief
00042     /// Constructs a default instance of an AssociationPropertyDefinition.
00043     /// 
00044     AssociationPropertyDefinition();
00045 
00046     /// \brief
00047     /// Constructs an instance of an AssociationPropertyDefinition using the specified
00048     /// arguments.
00049     /// 
00050     /// \param name 
00051     /// Input the property definition name
00052     /// \param description 
00053     /// Input the property definition description
00054     /// 
00055     AssociationPropertyDefinition(System::String* name, System::String* description);
00056 
00057     /// \brief
00058     /// Constructs an instance of an AssociationPropertyDefinition using the specified
00059     /// arguments.
00060     /// 
00061     /// \param name 
00062     /// Input the property definition name
00063     /// \param description 
00064     /// Input the property definition description
00065     /// \param system 
00066     /// Input true if this is a system generated property, false otherwise.
00067     /// <p><b>Note:</b> A client would never set system to true, only a provider.
00068     /// 
00069     AssociationPropertyDefinition(System::String* name, System::String* description, System::Boolean system);
00070 
00071     /// \brief
00072     /// Gets the concrete property type.
00073     /// 
00074     /// \return
00075     /// Returns the concrete property type
00076     /// 
00077     __property NAMESPACE_OSGEO_FDO_SCHEMA::PropertyType get_PropertyType();
00078 
00079     /// \brief
00080     /// Gets a reference to the associated class.
00081     /// 
00082     /// \return
00083     /// Returns class definition
00084     /// 
00085     __property NAMESPACE_OSGEO_FDO_SCHEMA::ClassDefinition* get_AssociatedClass();
00086 
00087     /// \brief
00088     /// Sets a reference to the associated class.
00089     /// 
00090     /// \param value 
00091     /// Input class definition
00092     /// 
00093     __property System::Void set_AssociatedClass(NAMESPACE_OSGEO_FDO_SCHEMA::ClassDefinition* value);
00094 
00095     /// \brief
00096     /// Gets a reference to an NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinitionCollection which is a collection of 
00097     /// properties of the current class that are used as key for this association. Initially, this 
00098     /// collection is empty. The user can optionally add any number of properties.  If the collection 
00099     /// is left empty, the identity properties of the associated class are added to the current class. 
00100     /// The number, order and types should match the property of the ReverseIdentityProperties collection. 
00101     /// All properties in the collection should already exist in the containing class. 
00102     /// This is needed in case the current class already has properties (foreign keys) that are used 
00103     /// to reference the associated feature.
00104     /// 
00105     /// \return
00106     /// Returns data property definition
00107     /// 
00108     __property NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinitionCollection* get_IdentityProperties();
00109 
00110     /// \brief
00111     /// Gets a reference to an NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinitionCollection used to return a collection 
00112     /// of properties of the associated class that are used as key for this association. 
00113     /// The number, order and types should match the IdentityProperties. If the reverse identity 
00114     /// collection is empty, then the associated class identity properties will be used. 
00115     /// The properties of the collection should already exist on the associated class.
00116     /// 
00117     /// \return
00118     /// Returns data property definition
00119     /// 
00120     __property NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinitionCollection* get_ReverseIdentityProperties();
00121 
00122     /// \brief
00123     /// Gets the reverse name of this property. See description of SetReverseName.
00124     /// 
00125     /// \return
00126     /// Returns the reverse name
00127     /// 
00128     __property System::String* get_ReverseName();
00129 
00130     /// \brief
00131     /// This method is used to set the name of this association as seen by the associated 
00132     /// class. This is an optional parameter that can be provided if the navigation back from the 
00133     /// associated class is needed. This property will appear as read-only property on the associated 
00134     /// class. For example let’s assume that we have an Accident class that associated to a Road class 
00135     /// by an association called “road? If we wanted to find all the accidents associated to a given 
00136     /// road, we will need to provide a reverse property name of the road association property. 
00137     /// In this case an appropriate value for such a name would be “accident? The filter that can be 
00138     /// used to find all the accidents would look like: “accident not null?
00139     /// 
00140     /// \param name 
00141     /// Input reverse name
00142     /// 
00143     __property System::Void set_ReverseName(System::String* name);
00144 
00145     /// \brief
00146     /// Gets the delete rule.
00147     /// 
00148     /// \return
00149     /// Returns the delete rule
00150     /// 
00151     __property NAMESPACE_OSGEO_FDO_SCHEMA::DeleteRule get_DeleteRule();
00152 
00153     /// \brief
00154     /// Sets the delete rule.
00155     /// 
00156     /// \param value 
00157     /// Input the delete rule
00158     /// 
00159     __property System::Void set_DeleteRule(NAMESPACE_OSGEO_FDO_SCHEMA::DeleteRule value);
00160 
00161     /// \brief
00162     /// Gets the lock cascade option. true to cascade the lock otherwise the lock is not cascaded
00163     /// 
00164     /// \return
00165     /// Returns the lock cascade option
00166     /// 
00167     __property System::Boolean get_LockCascade();
00168 
00169     /// \brief
00170     /// Sets the lock cascade option.
00171     /// 
00172     /// \param value 
00173     /// Input the lock cascade option.
00174     /// 
00175     __property System::Void set_LockCascade(System::Boolean value);
00176 
00177     /// \brief
00178     /// This method is used to verify if this association property is a read-only association 
00179     /// property. A read-only association property is created internally when the reverse name of an 
00180     /// association property is specified. The read-only association property is added automatically 
00181     /// to the associated class and can be used to navigate from the associated class to the 
00182     /// associating class
00183     /// 
00184     /// \return
00185     /// Returns true if the association property is read-only. otherwise false.
00186     /// 
00187     __property System::Boolean get_IsReadOnly();
00188 
00189     /// \brief
00190     /// This method is used to set the read-only status of the association property. 
00191     /// This method should only be called by FDO providers to set to read-only the association 
00192     /// property added internally to the associated class that represent the reverse association 
00193     /// property.
00194     /// 
00195     /// \param value 
00196     /// Input the read-only flag
00197     /// 
00198     __property System::Void set_IsReadOnly(System::Boolean value);
00199 
00200     /// \brief
00201     /// This method is used to return the association multiplicity from the owner class 
00202     /// side. See SetMultiplicity method for description of the possible values.
00203     /// 
00204     /// \return
00205     /// Returns a System::String that represent the multiplicity.
00206     /// 
00207     __property System::String* get_Multiplicity();
00208 
00209     /// \brief
00210     /// This method is used to set the association multiplicity from the property owner class side. 
00211     /// The only possible values are 1 or m. If the multiplicity is set to ?? then only one instance
00212     /// of the owning class can be associated to a given instance of the associated class. If the 
00213     /// multiplicity is set to “m? then many instances of the owning class can be associated to the 
00214     /// same instance of the associated class.
00215     /// 
00216     /// \param value 
00217     /// The multiplicity from the property owner class side. Valid values are:  ?? or “m?
00218     /// 
00219     __property System::Void set_Multiplicity(System::String* value);
00220 
00221     /// \brief
00222     /// This method is used to return the association multiplicity from the associated class 
00223     /// side. See SetReverseMultiplicity method for description of the possible values.
00224     /// 
00225     /// \return
00226     /// Returns a System::String that represent the reverse multiplicity.
00227     /// 
00228     __property System::String* get_ReverseMultiplicity();
00229 
00230     /// \brief
00231     /// This method is used to set the association multiplicity from the associated class side.
00232     /// The only possible values are 0 or 1. If the multiplicity is set to ?? then it is not mandatory 
00233     /// to initialize the association property when a new object is created. If the multiplicity is 
00234     /// set to ?? then the association property must be initialized when a new object is created.
00235     /// 
00236     /// \param value 
00237     /// The multiplicity from the associated class side. Valid values are:  ?? or ??
00238     /// 
00239     __property System::Void set_ReverseMultiplicity(System::String* value);
00240 
00241     /// \brief
00242     /// Constructs a AssociationPropertyDefinition object based on an unmanaged instance of the object
00243     /// 
00244     /// \param unmanaged 
00245     /// Input A Pointer to the unmanaged object.
00246     /// 
00247     /// \param autoDelete 
00248     /// Input Indicates if the constructed object should be automatically deleted 
00249     /// once it no longer referenced.
00250     /// 
00251     AssociationPropertyDefinition(System::IntPtr unmanaged, System::Boolean autoDelete) : NAMESPACE_OSGEO_FDO_SCHEMA::PropertyDefinition(unmanaged, autoDelete)
00252     {
00253 
00254     }
00255 
00256 public private:
00257     inline FdoAssociationPropertyDefinition* GetImpObj();
00258 };
00259 
00260 END_NAMESPACE_OSGEO_FDO_SCHEMA
00261 
00262 

Comments or suggestions? Send us feedback.