FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoAssociationPropertyDefinition Class Reference

#include <AssociationPropertyDefinition.h>

Inherits FdoPropertyDefinition.

Inheritance diagram for FdoAssociationPropertyDefinition:

[legend]
List of all members.

Detailed Description

The FdoAssociationPropertyDefinition class derives from FdoPropertyDefinition and represents the association between two classes. The class of the associated class must already be defined in the feature schema and cannot be abstract.

Definition at line 37 of file AssociationPropertyDefinition.h.


Public Member Functions

virtual void _writeXml (FdoSchemaXmlContext *pContext)
 Serialize this property to XML.
virtual void CheckReferences (FdoSchemaMergeContext *pContext)
FDO_API FdoClassDefinitionGetAssociatedClass ()
 Gets a reference to the associated class.
FDO_API FdoDeleteRule GetDeleteRule ()
 Gets the delete rule.
FDO_API FdoDataPropertyDefinitionCollectionGetIdentityProperties ()
 Gets a reference to an FdoDataPropertyDefinitionCollection which is a collection of properties of the current class that are used as key for this association. Initially, this collection is empty. The user can optionally add any number of properties. If the collection is left empty, the identity properties of the associated class are added to the current class. The number, order and types should match the property of the ReverseIdentityProperties collection. All properties in the collection should already exist in the containing class. This is needed in case the current class already has properties (foreign keys) that are used to reference the associated feature.
FDO_API bool GetIsReadOnly ()
 This method is used to verify if this association property is a read-only association property. A read-only association property is created internally when the reverse name of an association property is specified. The read-only association property is added automatically to the associated class and can be used to navigate from the associated class to the associating class.
FDO_API bool GetLockCascade ()
 Gets the lock cascade option. true to cascade the lock otherwise the lock is not cascaded.
FDO_API FdoStringGetMultiplicity ()
 This method is used to return the association multiplicity from the owner class side. See SetMultiplicity method for description of the possible values.
virtual FDO_API FdoPropertyType GetPropertyType ()
 Gets the concrete property type.
FDO_API FdoDataPropertyDefinitionCollectionGetReverseIdentityProperties ()
 Gets a reference to an FdoDataPropertyDefinitionCollection used to return a collection of properties of the associated class that are used as key for this association. The number, order and types should match the IdentityProperties. If the reverse identity collection is empty, then the associated class identity properties will be used. The properties of the collection should already exist on the associated class.
FDO_API FdoStringGetReverseMultiplicity ()
 This method is used to return the association multiplicity from the associated class side. See SetReverseMultiplicity method for description of the possible values.
FDO_API FdoStringGetReverseName ()
 Gets the reverse name of this property. See description of SetReverseName.
virtual void InitFromXml (const FdoString *propertyTypeName, FdoSchemaXmlContext *pContext, FdoXmlAttributeCollection *attrs)
 Initialize this property from its XML attributes.
virtual void Set (FdoPropertyDefinition *pProperty, FdoSchemaMergeContext *pContext)
 DOXYGEN-IGNORE
FDO_API void SetAssociatedClass (FdoClassDefinition *value)
 Sets a reference to the associated class.
FDO_API void SetDeleteRule (FdoDeleteRule value)
 Sets the delete rule.
FDO_API void SetIsReadOnly (bool value)
 This method is used to set the read-only status of the association property. This method should only be called by FDO providers to set to read-only the association property added internally to the associated class that represent the reverse association property.
FDO_API void SetLockCascade (bool value)
 Sets the lock cascade option.
FDO_API void SetMultiplicity (FdoString *value)
 This method is used to set the association multiplicity from the property owner class side. The only possible values are 1 or m. If the multiplicity is set to 1, then only one instance of the owning class can be associated to a given instance of the associated class. If the multiplicity is set to m, then many instances of the owning class can be associated to the same instance of the associated class.
virtual void SetParent (FdoSchemaElement *value)
FDO_API void SetReverseMultiplicity (FdoString *value)
 This method is used to set the association multiplicity from the associated class side. The only possible values are 0 or 1. If the multiplicity is set to 0, then it is not mandatory to initialize the association property when a new object is created. If the multiplicity is set to 1, then the association property must be initialized when a new object is created.
FDO_API void SetReverseName (FdoString *name)
 This method is used to set the name of this association as seen by the associated class. This is an optional parameter that can be provided if the navigation back from the associated class is needed. This property will appear as read-only property on the associated class. For example let's assume that we have an Accident class that associated to a Road class by an association called Road? If we wanted to find all the accidents associated to a given road, we will need to provide a reverse property name of the road association property. In this case an appropriate value for such a name would be accident. The filter that can be used to find all the accidents would look like: accident not null.
virtual FdoBoolean XmlEndElement (FdoXmlSaxContext *context, FdoString *uri, FdoString *name, FdoString *qname)
 Element end.
virtual FdoXmlSaxHandlerXmlStartElement (FdoXmlSaxContext *context, FdoString *uri, FdoString *name, FdoString *qname, FdoXmlAttributeCollection *atts)

Static Public Member Functions

FDO_API FdoAssociationPropertyDefinitionCreate (FdoString *name, FdoString *description, bool system=false)
 Constructs an instance of an FdoAssociationPropertyDefinition using the specified arguments.
FDO_API FdoAssociationPropertyDefinitionCreate ()
 Constructs a default instance of an FdoAssociationPropertyDefinition.

Protected Member Functions

virtual void _AcceptChanges ()
virtual void _BeginChangeProcessing ()
virtual void _EndChangeProcessing ()
virtual void _RejectChanges ()
virtual void _StartChanges ()
 FdoFeatureSchema::RejectChanges() support.
virtual void Dispose ()
 Dispose this object.
FDO_API FdoAssociationPropertyDefinition (FdoString *name, FdoString *description, bool system=false)
FDO_API FdoAssociationPropertyDefinition ()
 Constructs a default instance of an FdoAssociationPropertyDefinition.
virtual ~FdoAssociationPropertyDefinition ()
 DOXYGEN-IGNORE

Protected Attributes

FdoClassDefinitionm_associatedClassCHANGED
FdoDeleteRule m_deleteRuleCHANGED
bool m_isReadOnlyCHANGED
bool m_lockCascadeCHANGED
wchar_t * m_multiplicityCHANGED
wchar_t * m_reverseMultiplicityCHANGED
wchar_t * m_reverseNameCHANGED

Constructor & Destructor Documentation

FDO_API FdoAssociationPropertyDefinition::FdoAssociationPropertyDefinition  )  [protected]
 

Constructs a default instance of an FdoAssociationPropertyDefinition.

FDO_API FdoAssociationPropertyDefinition::FdoAssociationPropertyDefinition FdoString name,
FdoString description,
bool  system = false
[protected]
 

Constructs an instance of an FdoAssociationPropertyDefinition using the specified arguments.

virtual FdoAssociationPropertyDefinition::~FdoAssociationPropertyDefinition  )  [protected, virtual]
 

DOXYGEN-IGNORE


Member Function Documentation

virtual void FdoAssociationPropertyDefinition::_AcceptChanges  )  [protected, virtual]
 

Reimplemented from FdoSchemaElement.

virtual void FdoAssociationPropertyDefinition::_BeginChangeProcessing  )  [protected, virtual]
 

Reimplemented from FdoSchemaElement.

virtual void FdoAssociationPropertyDefinition::_EndChangeProcessing  )  [protected, virtual]
 

Reimplemented from FdoSchemaElement.

virtual void FdoAssociationPropertyDefinition::_RejectChanges  )  [protected, virtual]
 

Reimplemented from FdoSchemaElement.

virtual void FdoAssociationPropertyDefinition::_StartChanges  )  [protected, virtual]
 

FdoFeatureSchema::RejectChanges() support.

Reimplemented from FdoSchemaElement.

virtual void FdoAssociationPropertyDefinition::_writeXml FdoSchemaXmlContext *  pContext  )  [virtual]
 

Serialize this property to XML.

Reimplemented from FdoPropertyDefinition.

virtual void FdoAssociationPropertyDefinition::CheckReferences FdoSchemaMergeContext pContext  )  [virtual]
 

Reimplemented from FdoSchemaElement.

FDO_API FdoAssociationPropertyDefinition* FdoAssociationPropertyDefinition::Create FdoString name,
FdoString description,
bool  system = false
[static]
 

Constructs an instance of an FdoAssociationPropertyDefinition using the specified arguments.

Parameters:
name Input name
description Input description
system Input true if this is a system generated property, false otherwise.
Note:
A client would never set system to true, only a provider.
Returns:
Returns FdoAssociationPropertyDefinition

FDO_API FdoAssociationPropertyDefinition* FdoAssociationPropertyDefinition::Create  )  [static]
 

Constructs a default instance of an FdoAssociationPropertyDefinition.

Returns:
Returns FdoAssociationPropertyDefinition

virtual void FdoAssociationPropertyDefinition::Dispose  )  [protected, virtual]
 

Dispose this object.

Returns:
Returns nothing

Implements FdoIDisposable.

FDO_API FdoClassDefinition* FdoAssociationPropertyDefinition::GetAssociatedClass  ) 
 

Gets a reference to the associated class.

Returns:
Returns class definition

FDO_API FdoDeleteRule FdoAssociationPropertyDefinition::GetDeleteRule  ) 
 

Gets the delete rule.

Returns:
Returns the delete rule

FDO_API FdoDataPropertyDefinitionCollection* FdoAssociationPropertyDefinition::GetIdentityProperties  ) 
 

Gets a reference to an FdoDataPropertyDefinitionCollection which is a collection of properties of the current class that are used as key for this association. Initially, this collection is empty. The user can optionally add any number of properties. If the collection is left empty, the identity properties of the associated class are added to the current class. The number, order and types should match the property of the ReverseIdentityProperties collection. All properties in the collection should already exist in the containing class. This is needed in case the current class already has properties (foreign keys) that are used to reference the associated feature.

Returns:
Returns data property definition

FDO_API bool FdoAssociationPropertyDefinition::GetIsReadOnly  ) 
 

This method is used to verify if this association property is a read-only association property. A read-only association property is created internally when the reverse name of an association property is specified. The read-only association property is added automatically to the associated class and can be used to navigate from the associated class to the associating class.

Returns:
Returns true if the association property is read-only. otherwise false.

FDO_API bool FdoAssociationPropertyDefinition::GetLockCascade  ) 
 

Gets the lock cascade option. true to cascade the lock otherwise the lock is not cascaded.

Returns:
Returns the lock cascade option

FDO_API FdoString* FdoAssociationPropertyDefinition::GetMultiplicity  ) 
 

This method is used to return the association multiplicity from the owner class side. See SetMultiplicity method for description of the possible values.

Returns:
Returns a FdoString that represent the multiplicity.

virtual FDO_API FdoPropertyType FdoAssociationPropertyDefinition::GetPropertyType  )  [virtual]
 

Gets the concrete property type.

Returns:
Returns the concrete property type

Implements FdoPropertyDefinition.

FDO_API FdoDataPropertyDefinitionCollection* FdoAssociationPropertyDefinition::GetReverseIdentityProperties  ) 
 

Gets a reference to an FdoDataPropertyDefinitionCollection used to return a collection of properties of the associated class that are used as key for this association. The number, order and types should match the IdentityProperties. If the reverse identity collection is empty, then the associated class identity properties will be used. The properties of the collection should already exist on the associated class.

Returns:
Returns data property definition

FDO_API FdoString* FdoAssociationPropertyDefinition::GetReverseMultiplicity  ) 
 

This method is used to return the association multiplicity from the associated class side. See SetReverseMultiplicity method for description of the possible values.

Returns:
Returns a FdoString that represent the reverse multiplicity.

FDO_API FdoString* FdoAssociationPropertyDefinition::GetReverseName  ) 
 

Gets the reverse name of this property. See description of SetReverseName.

Returns:
Returns the reverse name

virtual void FdoAssociationPropertyDefinition::InitFromXml const FdoString propertyTypeName,
FdoSchemaXmlContext *  pContext,
FdoXmlAttributeCollection attrs
[virtual]
 

Initialize this property from its XML attributes.

Reimplemented from FdoPropertyDefinition.

virtual void FdoAssociationPropertyDefinition::Set FdoPropertyDefinition pProperty,
FdoSchemaMergeContext pContext
[virtual]
 

DOXYGEN-IGNORE

Reimplemented from FdoPropertyDefinition.

FDO_API void FdoAssociationPropertyDefinition::SetAssociatedClass FdoClassDefinition value  ) 
 

Sets a reference to the associated class.

Parameters:
value Input class definition
Returns:
Returns nothing

FDO_API void FdoAssociationPropertyDefinition::SetDeleteRule FdoDeleteRule  value  ) 
 

Sets the delete rule.

Parameters:
value Input the delete rule
Returns:
Returns nothing

FDO_API void FdoAssociationPropertyDefinition::SetIsReadOnly bool  value  ) 
 

This method is used to set the read-only status of the association property. This method should only be called by FDO providers to set to read-only the association property added internally to the associated class that represent the reverse association property.

Parameters:
value Input the read-only flag
Returns:
Returns nothing.

FDO_API void FdoAssociationPropertyDefinition::SetLockCascade bool  value  ) 
 

Sets the lock cascade option.

Parameters:
value Input the lock cascade option.
Returns:
Returns nothing

FDO_API void FdoAssociationPropertyDefinition::SetMultiplicity FdoString value  ) 
 

This method is used to set the association multiplicity from the property owner class side. The only possible values are 1 or m. If the multiplicity is set to 1, then only one instance of the owning class can be associated to a given instance of the associated class. If the multiplicity is set to m, then many instances of the owning class can be associated to the same instance of the associated class.

Parameters:
value The multiplicity from the property owner class side. Valid values are: 1 or m.
Returns:
Returns nothing.

virtual void FdoAssociationPropertyDefinition::SetParent FdoSchemaElement value  )  [virtual]
 

Sets the parent of this SchemaObject. Can only be called from within the Schema package.

Reimplemented from FdoSchemaElement.

FDO_API void FdoAssociationPropertyDefinition::SetReverseMultiplicity FdoString value  ) 
 

This method is used to set the association multiplicity from the associated class side. The only possible values are 0 or 1. If the multiplicity is set to 0, then it is not mandatory to initialize the association property when a new object is created. If the multiplicity is set to 1, then the association property must be initialized when a new object is created.

Parameters:
value The multiplicity from the associated class side. Valid values are: 0 or 1.
Returns:
Returns nothing.

FDO_API void FdoAssociationPropertyDefinition::SetReverseName FdoString name  ) 
 

This method is used to set the name of this association as seen by the associated class. This is an optional parameter that can be provided if the navigation back from the associated class is needed. This property will appear as read-only property on the associated class. For example let's assume that we have an Accident class that associated to a Road class by an association called Road? If we wanted to find all the accidents associated to a given road, we will need to provide a reverse property name of the road association property. In this case an appropriate value for such a name would be accident. The filter that can be used to find all the accidents would look like: accident not null.

Parameters:
name Input reverse name
Returns:
Returns nothing

virtual FdoBoolean FdoAssociationPropertyDefinition::XmlEndElement FdoXmlSaxContext context,
FdoString uri,
FdoString name,
FdoString qname
[virtual]
 

Element end.

Reimplemented from FdoSchemaElement.

virtual FdoXmlSaxHandler* FdoAssociationPropertyDefinition::XmlStartElement FdoXmlSaxContext context,
FdoString uri,
FdoString name,
FdoString qname,
FdoXmlAttributeCollection atts
[virtual]
 

Handle sub-elements such as properties Element start

Reimplemented from FdoSchemaElement.


Member Data Documentation

FdoClassDefinition* FdoAssociationPropertyDefinition::m_associatedClassCHANGED [protected]
 

Definition at line 338 of file AssociationPropertyDefinition.h.

FdoDeleteRule FdoAssociationPropertyDefinition::m_deleteRuleCHANGED [protected]
 

Definition at line 339 of file AssociationPropertyDefinition.h.

bool FdoAssociationPropertyDefinition::m_isReadOnlyCHANGED [protected]
 

Definition at line 341 of file AssociationPropertyDefinition.h.

bool FdoAssociationPropertyDefinition::m_lockCascadeCHANGED [protected]
 

Definition at line 340 of file AssociationPropertyDefinition.h.

wchar_t* FdoAssociationPropertyDefinition::m_multiplicityCHANGED [protected]
 

Definition at line 342 of file AssociationPropertyDefinition.h.

wchar_t* FdoAssociationPropertyDefinition::m_reverseMultiplicityCHANGED [protected]
 

Definition at line 343 of file AssociationPropertyDefinition.h.

wchar_t* FdoAssociationPropertyDefinition::m_reverseNameCHANGED [protected]
 

Definition at line 344 of file AssociationPropertyDefinition.h.


The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.