company logo

Property :: provideExtension - Create property extension

The function allows creating a property extension with the name passed in sExtension, which is based on an extension property, i.e. a property that has been defined as extension property in the database or dictionary. The function has to be called for managed property extensions, only. The function returns true,when the instance has been created successfully or when the extension has already been added to the instance's extension list. In order to check, whether the property extension exists or not, Property::extensionExist() might be called.

The function throws an exception, when the property does not refer to an extendable data type.

The function throws an exception when being called for an ordinary property (i.e. a property, which is not an extension property.

... fragment ( Property &person ) {

  Property    ext_remarks(person,ext_remarks); // extension property

  if ( person.tryGet("P1") )

    if ( !extensionExist("ext_remarks") )

      ext_remarks.provideExtension("ext_remarks");

}

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool Property  :: provideExtension ( odaba::String &sExtension )
  • sExtension - Extension property name

    Extension property are defined in a database or resource database using 40 byte character names (ASCII or Latin1). Extension names are passed as String.